Pedro Leite

words – an empty shell, a lack of meaning

Recife Zombie Walk

Maybe I’m gonna see for myself the Recife Zombie Walk. It’ll take place on Recife (duh), at Derby Square this November 2nd to celebrate the All Souls’ Day.

Recife Zombie Walk

Advertisements

October 31, 2007 Posted by | all souls day, fun, personal, screenshot | Leave a comment

So much pain in the world today

Shelley MarshSo much pain in the world today.
Too many turds are headin’ my way.
But we can press our turds together.
Passing by turds whenever.

Don’t you know? Isn’t…

Life so full of happiness?
Feel free to mark my words.
But me and you, will my love do
in a world that’s full of turds? TURDS!
llama judgin finger-lovin’ turds. TURDS!

October 31, 2007 Posted by | me, music, random thoughts, screenshot, south park | Leave a comment

Something is wrong…

My OpenStereo CUDA plugin did not directly benefit from a huge performance improve. Worst, with a 512×512 texture, his best fps rate was around 20, when compiled in release mode, running over a GeForce 8800 GTX. Even the one that uses shaders and Render-To-Texture have outperformed the CUDA plugin (around 300fps in a GeForce 7900 GTX!!!).

Perhaps that implementation isn’t the best one… I think that memory access could be improved, by using shared memory, but this is something to analyze.

October 31, 2007 Posted by | cuda, development, master degree, nvidia, opengl, openstereo | Leave a comment

fglrx and AIGLX

There’s been a great progress on the fglrx ATI driver. However, it needs more development. Not only 3D OpenGL accelerated applications but also video playback (which, I guess, uses OpenGL) needs to be rendered correctly. Video playback, for example, doesn’t play in window mode. While in fullscreen, it flicks a lot =/ It was under Ubuntu 7.10.

October 30, 2007 Posted by | aiglx, ati, fglrx, linux, opengl, screenshot, ubuntu | Leave a comment

OpenStereo Plugin using CUDA

Of course I wouldn’t let OpenStereo apart from my CUDA studies. I’ve implemented an OpenStereo plugin that uses CUDA to do the fusion process. Below is the preliminary kernel code:

#include <stdlib.h>
#include <stdio.h>
#include <math.h>


#define BLOCK_SIZE 16


__global__ void fuse_images(float* left_tex, float* right_tex, float* stereo_tex,
float* matrix_left, float* matrix_right, int width, int height) {
int ix = __mul24(blockIdx.x, BLOCK_SIZE) + threadIdx.x;
int iy = __mul24(blockIdx.y, BLOCK_SIZE) + threadIdx.y;
int i = 0, j = 0, k = 0;
float c = 0.0f;

if (ix >= width || iy >= height)
return;


// rows
for (; i < 3; i++) {
// columns
k = (ix + __mul24(iy, width)) * 3;
for (j = 0; j < 3; j++) {
c += matrix_left[j + __mul24(3, i)] * left_tex[k + j];
c += matrix_right[j + __mul24(3, i)] * right_tex[k + j];
}
stereo_tex[k + i] = c;
c = 0.0f;
}
}

That function runs on the device (GPU) while the host side does the OpenGL stuff, besides calling the kernel code. A call to that function is done this way:

// executes the kernel
fuse_images<<< grid, threads >>>(cuda_left_tex, cuda_right_tex, cuda_stereo_tex,
getCudaMatrixFromMethod(method, isLeft), getCudaMatrixFromMethod(method, !isLeft), width, height);

I need to test this plugin in a CUDA device, since its emulation is working almost perfectly.
P.S.: Yeah, posting source code in wordpress sucks =/

October 30, 2007 Posted by | cuda, development, open source, opengl, openstereo, stereoscopy | 1 Comment

New Title

Luka said that my previous title (Pedro Leite’s Blog) is ugly. I agree that the whole title itself is not only ugly (my name isn’t ugly ¬¬) but also not creative. So I have decided to mock her and choose a Latin title.

ab initio means “from the beginning” and vel non, “or not”. You’ve already got the idea ;P

October 30, 2007 Posted by | meta | Leave a comment

Multi-Massive Parallel Computing

And here is the first step of my Master’s thesis: studying CUDA. In shortly, CUDA (Compute Unified Device Architecture) is an GPGPU language and runtime for the new GeForce 8 Series and so on. It’s a complete new paradigm, where programs written for such devices must have a parallel nature. So it isn’t so general purpose as it claims to be ;)

However, this whole paradigm will soon give me some headaches. Just look the figure below:

CUDA Computing Paradigm

(Figure taken from Nvidia CUDA: preview)

As you can “clearly” see, host is the CPU side and device is GPU side. A kernel is a program designed to run in parallel. The execution occur on a grid, which is divided into blocks, whose are composed by threads. Blocks and threads run logically in parallel, while a set of threads, called warp, run physically in parallel.

More will come, by the time I learn things ;)

October 29, 2007 Posted by | cuda, grvm, master degree, nvidia, screenshot | 2 Comments

Playing with GIMP

The new GIMP is out and today i was playing a little with it. And no, I’m not a designer…

Original:

Modified #1:

Modified #2:

October 28, 2007 Posted by | gimp, me, open source, photo, release | Leave a comment

Master’s Degree Program

Today I’m coming back to my previous job. I’m gonna do researches again! Just to acquire a Master’s Degree. The inscription (I don’t know whether this is the correct word, but whatever) process is on its way, and I need to gather some documents to apply for it. By the end of October I’ll be inscribed and by the middle of December, I’ll be waiting for the result. I’m pretty sure I’ll pass this and be ready to start classes on March. What I don’t know is: will I get the scholarship? Anyway, today my master’s will officially begin, at least for me.

Btw, yesterday I have met very good and funny people. And also I went down a hill in a tyrolean crossing way. It’s so damn exciting!

October 1, 2007 Posted by | master degree, me, personal, science computing, tyrolean crossing | Leave a comment