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
* Copyright UMC Utrecht and contributors
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef __cudaMacro_h
19
#define __cudaMacro_h
20
21
/* cuda version of some of the itk macros */
22
namespace
cuda
23
{
24
25
#define DBG_FUNC(NAME, PARAMETERS_DECLR, PARAMETERS_CALL) \
26
inline cudaError_t NAME PARAMETERS_DECLR { \
27
cudaError_t err = ::NAME PARAMETERS_CALL; \
28
cudaCheckMsg(#NAME" failed!"); \
29
return err; \
30
}
31
32
#define cudaGetConstMacro(name,type) \
33
virtual type Get##name () const { \
34
return this->m_##name; \
35
}
36
37
#define cudaSetMacro(name,type) \
38
virtual void Set##name (const type _arg) { \
39
if (this->m_##name != _arg) this->m_##name = _arg; \
40
}
41
42
#define cudaGetMacro(name,type) \
43
virtual type Get##name () { \
44
return this->m_##name; \
45
}
46
47
#define cudaBooleanMacro(name) \
48
virtual void name##On() { \
49
this->Set##name(true); \
50
} \
51
virtual void name##Off() { \
52
this->Set##name(false); \
53
}
54
55
};
/* namespace cuda */
56
57
#endif // end #ifndef __cudaMacro_h
58
cuda
Definition:
cudaInlineFunctions.h:27
Generated on 07-03-2016 for elastix by
1.8.11