MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / dumpBuffer

Function dumpBuffer

cpp/5_Domain_Specific/marchingCubes/marchingCubes.cpp:337–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337template <class T> void dumpBuffer(T *d_buffer, int nelements, int size_element)
338{
339 uint bytes = nelements * size_element;
340 T *h_buffer = (T *)malloc(bytes);
341 checkCudaErrors(cudaMemcpy(h_buffer, d_buffer, bytes, cudaMemcpyDeviceToHost));
342
343 for (int i = 0; i < nelements; i++) {
344 printf("%d: %u\n", i, h_buffer[i]);
345 }
346
347 printf("\n");
348 free(h_buffer);
349}
350
351void runAutoTest(int argc, char **argv)
352{

Callers 1

computeIsosurfaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected