mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-07-30 02:00:30 +08:00
Merge bc025f519eefcec1a7bce944057b595beba56555 into 9c688d7ff78455ed42e345124d1495aad6bf66de
This commit is contained in:
commit
55f5ace42c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user