Understanding cuLaunchGrid execution using Driver/Runtime API.

Dear, thanks for good answers.

I would like to compare execution environment to clear the way of driver API.

I have two code fragment. Could you confirm the two work the same?

-FIRST: calling kernel(hfunc) from Driver API----------------------------------------

#define BLOCK_SIZE 8

cudaGLMapBufferObject(dta, vbo);
cuCtxSynchronize();

cuFuncSetBlockShape(hfunc BLOCK_SIZE, BLOCK_SIZE 1);
cuCtxSynchronize();

cuParamSeti( hfunc 0, dta);
cuCtxSynchronize();
cuParamSeti(hfunc, 4, mesh_width);
cuCtxSynchronize();
cuParamSeti(hfunc, 8, mesh_height);
cuCtxSynchronize();
cuParamSeti(hfunc, 12, anim);
cuCtxSynchronize();
cuParamSetSize(hfunc 16);
cuCtxSynchronize();

cuLaunchGrid(hfunc, mesh_width/BLOCK_SIZE, mesh_height/BLOCK_SIZE);
cuCtxSynchronize();


-SECOND: calling kernel from Runtime API-------------
CUDA_SAFE_CALL(cudaGLMapBufferObject ((void**)&dptr, vbo));

// execute the kernel
dim3 block(8, 8, 1);
dim3 grid(mesh_width / block.x, mesh_height / block.y, 1);
kernel<<< grid, block>>>(dptr, mesh_width, mesh_height, anim);

They are from simpleGL.cu example. I wonder if the first code call the same way
as the second(second one is on example).

The first one didn’t cause error, but the picture is different(on each rendering,
it adds one row to the scene and die at the end.

Thanks.

SK.