HIP: Heterogenous-computing Interface for Portability
hip_ldg.h
1 /*
2 Copyright (c) 2015 - present 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 #ifndef HIP_INCLUDE_HIP_HCC_DETAIL_HIP_LDG_H
24 #define HIP_INCLUDE_HIP_HCC_DETAIL_HIP_LDG_H
25 
26 #if defined __HCC__
27 #if __hcc_workweek__ >= 16164
28 #include "hip_vector_types.h"
29 #include "host_defines.h"
30 
31 __device__ char __ldg(const char* );
32 __device__ char2 __ldg(const char2* );
33 __device__ char4 __ldg(const char4* );
34 __device__ signed char __ldg(const signed char* );
35 __device__ unsigned char __ldg(const unsigned char* );
36 
37 __device__ short __ldg(const short* );
38 __device__ short2 __ldg(const short2* );
39 __device__ short4 __ldg(const short4* );
40 __device__ unsigned short __ldg(const unsigned short* );
41 
42 __device__ int __ldg(const int* );
43 __device__ int2 __ldg(const int2* );
44 __device__ int4 __ldg(const int4* );
45 __device__ unsigned int __ldg(const unsigned int* );
46 
47 
48 __device__ long __ldg(const long* );
49 __device__ unsigned long __ldg(const unsigned long* );
50 
51 __device__ long long __ldg(const long long* );
52 __device__ longlong2 __ldg(const longlong2* );
53 __device__ unsigned long long __ldg(const unsigned long long* );
54 
55 __device__ uchar2 __ldg(const uchar2* );
56 __device__ uchar4 __ldg(const uchar4* );
57 
58 __device__ ushort2 __ldg(const ushort2* );
59 
60 __device__ uint2 __ldg(const uint2* );
61 __device__ uint4 __ldg(const uint4* );
62 
63 __device__ ulonglong2 __ldg(const ulonglong2* );
64 
65 __device__ float __ldg(const float* );
66 __device__ float2 __ldg(const float2* );
67 __device__ float4 __ldg(const float4* );
68 
69 __device__ double __ldg(const double* );
70 __device__ double2 __ldg(const double2* );
71 
72 #endif // __hcc_workweek__
73 
74 #endif // __HCC__
75 
76 #endif // HIP_LDG_H
Definition: hip_vector_types.h:643
Definition: hip_vector_types.h:1069
Definition: hip_vector_types.h:984
TODO-doc.
Definition: hip_vector_types.h:558
Definition: hip_vector_types.h:729
Definition: hip_vector_types.h:189
Definition: hip_vector_types.h:685
Definition: hip_vector_types.h:600
Definition: hip_vector_types.h:94
Definition: hip_vector_types.h:284
Definition: hip_vector_types.h:235
Definition: hip_vector_types.h:474
Definition: hip_vector_types.h:378
Definition: hip_vector_types.h:141
Definition: hip_vector_types.h:516
Definition: hip_vector_types.h:426