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

Function initCUDABuffers

cpp/0_Introduction/simpleCUDA2GL/main.cpp:614–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612////////////////////////////////////////////////////////////////////////////////
613#ifndef USE_TEXSUBIMAGE2D
614void initCUDABuffers()
615{
616 // set up vertex data parameter
617 num_texels = image_width * image_height;
618 num_values = num_texels * 4;
619 size_tex_data = sizeof(GLubyte) * num_values;
620 checkCudaErrors(cudaMalloc((void **)&cuda_dest_resource, size_tex_data));
621 // checkCudaErrors(cudaHostAlloc((void**)&cuda_dest_resource, size_tex_data,
622 // ));
623}
624#endif
625
626////////////////////////////////////////////////////////////////////////////////

Callers 1

runStdProgramFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected