File tree Expand file tree Collapse file tree 5 files changed +26
-18
lines changed Expand file tree Collapse file tree 5 files changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -25,18 +25,17 @@ THE SOFTWARE.
25
25
26
26
#if !defined(__HIPCC_RTC__ )
27
27
#include <hip/hip_common.h>
28
+ #if __cplusplus
29
+ #include <cstdlib>
30
+ #else
31
+ #include <stdlib.h> // size_t
32
+ #endif
28
33
#endif
29
34
30
35
#if !defined(__HIP_PLATFORM_AMD__ ) && defined(__HIP_PLATFORM_NVIDIA__ )
31
36
#include "driver_types.h"
32
37
#elif defined(__HIP_PLATFORM_AMD__ ) && !defined(__HIP_PLATFORM_NVIDIA__ )
33
38
34
- #if !defined(__HIPCC_RTC__ )
35
- #ifndef __cplusplus
36
- #include <stdbool.h>
37
- #endif
38
- #endif // !defined(__HIPCC_RTC__)
39
-
40
39
/**
41
40
* @defgroup DriverTypes Driver Types
42
41
* @{
Original file line number Diff line number Diff line change @@ -45,14 +45,13 @@ THE SOFTWARE.
45
45
// Some standard header files, these are included by hc.hpp and so want to make them avail on both
46
46
// paths to provide a consistent include env and avoid "missing symbol" errors that only appears
47
47
// on NVCC path:
48
+ #if __cplusplus
49
+ #include < cstdint>
50
+ #include < cstdlib>
51
+ #else
48
52
#include < stdint.h>
49
- #include < stdio.h>
50
53
#include < stdlib.h>
51
- #include < assert.h>
52
-
53
- #if __cplusplus > 199711L
54
- #include < thread>
55
- #endif
54
+ #endif // __cplusplus
56
55
#endif // !defined(__HIPCC_RTC__)
57
56
58
57
#include < hip/hip_version.h>
Original file line number Diff line number Diff line change @@ -30,7 +30,16 @@ THE SOFTWARE.
30
30
#ifndef HIP_INCLUDE_HIP_HIP_RUNTIME_API_H
31
31
#define HIP_INCLUDE_HIP_HIP_RUNTIME_API_H
32
32
33
- #include < string.h> // for getDeviceProp
33
+ #if __cplusplus
34
+ #include < climits>
35
+ #include < cstdint>
36
+ #include < cstdlib>
37
+ #else
38
+ #include < limits.h>
39
+ #include < stdint.h>
40
+ #include < stdlib.h>
41
+ #endif
42
+
34
43
#include < hip/hip_version.h>
35
44
#include < hip/hip_common.h>
36
45
#include < hip/linker_types.h>
@@ -568,8 +577,6 @@ enum hipGPUDirectRDMAWritesOrdering {
568
577
569
578
#if defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
570
579
571
- #include < stdint.h>
572
- #include < stddef.h>
573
580
#ifndef GENERIC_GRID_LAUNCH
574
581
#define GENERIC_GRID_LAUNCH 1
575
582
#endif
Original file line number Diff line number Diff line change @@ -28,12 +28,16 @@ THE SOFTWARE.
28
28
#include <hip/nvidia_detail/nvidia_hiprtc.h>
29
29
#elif defined(__HIP_PLATFORM_AMD__ ) && !defined(__HIP_PLATFORM_NVIDIA__ )
30
30
31
+ #ifdef __cplusplus
32
+ #include <cstdlib>
33
+ #else
34
+ #include <stdlib.h>
35
+ #endif
36
+
31
37
#ifdef __cplusplus
32
38
extern "C" {
33
39
#endif /* __cplusplus */
34
40
35
- #include <stdlib.h>
36
-
37
41
#if !defined(_WIN32 )
38
42
#pragma GCC visibility push(default)
39
43
#endif
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ THE SOFTWARE.
43
43
* *
44
44
*******************************************************************************/
45
45
#if !defined(__HIPCC_RTC__)
46
- #include < limits.h>
47
46
#include < hip/channel_descriptor.h>
48
47
#include < hip/driver_types.h>
49
48
#endif // !defined(__HIPCC_RTC__)
You can’t perform that action at this time.
0 commit comments