MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / cleanupCL

Function cleanupCL

src/callback-client/openCL.misc.cpp:477–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475}
476
477int cleanupCL( cl_context* context, cl_command_queue* commandQueue,
478 const cl_uint numBuffersIn, cl_mem inputBuffer[], const cl_uint numBuffersOut, cl_mem outputBuffer[] )
479{
480 releaseOpenCLMemBuffer( numBuffersIn, inputBuffer);
481 releaseOpenCLMemBuffer( numBuffersOut, outputBuffer);
482
483 if( *commandQueue != NULL )
484 OPENCL_V_THROW( clReleaseCommandQueue( *commandQueue ), "Error: In clReleaseCommandQueue\n" );
485
486 if( *context != NULL )
487 OPENCL_V_THROW( clReleaseContext( *context ), "Error: In clReleaseContext\n" );
488
489 return 0;
490}
491
492int createOpenCLMemoryBuffer( cl_context& context, const size_t bufferSizeBytes, const cl_uint numBuffers, cl_mem buffer[], cl_mem_flags accessibility) {
493 cl_int status = 0;

Callers

nothing calls this directly

Calls 1

releaseOpenCLMemBufferFunction · 0.70

Tested by

no test coverage detected