[clfft] 52/128: Precallback - fix client compile error

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Oct 22 14:54:37 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 6dbd399b7456236b36cafa06a587b6e3d3f25de5
Author: pradeeptrgit <pradeep.rao at amd.com>
Date:   Tue Sep 1 16:10:47 2015 +0530

    Precallback - fix client compile error
---
 src/callback-client/callback-client.cpp | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/callback-client/callback-client.cpp b/src/callback-client/callback-client.cpp
index f4cc982..357983b 100644
--- a/src/callback-client/callback-client.cpp
+++ b/src/callback-client/callback-client.cpp
@@ -60,7 +60,13 @@ fftwf_complex* get_fftwf_output(size_t* lengths, size_t fftBatchSize, int batch_
 								clfftDim dim, clfftDirection dir);
 template < typename T1, typename T2>
 bool compare(T1 *refData, std::vector< std::complex< T2 > > data,
-             size_t length, const float epsilon);
+             size_t length, const float epsilon = 1e-6f);
+
+template < typename T >
+void runPrecallbackFFT(std::auto_ptr< clfftSetupData > setupData, cl_context context, cl_command_queue commandQueue, size_t* inlengths, clfftDim dim, clfftPrecision precision, size_t batchSize, size_t vectorLength, size_t fftLength, cl_uint profile_count);
+
+template < typename T >
+void runPreprocessKernelFFT(std::auto_ptr< clfftSetupData > setupData, cl_context context, cl_command_queue commandQueue, cl_device_id device_id, size_t* inlengths, clfftDim dim, clfftPrecision precision, size_t batchSize, size_t vectorLength, size_t fftLength, cl_uint profile_count);
 
 int main(int argc, char **argv)
 {
@@ -173,10 +179,13 @@ void C2C_transform(std::auto_ptr< clfftSetupData > setupData, size_t* inlengths,
     OPENCL_V_THROW( status, "Creating Command Queue ( ::clCreateCommandQueue() )" );
 
 	//Run clFFT with seaparate Pre-process Kernel
-	runPreprocessKernelFFT<T>(setupData, context, commandQueue, device_id[0], inlengths, dim, precision, batchSize, vectorLength, fftLength, profile_count);
+	if (precision == CLFFT_SINGLE)
+	{
+	runPreprocessKernelFFT<float>(setupData, context, commandQueue, device_id[0], inlengths, dim, precision, batchSize, vectorLength, fftLength, profile_count);
 
 	//Run clFFT using pre-callback 
-	runPrecallbackFFT<T>(setupData, context, commandQueue, inlengths, dim, precision, batchSize, vectorLength, fftLength, profile_count);
+	runPrecallbackFFT<float>(setupData, context, commandQueue, inlengths, dim, precision, batchSize, vectorLength, fftLength, profile_count);
+	}
 
 	OPENCL_V_THROW( clReleaseCommandQueue( commandQueue ), "Error: In clReleaseCommandQueue\n" );
     OPENCL_V_THROW( clReleaseContext( context ), "Error: In clReleaseContext\n" );
@@ -582,7 +591,7 @@ void runPreprocessKernelFFT(std::auto_ptr< clfftSetupData > setupData, cl_contex
 //Compare reference and opencl output 
 template < typename T1, typename T2>
 bool compare(T1 *refData, std::vector< std::complex< T2 > > data,
-             size_t length, const float epsilon = 1e-6f)
+             size_t length, const float epsilon)
 {
     float error = 0.0f;
     T1 ref;

-- 
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