[clfft] 34/128: fixing cmaklists to build inplace transpose
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Oct 22 14:54:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository clfft.
commit 7d914b594d59ea4ad0b0d058440efd11d5680640
Author: Billy Everyteen <i.amirgh at gmail.com>
Date: Thu Aug 20 17:21:14 2015 -0500
fixing cmaklists to build inplace transpose
---
src/library/CMakeLists.txt | 2 ++
src/library/action.h | 16 ++++++++++++++++
src/library/generator.transpose.inplace.cpp | 20 ++++++++++----------
3 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt
index e0108b7..95dbae2 100644
--- a/src/library/CMakeLists.txt
+++ b/src/library/CMakeLists.txt
@@ -22,6 +22,7 @@ set( clFFT.Source transform.cpp
generator.stockham.cpp
generator.transpose.vliw.cpp
generator.transpose.gcn.cpp
+ generator.transpose.inplace.cpp
generator.copy.cpp
lifetime.cpp
fft_binary_lookup.cpp
@@ -44,6 +45,7 @@ set( clFFT.Headers private.h
generator.stockham.h
generator.transpose.vliw.h
generator.transpose.gcn.h
+ generator.transpose.inplace.h
fft_binary_lookup.h
md5sum.h
../include/stdafx.h
diff --git a/src/library/action.h b/src/library/action.h
index 36391af..3ffa313 100644
--- a/src/library/action.h
+++ b/src/library/action.h
@@ -86,6 +86,22 @@ public:
};
//
+// FFTTransposeInplaceAction
+//
+// Base class for every TransposeInplace action for the FFT.
+// Currently do nothing special. The kernel generation and compilation occurs
+// by the subclass FFTGeneratedTransposeInplaceAction
+//
+class FFTTransposeInplaceAction : public FFTAction
+{
+public:
+ FFTTransposeInplaceAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
+
+ clfftGenerators getGenerator() { return Transpose_INPLACE; }
+};
+
+
+//
// FFTGeneratedCopyAction
//
// Implements a Copy action for the FFT
diff --git a/src/library/generator.transpose.inplace.cpp b/src/library/generator.transpose.inplace.cpp
index 51dd53d..61a523c 100644
--- a/src/library/generator.transpose.inplace.cpp
+++ b/src/library/generator.transpose.inplace.cpp
@@ -221,7 +221,7 @@ static clfftStatus genTransposePrototype( const FFTGeneratedTransposeInplaceActi
switch( params.fft_placeness )
{
- case CLFFT_Inplace:
+ case CLFFT_INPLACE:
dtOutput = dtComplex;
break;
case CLFFT_OUTOFPLACE:
@@ -253,7 +253,7 @@ static clfftStatus genTransposePrototype( const FFTGeneratedTransposeInplaceActi
switch( params.fft_placeness )
{
- case CLFFT_Inplace:
+ case CLFFT_INPLACE:
dtOutput = dtPlanar;
break;
case CLFFT_OUTOFPLACE:
@@ -288,7 +288,7 @@ static clfftStatus genTransposePrototype( const FFTGeneratedTransposeInplaceActi
switch( params.fft_placeness )
{
- case CLFFT_Inplace:
+ case CLFFT_INPLACE:
dtOutput = dtPlanar;
break;
case CLFFT_OUTOFPLACE:
@@ -386,7 +386,7 @@ static clfftStatus genTransposeKernel( const FFTGeneratedTransposeInplaceAction:
// This detects whether the input matrix is square
bool notSquare = ( params.fft_N[ 0 ] == params.fft_N[ 1 ] ) ? false : true;
- if( notSquare && (params.fft_placeness == CLFFT_Inplace) )
+ if( notSquare && (params.fft_placeness == CLFFT_INPLACE) )
return CLFFT_TRANSPOSED_NOTIMPLEMENTED;
@@ -872,7 +872,7 @@ clfftStatus FFTGeneratedTransposeInplaceAction::initParams ()
ARG_CHECK( this->plan->inStride.size( ) == this->plan->outStride.size( ) );
- if( CLFFT_Inplace == this->signature.fft_placeness )
+ if( CLFFT_INPLACE == this->signature.fft_placeness )
{
// If this is an in-place transform the
// input and output layout, dimensions and strides
@@ -927,8 +927,8 @@ const size_t reShapeFactor = 4; // wgTileSize = { lwSize.x * reShapeFactor, lw
const size_t outRowPadding = 0;
// This is global, but should consider to be part of FFTPlan
-size_t loopCount = 0;
-tile blockSize = {0, 0};
+extern size_t loopCount;
+extern tile blockSize;
// OpenCL does not take unicode strings as input, so this routine returns only ASCII strings
@@ -969,16 +969,16 @@ clfftStatus FFTGeneratedTransposeInplaceAction::generateKernel ( FFTRepo& fftRep
OPENCL_V( status, _T( "clGetCommandQueueInfo failed" ) );
- OPENCL_V( fftRepo.setProgramCode( Transpose_Inplace, this->getSignatureData(), programCode, Device, QueueContext ), _T( "fftRepo.setclString() failed!" ) );
+ OPENCL_V( fftRepo.setProgramCode( Transpose_INPLACE, this->getSignatureData(), programCode, Device, QueueContext ), _T( "fftRepo.setclString() failed!" ) );
// Note: See genFunctionPrototype( )
if( this->signature.fft_3StepTwiddle )
{
- OPENCL_V( fftRepo.setProgramEntryPoints( Transpose_Inplace, this->getSignatureData(), "transpose_Inplace_tw_fwd", "transpose_Inplace_tw_back", Device, QueueContext ), _T( "fftRepo.setProgramEntryPoint() failed!" ) );
+ OPENCL_V( fftRepo.setProgramEntryPoints( Transpose_INPLACE, this->getSignatureData(), "transpose_Inplace_tw_fwd", "transpose_Inplace_tw_back", Device, QueueContext ), _T( "fftRepo.setProgramEntryPoint() failed!" ) );
}
else
{
- OPENCL_V( fftRepo.setProgramEntryPoints( Transpose_Inplace, this->getSignatureData(), "transpose_Inplace", "transpose_Inplace", Device, QueueContext ), _T( "fftRepo.setProgramEntryPoint() failed!" ) );
+ OPENCL_V( fftRepo.setProgramEntryPoints( Transpose_INPLACE, this->getSignatureData(), "transpose_Inplace", "transpose_Inplace", Device, QueueContext ), _T( "fftRepo.setProgramEntryPoint() failed!" ) );
}
return CLFFT_SUCCESS;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clfft.git
More information about the debian-science-commits
mailing list