Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
src
Common
CUDA
cudaMacro.h
Go to the documentation of this file.
1
/*======================================================================
2
3
This file is part of the elastix software.
4
5
Copyright (c) University Medical Center Utrecht. All rights reserved.
6
See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7
details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notices for more information.
12
13
======================================================================*/
14
#ifndef __cudaMacro_h
15
#define __cudaMacro_h
16
17
/* cuda version of some of the itk macros */
18
namespace
cuda
19
{
20
21
#define DBG_FUNC(NAME, PARAMETERS_DECLR, PARAMETERS_CALL) \
22
inline cudaError_t NAME PARAMETERS_DECLR { \
23
cudaError_t err = ::NAME PARAMETERS_CALL; \
24
cudaCheckMsg(#NAME" failed!"); \
25
return err; \
26
}
27
28
#define cudaGetConstMacro(name,type) \
29
virtual type Get##name () const { \
30
return this->m_##name; \
31
}
32
33
#define cudaSetMacro(name,type) \
34
virtual void Set##name (const type _arg) { \
35
if (this->m_##name != _arg) this->m_##name = _arg; \
36
}
37
38
#define cudaGetMacro(name,type) \
39
virtual type Get##name () { \
40
return this->m_##name; \
41
}
42
43
#define cudaBooleanMacro(name) \
44
virtual void name##On() { \
45
this->Set##name(true); \
46
} \
47
virtual void name##Off() { \
48
this->Set##name(false); \
49
}
50
51
};
/* namespace cuda */
52
53
#endif // end #ifndef __cudaMacro_h
54
Generated on 04-01-2014 for elastix by
1.8.5