TGSTK
0.0.1
The Tumour Growth Simulation ToolKit
tgstkCUDACommon.h
Go to the documentation of this file.
1
/*==========================================================================
2
3
This file is part of the Tumor Growth Simulation ToolKit (TGSTK)
4
(<https://github.com/cormarte/TGSTK>, <https://cormarte.github.io/TGSTK>).
5
6
Copyright (C) 2021 Corentin Martens
7
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21
Contact: corentin.martens@ulb.be
22
23
==========================================================================*/
24
25
#ifndef TGSTKCUDACOMMON_H
26
#define TGSTKCUDACOMMON_H
27
28
#include <stdio.h>
29
30
#define CUDA_CHECK(call) { \
31
\
32
const cudaError_t error = call; \
33
\
34
if (error != cudaSuccess) { \
35
\
36
fprintf(stderr, "Error: %s:%d, ", __FILE__, __LINE__); \
37
fprintf(stderr, "Code: %d, reason: %s\n", error, cudaGetErrorString(error)); \
38
} \
39
}
40
41
#endif // TGSTKCUDACOMMON_H
src
tgstk
cuda
tgstkCUDACommon.h
Generated by
1.8.17