| 34 | */ |
| 35 | |
| 36 | struct StatData |
| 37 | { |
| 38 | cl_kernel kernel; |
| 39 | cl_ulong deltaNanoSec; |
| 40 | double doubleNanoSec; |
| 41 | size_t batchSize; |
| 42 | clfftDim dim; |
| 43 | clfftPlanHandle plHandle; |
| 44 | clfftPlanHandle planX; |
| 45 | clfftPlanHandle planY; |
| 46 | clfftPlanHandle planZ; |
| 47 | clfftPlanHandle planTX; |
| 48 | clfftPlanHandle planTY; |
| 49 | clfftPlanHandle planTZ; |
| 50 | |
| 51 | clfftPlanHandle planRCcopy; |
| 52 | clfftPlanHandle planCopy; |
| 53 | |
| 54 | clfftGenerators gen; |
| 55 | |
| 56 | std::vector< size_t > lengths; |
| 57 | std::vector< size_t > inStride; |
| 58 | std::vector< size_t > outStride; |
| 59 | size_t iDist; |
| 60 | size_t oDist; |
| 61 | clfftResultLocation placeness; |
| 62 | std::vector< size_t > enqueueLocalWorkSize; |
| 63 | std::vector< size_t > enqueueWorkSize; |
| 64 | std::vector< cl_event > outEvents; |
| 65 | |
| 66 | StatData( ): deltaNanoSec( 0 ) |
| 67 | {} |
| 68 | |
| 69 | StatData( clfftPlanHandle id, FFTPlan* plan, cl_kernel kern, cl_uint nEv, cl_event* Ev, |
| 70 | const std::vector< size_t >& gWorkSize, const std::vector< size_t >& lWorkSize): |
| 71 | deltaNanoSec( 0 ), kernel( kern ), batchSize( plan->batchsize ), dim( plan->dim ), |
| 72 | plHandle( id ), planX( plan->planX ), planY( plan->planY ), planZ( plan->planZ ), |
| 73 | planTX( plan->planTX ), planTY( plan->planTY ), planTZ( plan->planTZ ), |
| 74 | planRCcopy( plan->planRCcopy ), planCopy( plan->planCopy ), gen(plan->gen), |
| 75 | inStride( plan->inStride ), outStride( plan->outStride ), iDist( plan->iDist ), oDist( plan->oDist ), |
| 76 | lengths( plan->length ), enqueueWorkSize( gWorkSize ), enqueueLocalWorkSize( lWorkSize ), placeness( plan->placeness ) |
| 77 | { |
| 78 | for( cl_uint e = 0; e < nEv; ++e ) |
| 79 | { |
| 80 | outEvents.push_back( Ev[ e ] ); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | double calcFlops( ) |
| 85 | { |
| 86 | size_t fftLength = 0; |
| 87 | size_t dimIndex = 0; |
| 88 | |
| 89 | if( dim == CLFFT_1D ) |
| 90 | { |
| 91 | fftLength = lengths.at( 0 ); |
| 92 | dimIndex = 1; |
| 93 | } |