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

Method getWorkSizes

src/library/generator.copy.cpp:582–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582clfftStatus FFTGeneratedCopyAction::getWorkSizes (std::vector<size_t> & globalWS, std::vector<size_t> & localWS)
583{
584 bool h2c, c2h;
585 h2c = ( (this->signature.fft_inputLayout == CLFFT_HERMITIAN_PLANAR) || (this->signature.fft_inputLayout == CLFFT_HERMITIAN_INTERLEAVED) );
586 c2h = ( (this->signature.fft_outputLayout == CLFFT_HERMITIAN_PLANAR) || (this->signature.fft_outputLayout == CLFFT_HERMITIAN_INTERLEAVED) );
587
588 bool general = !(h2c || c2h);
589
590 size_t count = this->plan->batchsize;
591
592 switch(this->signature.fft_DataDim)
593 {
594 case 5: assert(false);
595 case 4: count *= this->signature.fft_N[2];
596 case 3: count *= this->signature.fft_N[1];
597 case 2:
598 {
599 if(general)
600 {
601 count *= 64;
602 }
603 else
604 {
605 count *= (DivRoundingUp<size_t>((1 + this->signature.fft_N[0]/2), 64) * 64);
606 }
607 }
608 break;
609 case 1: assert(false);
610 }
611
612 globalWS.push_back( count );
613 localWS.push_back( 64 );
614
615 return CLFFT_SUCCESS;
616}
617
618
619using namespace CopyGenerator;

Callers 1

enqueueMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected