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

Function clfftCopyPlan

src/library/plan.cpp:4552–4587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4550}
4551
4552clfftStatus clfftCopyPlan( clfftPlanHandle* out_plHandle, cl_context new_context, clfftPlanHandle in_plHandle )
4553{
4554 FFTRepo& fftRepo = FFTRepo::getInstance( );
4555 FFTPlan* in_fftPlan = NULL, *out_fftPlan = NULL;
4556 lockRAII* in_planLock = NULL, *out_planLock = NULL;
4557
4558 OPENCL_V( fftRepo.getPlan( in_plHandle, in_fftPlan, in_planLock ), _T( "fftRepo.getPlan failed" ) );
4559
4560 OPENCL_V( clfftCreateDefaultPlan( out_plHandle, new_context, in_fftPlan->dim, &in_fftPlan->length[ 0 ] ),
4561 _T( "clfftCreateDefaultPlan failed" ) );
4562
4563 OPENCL_V( fftRepo.getPlan( *out_plHandle, out_fftPlan, out_planLock ), _T( "fftRepo.getPlan failed" ) );
4564
4565 // Let other operations complete before attempting to copy the plan
4566 scopedLock sLock( *in_planLock, _T( "clfftCopyPlan" ) );
4567
4568 out_fftPlan->baked = false;
4569 out_fftPlan->gen = in_fftPlan->gen;
4570 out_fftPlan->envelope = in_fftPlan->envelope;
4571 out_fftPlan->dim = in_fftPlan->dim;
4572 out_fftPlan->inputLayout = in_fftPlan->inputLayout;
4573 out_fftPlan->outputLayout = in_fftPlan->outputLayout;
4574 out_fftPlan->placeness = in_fftPlan->placeness;
4575 out_fftPlan->precision = in_fftPlan->precision;
4576 out_fftPlan->forwardScale = in_fftPlan->forwardScale;
4577 out_fftPlan->backwardScale = in_fftPlan->backwardScale;
4578 out_fftPlan->iDist = in_fftPlan->iDist;
4579 out_fftPlan->oDist = in_fftPlan->oDist;
4580 out_fftPlan->length = in_fftPlan->length;
4581 out_fftPlan->inStride = in_fftPlan->inStride;
4582 out_fftPlan->outStride = in_fftPlan->outStride;
4583 out_fftPlan->batchsize = in_fftPlan->batchsize;
4584 out_fftPlan->transposed = in_fftPlan->transposed;
4585
4586 return CLFFT_SUCCESS;
4587}
4588
4589clfftStatus FFTPlan::ConstructAndEnqueueConstantBuffers( cl_command_queue* commQueueFFT )
4590{

Callers 2

TEST_FFunction · 0.85
clAmdFftCopyPlanFunction · 0.85

Calls 2

clfftCreateDefaultPlanFunction · 0.85
getPlanMethod · 0.80

Tested by 1

TEST_FFunction · 0.68