Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Samples/0_Introduction/vectorAddDrv/vectorAddDrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ int main(int argc, char **argv) {
// Grid/Block configuration
int threadsPerBlock = 256;
int blocksPerGrid = (N + threadsPerBlock - 1) / threadsPerBlock;

void *kernel_launch_config[5] = {CU_LAUNCH_PARAM_BUFFER_POINTER,
argBuffer, CU_LAUNCH_PARAM_BUFFER_SIZE,
&offset, CU_LAUNCH_PARAM_END};
// Launch the CUDA kernel
checkCudaErrors(cuLaunchKernel(vecAdd_kernel, blocksPerGrid, 1, 1,
threadsPerBlock, 1, 1, 0, NULL, NULL,
argBuffer));
kernel_launch_config));
}

#ifdef _DEBUG
Expand Down