Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Initialize Body Counts Cuda
const int PIXEL_COUNT = 500 * 500;
usigned int *pixelBodyCounts;
cudaMallocManaged(&pixelBodyCounts, PIXEL_COUNT * sizeof(unsigned int));
initZeros<<<numBlocks, blockSize>>>(pixelBodyCounts);
// do stuff with the pixels
cudaFree(pixelBodyCounts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment