[clfft] 72/128: changing inplace name to square to better reflect implementation feature
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Oct 22 14:54:40 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 462b2bb7261a1eff445fac0cef7e838b8b9a6511
Author: bragadeesh <bragadeesh.natarajan at amd>
Date: Tue Sep 15 14:32:56 2015 -0500
changing inplace name to square to better reflect implementation feature
---
src/library/action.cpp | 2 +-
src/library/action.h | 20 +++++++--------
src/library/generator.h | 2 +-
src/library/generator.transpose.inplace.cpp | 38 ++++++++++++++---------------
src/library/plan.cpp | 16 ++++++------
5 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/src/library/action.cpp b/src/library/action.cpp
index 515db2b..f0f9ba1 100644
--- a/src/library/action.cpp
+++ b/src/library/action.cpp
@@ -65,7 +65,7 @@ FFTTransposeGCNAction::FFTTransposeGCNAction(clfftPlanHandle plHandle, FFTPlan *
err = CLFFT_SUCCESS;
}
-FFTTransposeInplaceAction::FFTTransposeInplaceAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err)
+FFTTransposeSquareAction::FFTTransposeSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err)
: FFTAction(plan, err)
{
if (err != CLFFT_SUCCESS)
diff --git a/src/library/action.h b/src/library/action.h
index 3ffa313..9c14a74 100644
--- a/src/library/action.h
+++ b/src/library/action.h
@@ -86,18 +86,18 @@ public:
};
//
-// FFTTransposeInplaceAction
+// FFTTransposeSquareAction
//
-// Base class for every TransposeInplace action for the FFT.
+// Base class for every TransposeSquare action for the FFT.
// Currently do nothing special. The kernel generation and compilation occurs
-// by the subclass FFTGeneratedTransposeInplaceAction
+// by the subclass FFTGeneratedTransposeSquareAction
//
-class FFTTransposeInplaceAction : public FFTAction
+class FFTTransposeSquareAction : public FFTAction
{
public:
- FFTTransposeInplaceAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
+ FFTTransposeSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
- clfftGenerators getGenerator() { return Transpose_INPLACE; }
+ clfftGenerators getGenerator() { return Transpose_SQUARE; }
};
@@ -271,9 +271,9 @@ public:
};
-// FFTGeneratedTransposeInplaceAction
+// FFTGeneratedTransposeSquareAction
//
-// Implements a TransposeInplace action for the FFT
+// Implements a TransposeSquare action for the FFT
// Its signature is represented by FFTKernelGenKeyParams structure
//
// This class implements:
@@ -287,10 +287,10 @@ public:
// but in practice the transpose action only use a few information of that
// structure, so a proper structure should be used instead.
//
-class FFTGeneratedTransposeInplaceAction : public FFTTransposeInplaceAction
+class FFTGeneratedTransposeSquareAction : public FFTTransposeSquareAction
{
public:
- FFTGeneratedTransposeInplaceAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
+ FFTGeneratedTransposeSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
typedef FFTKernelSignature<FFTKernelGenKeyParams, FFT_DEFAULT_TRANSPOSE_ACTION> Signature;
diff --git a/src/library/generator.h b/src/library/generator.h
index 7f47445..b27043a 100644
--- a/src/library/generator.h
+++ b/src/library/generator.h
@@ -25,7 +25,7 @@ enum clfftGenerators
Stockham, // Using the Stockham autosort frameworks
Transpose_VLIW,
Transpose_GCN,
- Transpose_INPLACE,
+ Transpose_SQUARE,
Copy,
ENDGENERATORS ///< This value will always be last, and marks the length of clfftGenerators
};
diff --git a/src/library/generator.transpose.inplace.cpp b/src/library/generator.transpose.inplace.cpp
index 1607fd7..323c9c8 100644
--- a/src/library/generator.transpose.inplace.cpp
+++ b/src/library/generator.transpose.inplace.cpp
@@ -30,13 +30,13 @@
#include "action.h"
-FFTGeneratedTransposeInplaceAction::FFTGeneratedTransposeInplaceAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err)
- : FFTTransposeInplaceAction(plHandle, plan, queue, err)
+FFTGeneratedTransposeSquareAction::FFTGeneratedTransposeSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err)
+ : FFTTransposeSquareAction(plHandle, plan, queue, err)
{
if (err != CLFFT_SUCCESS)
{
- // FFTTransposeInplaceAction() failed, exit
- fprintf(stderr, "FFTTransposeInplaceAction() failed!\n");
+ // FFTTransposeSquareAction() failed, exit
+ fprintf(stderr, "FFTTransposeSquareAction() failed!\n");
return;
}
@@ -45,7 +45,7 @@ FFTGeneratedTransposeInplaceAction::FFTGeneratedTransposeInplaceAction(clfftPlan
if (err != CLFFT_SUCCESS)
{
- fprintf(stderr, "FFTGeneratedTransposeInplaceAction::initParams() failed!\n");
+ fprintf(stderr, "FFTGeneratedTransposeSquareAction::initParams() failed!\n");
return;
}
@@ -55,7 +55,7 @@ FFTGeneratedTransposeInplaceAction::FFTGeneratedTransposeInplaceAction(clfftPlan
if (err != CLFFT_SUCCESS)
{
- fprintf(stderr, "FFTGeneratedTransposeInplaceAction::generateKernel failed\n");
+ fprintf(stderr, "FFTGeneratedTransposeSquareAction::generateKernel failed\n");
return;
}
@@ -63,7 +63,7 @@ FFTGeneratedTransposeInplaceAction::FFTGeneratedTransposeInplaceAction(clfftPlan
if (err != CLFFT_SUCCESS)
{
- fprintf(stderr, "FFTGeneratedTransposeInplaceAction::compileKernels failed\n");
+ fprintf(stderr, "FFTGeneratedTransposeSquareAction::compileKernels failed\n");
return;
}
@@ -71,7 +71,7 @@ FFTGeneratedTransposeInplaceAction::FFTGeneratedTransposeInplaceAction(clfftPlan
}
-bool FFTGeneratedTransposeInplaceAction::buildForwardKernel()
+bool FFTGeneratedTransposeSquareAction::buildForwardKernel()
{
clfftLayout inputLayout = this->getSignatureData()->fft_inputLayout;
clfftLayout outputLayout = this->getSignatureData()->fft_outputLayout;
@@ -83,7 +83,7 @@ bool FFTGeneratedTransposeInplaceAction::buildForwardKernel()
return (!real_transform) || r2c_transform;
}
-bool FFTGeneratedTransposeInplaceAction::buildBackwardKernel()
+bool FFTGeneratedTransposeSquareAction::buildBackwardKernel()
{
clfftLayout inputLayout = this->getSignatureData()->fft_inputLayout;
clfftLayout outputLayout = this->getSignatureData()->fft_outputLayout;
@@ -195,7 +195,7 @@ const std::string pmImagOut( "pmImagOut" );
const std::string pmComplexIn( "pmComplexIn" );
const std::string pmComplexOut( "pmComplexOut" );
-static clfftStatus genTransposePrototype( const FFTGeneratedTransposeInplaceAction::Signature & params, const size_t& lwSize, const std::string& dtPlanar, const std::string& dtComplex,
+static clfftStatus genTransposePrototype( const FFTGeneratedTransposeSquareAction::Signature & params, const size_t& lwSize, const std::string& dtPlanar, const std::string& dtComplex,
const std::string &funcName, std::stringstream& transKernel, std::string& dtInput, std::string& dtOutput )
{
@@ -263,7 +263,7 @@ static clfftStatus genTransposePrototype( const FFTGeneratedTransposeInplaceActi
return CLFFT_SUCCESS;
}
-static clfftStatus genTransposeKernel( const FFTGeneratedTransposeInplaceAction::Signature & params, std::string& strKernel, const size_t& lwSize, const size_t reShapeFactor)
+static clfftStatus genTransposeKernel( const FFTGeneratedTransposeSquareAction::Signature & params, std::string& strKernel, const size_t& lwSize, const size_t reShapeFactor)
{
strKernel.reserve( 4096 );
std::stringstream transKernel( std::stringstream::out );
@@ -338,9 +338,9 @@ static clfftStatus genTransposeKernel( const FFTGeneratedTransposeInplaceAction:
std::string funcName;
if (params.fft_3StepTwiddle) // TODO
- funcName = fwd ? "transpose_Inplace_tw_fwd" : "transpose_Inplace_tw_back";
+ funcName = fwd ? "transpose_square_tw_fwd" : "transpose_square_tw_back";
else
- funcName = "transpose_Inplace";
+ funcName = "transpose_square";
// Generate kernel API
@@ -611,7 +611,7 @@ static clfftStatus genTransposeKernel( const FFTGeneratedTransposeInplaceAction:
}
-clfftStatus FFTGeneratedTransposeInplaceAction::initParams ()
+clfftStatus FFTGeneratedTransposeSquareAction::initParams ()
{
this->signature.fft_precision = this->plan->precision;
@@ -685,7 +685,7 @@ const size_t reShapeFactor = 2; // wgTileSize = { lwSize.x * reShapeFactor, lw
// OpenCL does not take unicode strings as input, so this routine returns only ASCII strings
// Feed this generator the FFTPlan, and it returns the generated program as a string
-clfftStatus FFTGeneratedTransposeInplaceAction::generateKernel ( FFTRepo& fftRepo, const cl_command_queue commQueueFFT )
+clfftStatus FFTGeneratedTransposeSquareAction::generateKernel ( FFTRepo& fftRepo, const cl_command_queue commQueueFFT )
{
@@ -702,23 +702,23 @@ 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_SQUARE, 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_SQUARE, this->getSignatureData(), "transpose_square_tw_fwd", "transpose_square_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_SQUARE, this->getSignatureData(), "transpose_square", "transpose_square", Device, QueueContext ), _T( "fftRepo.setProgramEntryPoint() failed!" ) );
}
return CLFFT_SUCCESS;
}
-clfftStatus FFTGeneratedTransposeInplaceAction::getWorkSizes( std::vector< size_t >& globalWS, std::vector< size_t >& localWS )
+clfftStatus FFTGeneratedTransposeSquareAction::getWorkSizes( std::vector< size_t >& globalWS, std::vector< size_t >& localWS )
{
#if 0
diff --git a/src/library/plan.cpp b/src/library/plan.cpp
index 96d5df8..55d0faf 100644
--- a/src/library/plan.cpp
+++ b/src/library/plan.cpp
@@ -239,7 +239,7 @@ std::string getKernelName(const clfftGenerators gen, const clfftPlanHandle plHan
{
case Stockham: generatorName = "Stockham"; break;
case Transpose_GCN: generatorName = "Transpose"; break;
- case Transpose_INPLACE: generatorName = "Transpose"; break;
+ case Transpose_SQUARE: generatorName = "Transpose"; break;
case Transpose_VLIW: generatorName = "Transpose"; break;
case Copy: generatorName = "Copy"; break;
}
@@ -649,7 +649,7 @@ clfftStatus clfftBakePlan( clfftPlanHandle plHandle, cl_uint numQueues, cl_comma
trans1Plan->outStride[1] = clLengths[1] + padding;
trans1Plan->iDist = fftPlan->iDist;
trans1Plan->oDist = clLengths[0] * trans1Plan->outStride[1];
- trans1Plan->gen = Transpose_INPLACE;
+ trans1Plan->gen = Transpose_GCN;
trans1Plan->transflag = true;
OPENCL_V(clfftBakePlan(fftPlan->planTX, numQueues, commQueueFFT, NULL, NULL ),
@@ -715,8 +715,8 @@ clfftStatus clfftBakePlan( clfftPlanHandle plHandle, cl_uint numQueues, cl_comma
trans2Plan->outStride[1] = clLengths[0] + padding;
trans2Plan->iDist = fftPlan->oDist;
trans2Plan->oDist = clLengths[1] * trans2Plan->outStride[1];
- trans2Plan->gen = Transpose_INPLACE;
- trans2Plan->large1D = fftPlan->length[0];
+ trans2Plan->gen = Transpose_GCN;
+ trans2Plan->large1D = fftPlan->length[0];
trans2Plan->transflag = true;
OPENCL_V(clfftBakePlan(fftPlan->planTY, numQueues, commQueueFFT, NULL, NULL ),
@@ -779,7 +779,7 @@ clfftStatus clfftBakePlan( clfftPlanHandle plHandle, cl_uint numQueues, cl_comma
trans3Plan->outStride[1] = clLengths[1];
trans3Plan->iDist = clLengths[1] * trans3Plan->inStride[1];
trans3Plan->oDist = fftPlan->oDist;
- trans3Plan->gen = Transpose_INPLACE;
+ trans3Plan->gen = Transpose_GCN;
trans3Plan->transflag = true;
trans3Plan->transOutHorizontal = true;
@@ -1747,8 +1747,8 @@ clfftStatus clfftBakePlan( clfftPlanHandle plHandle, cl_uint numQueues, cl_comma
clfftStatus err;
if(fftPlan->gen == Transpose_GCN)
fftPlan->action = new FFTGeneratedTransposeGCNAction(plHandle, fftPlan, *commQueueFFT, err);
- else if(fftPlan->gen == Transpose_INPLACE)
- fftPlan->action = new FFTGeneratedTransposeInplaceAction(plHandle, fftPlan, *commQueueFFT, err);
+ else if(fftPlan->gen == Transpose_SQUARE)
+ fftPlan->action = new FFTGeneratedTransposeSquareAction(plHandle, fftPlan, *commQueueFFT, err);
else
fftPlan->action = new FFTGeneratedTransposeVLIWAction(plHandle, fftPlan, *commQueueFFT, err);
OPENCL_V( err, "FFTGeneratedTransposeVLIWAction failed");
@@ -3963,7 +3963,7 @@ clfftStatus FFTPlan::GetMax1DLength (size_t *longest ) const
//No restriction for Transpose_VLIW kernel
case Transpose_VLIW: *longest = 4096; return CLFFT_SUCCESS;
case Transpose_GCN: *longest = 4096; return CLFFT_SUCCESS;
- case Transpose_INPLACE: *longest = 4096; return CLFFT_SUCCESS;
+ case Transpose_SQUARE: *longest = 4096; return CLFFT_SUCCESS;
case Copy: *longest = 4096; return CLFFT_SUCCESS;
default: assert(false); return CLFFT_NOTIMPLEMENTED;
}
--
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