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

Method ConstructAndEnqueueConstantBuffers

src/library/plan.cpp:4589–4610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4587}
4588
4589clfftStatus FFTPlan::ConstructAndEnqueueConstantBuffers( cl_command_queue* commQueueFFT )
4590{
4591 // Construct the constant buffer and call clEnqueueWriteBuffer
4592 //
4593 cb_t ConstantBufferParams [CLFFT_CB_SIZE];
4594 memset (& ConstantBufferParams, 0, sizeof (ConstantBufferParams));
4595
4596 ConstantBufferParams[0].u = std::max<cl_uint> (1, cl_uint (/*fftPlan->*/batchsize));
4597
4598
4599 OPENCL_V(clEnqueueWriteBuffer( *commQueueFFT,
4600 /*fftPlan->*/const_buffer,
4601 1, // TODO? non-blocking write?
4602 0,
4603 sizeof(ConstantBufferParams),
4604 &ConstantBufferParams,
4605 0,
4606 NULL,
4607 NULL), _T("clEnqueueWriteBuffer failed") );
4608
4609 return CLFFT_SUCCESS;
4610}
4611
4612
4613clfftStatus clfftDestroyPlan( clfftPlanHandle* plHandle )

Callers 1

clfftBakePlanFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected