Skip to content

Commit 1ff0cdd

Browse files
authored
Merge pull request #1970 from CEED/zach/rocm-7-fix-pt2
hip(compile) - add definition of NULL for user codes
2 parents 321138d + fa6a3a8 commit 1ff0cdd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

backends/hip/ceed-hip-compile.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ static int CeedCompileCore_Hip(Ceed ceed, const char *source, const char *name,
127127
code << "#define HIP_DYNAMIC_SHARED(type, var) extern __shared__ type var[];\n\n";
128128
} else {
129129
// ROCm 7 removed stddef header, so we use the internal HIP types
130+
code << "#define NULL nullptr\n";
130131
code << "using __hip_internal::int32_t;\n";
131132
code << "using __hip_internal::int64_t;\n";
132133
// With ROCm 4.5+, need to include these definitions specifically for hiprtc (but cannot include the runtime header)

0 commit comments

Comments
 (0)