-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rawtodigi implementation using the Cupla backend
- Loading branch information
Showing
8 changed files
with
713 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef HeterogeneousCore_CUDAUtilities_cuplaCheck_h | ||
#define HeterogeneousCore_CUDAUtilities_cuplaCheck_h | ||
|
||
#include <iostream> | ||
|
||
/* Do NOT include other headers that use CUDA runtime functions or variables | ||
* (see above) before this include. | ||
* The reason for this is that cupla renames CUDA host functions and device build in | ||
* variables by using macros and macro functions. | ||
* Do NOT include other specific includes such as `<cuda.h>` (driver functions, | ||
* etc.). | ||
*/ | ||
#include <cuda_to_cupla.hpp> | ||
|
||
inline | ||
bool cuplaCheck_(const char* file, int line, const char* cmd, cuplaError_t result) | ||
{ | ||
//std::cerr << file << ", line " << line << ": " << cmd << std::endl; | ||
if (result == cuplaSuccess) | ||
return true; | ||
|
||
const char* message = cuplaGetErrorString(result); | ||
std::cerr << file << ", line " << line << ": " << message << std::endl; | ||
abort(); | ||
return false; | ||
} | ||
|
||
#define cuplaCheck(ARG) (cuplaCheck_(__FILE__, __LINE__, #ARG, (ARG))) | ||
|
||
#endif // HeterogeneousCore_CUDAUtilities_cuplaCheck_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.