HIP: Heterogenous-computing Interface for Portability
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
hip
hip_common.h
1
/*
2
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
3
4
Permission is hereby granted, free of charge, to any person obtaining a copy
5
of this software and associated documentation files (the "Software"), to deal
6
in the Software without restriction, including without limitation the rights
7
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
copies of the Software, and to permit persons to whom the Software is
9
furnished to do so, subject to the following conditions:
10
11
The above copyright notice and this permission notice shall be included in
12
all copies or substantial portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
THE SOFTWARE.
21
*/
22
23
#pragma once
24
25
// Common code included at start of every hip file.
26
// Auto enable __HIP_PLATFORM_HCC__ if compiling with HCC
27
// Other compiler (GCC,ICC,etc) need to set one of these macros explicitly
28
#if defined(__HCC__)
29
#define __HIP_PLATFORM_HCC__
30
#define __HIPCC__
31
32
#if defined(__HCC_ACCELERATOR__) && (__HCC_ACCELERATOR__ != 0)
33
#define __HIP_DEVICE_COMPILE__ 1
34
#else
35
#define __HIP_DEVICE_COMPILE__ 0
36
#endif
37
#endif
38
39
// Auto enable __HIP_PLATFORM_NVCC__ if compiling with NVCC
40
#if defined(__NVCC__)
41
#define __HIP_PLATFORM_NVCC__
42
# ifdef __CUDACC__
43
# define __HIPCC__
44
# endif
45
46
#if defined(__CUDA_ARCH__) && (__CUDA_ARCH__ != 0)
47
#define __HIP_DEVICE_COMPILE__ 1
48
#else
49
#define __HIP_DEVICE_COMPILE__ 0
50
#endif
51
52
#endif
53
54
55
56
57
#if __HIP_DEVICE_COMPILE__ == 0
58
// 32-bit Atomics
59
#define __HIP_ARCH_HAS_GLOBAL_INT32_ATOMICS__ (0)
60
#define __HIP_ARCH_HAS_GLOBAL_FLOAT_ATOMIC_EXCH__ (0)
61
#define __HIP_ARCH_HAS_SHARED_INT32_ATOMICS__ (0)
62
#define __HIP_ARCH_HAS_SHARED_FLOAT_ATOMIC_EXCH__ (0)
63
#define __HIP_ARCH_HAS_FLOAT_ATOMIC_ADD__ (0)
64
65
// 64-bit Atomics
66
#define __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__ (0)
67
#define __HIP_ARCH_HAS_SHARED_INT64_ATOMICS__ (0)
68
69
// Doubles
70
#define __HIP_ARCH_HAS_DOUBLES__ (0)
71
72
// Warp cross-lane operations
73
#define __HIP_ARCH_HAS_WARP_VOTE__ (0)
74
#define __HIP_ARCH_HAS_WARP_BALLOT__ (0)
75
#define __HIP_ARCH_HAS_WARP_SHUFFLE__ (0)
76
#define __HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__ (0)
77
78
// Sync
79
#define __HIP_ARCH_HAS_THREAD_FENCE_SYSTEM__ (0)
80
#define __HIP_ARCH_HAS_SYNC_THREAD_EXT__ (0)
81
82
// Misc
83
#define __HIP_ARCH_HAS_SURFACE_FUNCS__ (0)
84
#define __HIP_ARCH_HAS_3DGRID__ (0)
85
#define __HIP_ARCH_HAS_DYNAMIC_PARALLEL__ (0)
86
#endif
Generated on Mon Dec 19 2016 04:03:43 for HIP: Heterogenous-computing Interface for Portability by
1.8.6