Skip to content
Permalink
Browse files

Renamed CUDA error management macro to BLAZE_CUDA_ERROR_CHECK

  • Loading branch information
JPenuchot committed Nov 18, 2019
1 parent 35ca5ec commit 0b85a83d33534840e0dd0fa2b5fd2aafdea15dc6
@@ -98,7 +98,7 @@ auto cudaAssign( DenseMatrix<MT1,SO1>& lhs, const DenseMatrix<MT2,SO2>& rhs, OP
for( auto i = size_t( 0 ); i < (~lhs).rows(); i++ ) {
cuda_transform( (~lhs).begin(i), (~lhs).end(i), (~rhs).begin(i), (~lhs).begin(i), op );
}
CUDA_ERROR_CHECK;
BLAZE_CUDA_ERROR_CHECK;
}
/*! \endcond */
//*************************************************************************************************
@@ -451,7 +451,7 @@ inline auto smpMultAssign( DenseMatrix<MT1,SO1>& lhs, const DenseMatrix<MT2,SO2>
/*! \cond BLAZE_INTERNAL */
namespace {

BLAZE_STATIC_ASSERT( BLAZE_CUDA_MODE );
//BLAZE_STATIC_ASSERT( BLAZE_CUDA_MODE );

}
/*! \endcond */
@@ -97,7 +97,7 @@ inline void cudaAssign( DenseVector<VT1,TF1>& lhs, const DenseVector<VT2,TF2>& r

cuda_transform( (~lhs).begin(), (~lhs).end(), (~rhs).begin(), (~lhs).begin(), op );

CUDA_ERROR_CHECK;
BLAZE_CUDA_ERROR_CHECK;
}
/*! \endcond */
//*************************************************************************************************
@@ -403,7 +403,7 @@ inline auto smpDivAssign( DenseVector<VT1,TF1>& lhs, const DenseVector<VT2,TF2>&
/*! \cond BLAZE_INTERNAL */
namespace {

BLAZE_STATIC_ASSERT( BLAZE_CUDA_MODE );
//BLAZE_STATIC_ASSERT( BLAZE_CUDA_MODE );

}
/*! \endcond */
@@ -516,7 +516,7 @@ inline CUDADynamicVector<Type,TF>::CUDADynamicVector( size_t n, const Type& init
} );

cudaDeviceSynchronize();
CUDA_ERROR_CHECK;
BLAZE_CUDA_ERROR_CHECK;

BLAZE_INTERNAL_ASSERT( isIntact(), "Invariant violation detected" );
}
@@ -40,7 +40,7 @@

#include <cuda_runtime.h>

#define CUDA_ERROR_CHECK \
#define BLAZE_CUDA_ERROR_CHECK \
if( auto err = cudaGetLastError(); err != cudaSuccess ) \
{ \
std::stringstream ss; \
@@ -178,7 +178,7 @@ inline auto cuda_reduce
( store_vec.begin(), &res, init, binop );

cudaDeviceSynchronize();
CUDA_ERROR_CHECK;
BLAZE_CUDA_ERROR_CHECK;

return res;
}

0 comments on commit 0b85a83

Please sign in to comment.
You can’t perform that action at this time.