Skip to content

Commit

Permalink
Update Blade version to 1.0.5 and fix namespace in macros.hh. (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifcruz authored Feb 9, 2024
1 parent 0269e06 commit 5c1bb18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions include/blade/macros.hh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enum class Result : uint8_t {
if (val != cudaSuccess) { \
const char* err = cudaGetErrorString(val); \
callback(); \
return Result::CUDA_ERROR; \
return Blade::Result::CUDA_ERROR; \
} \
}
#endif
Expand All @@ -86,7 +86,7 @@ enum class Result : uint8_t {
if (val != cudaSuccess) { \
const char* err = cudaGetErrorString(val); \
callback(); \
throw Result::CUDA_ERROR; \
throw Blade::Result::CUDA_ERROR; \
} \
}
#endif
Expand All @@ -96,7 +96,7 @@ enum class Result : uint8_t {
cufftResult err = (x); \
if (err != CUFFT_SUCCESS) { \
callback(); \
return Result::CUDA_ERROR; \
return Blade::Result::CUDA_ERROR; \
} \
}
#endif
Expand All @@ -106,15 +106,15 @@ enum class Result : uint8_t {
cufftResult err = (x); \
if (err != CUFFT_SUCCESS) { \
callback(); \
throw Result::CUDA_ERROR; \
throw Blade::Result::CUDA_ERROR; \
} \
}
#endif

#ifndef BL_CHECK
#define BL_CHECK(x) { \
Result val = (x); \
if (val != Result::SUCCESS) { \
Blade::Result val = (x); \
if (val != Blade::Result::SUCCESS) { \
if (!(static_cast<uint8_t>(val) & (1 << 4))) { \
return val; \
} \
Expand All @@ -124,8 +124,8 @@ enum class Result : uint8_t {

#ifndef BL_CHECK_THROW
#define BL_CHECK_THROW(x) { \
Result val = (x); \
if (val != Result::SUCCESS) { \
Blade::Result val = (x); \
if (val != Blade::Result::SUCCESS) { \
if (!(static_cast<uint8_t>(val) & (1 << 4))) { \
printf("Function %s (%s@%d) throwed!\n", __func__, __FILE__, __LINE__); \
throw val; \
Expand All @@ -138,7 +138,7 @@ enum class Result : uint8_t {
#define BL_ASSERT(x) { \
bool val = (x); \
if (val != true) { \
return Result::ASSERTION_ERROR; \
return Blade::Result::ASSERTION_ERROR; \
} \
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'blade',
['cpp', 'c', 'cuda'],
version: '1.0.4',
version: '1.0.5',
default_options: [
'buildtype=release',
'cpp_std=c++20',
Expand Down

0 comments on commit 5c1bb18

Please sign in to comment.