Skip to content

Commit

Permalink
Missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMathieu committed Mar 25, 2014
1 parent 9911e0c commit 6b26e5e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions bin/linux_64/cuda/THCudaTensor.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#ifndef __OVERFEAT_THCUDATENSOR_HPP__
#define __OVERFEAT_THCUDATENSOR_HPP__

#include "THC.h"
//#include "TH.h"

#define CUDA_CHECK(a) \
{ \
cudaError_t status = (a); \
if (status != cudaSuccess) { \
std::cerr << "Error file " << __FILE__ << \
" line " << __LINE__ << std::endl; \
std::cerr << cudaGetErrorString(status) << std::endl; \
exit(0); \
} \
}

#define CUDA_LOOK_FOR_ERROR() \
{ \
cudaError_t err; \
if ((err = cudaGetLastError()) != cudaSuccess) { \
std::cerr << "Error in file " << __FILE__ << \
" before line " << __LINE__ << \
" : " << cudaGetErrorString(err) << std::endl; \
exit(0); \
} \
}


#endif

0 comments on commit 6b26e5e

Please sign in to comment.