-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.hpp
21 lines (18 loc) · 930 Bytes
/
utils.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <vector>
#include <stdexcept>
#include <iostream>
void brk() {}
#define CHECK_CUDA(call) \
do \
{ \
cudaError_t status = call; \
if (status != cudaSuccess) { \
std::cerr << "Error at " << __FILE__ << ":" << __LINE__ \
<< " - " << cudaGetErrorString(status) \
<< std::endl; \
brk(); \
std::exit(EXIT_FAILURE); \
} \
} \
while(false)