From c5a64dccc034599486c6d46c1a4425d1c1c9e315 Mon Sep 17 00:00:00 2001 From: kradchen Date: Wed, 18 Dec 2024 17:53:22 +0800 Subject: [PATCH] feat: make thust support new version more simple --- src/Function1D.cu | 20 ++------------------ src/Function2D.cu | 5 +++-- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/Function1D.cu b/src/Function1D.cu index 57d3065..b648e4a 100644 --- a/src/Function1D.cu +++ b/src/Function1D.cu @@ -8,11 +8,11 @@ #include #include #include -#if THRUST_VERSION >= 200000 + +//this 3 header, only need by cuda version >= 12 #include #include #include -#endif #include #include @@ -55,22 +55,6 @@ __global__ void complexKernel(float *aInputRealData, float *aInputImagData, floa } } -#if THRUST_VERSION >= 200000 -template -void callThrustTransform(InputIterator aInput, OutputIterator aOutput, UnaryFunction aFunc){ - thrust::transform(aInput, aOutput, aFunc); -} -#else -template -void callThrustTransform(InputIterator aInput, OutputIterator aOutput, UnaryFunction aFunc){ - thrust::transform(thrust::device, aInput, aOutput, aFunc); -} -#endif - CudaMatrix Aurora::complex(const CudaMatrix &aMatrix) { diff --git a/src/Function2D.cu b/src/Function2D.cu index 3dcb6fa..553904b 100644 --- a/src/Function2D.cu +++ b/src/Function2D.cu @@ -11,10 +11,11 @@ #include #include -#if THRUST_VERSION >= 200000 + +//this 2 header, only need by cuda version >= 12 #include #include -#endif + #include #include #include