Skip to content

Commit fb6c322

Browse files
committed
BugFix: SEATBELTS=off would not build.
1 parent c210658 commit fb6c322

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/flamegpu/runtime/utility/DeviceEnvironment.cuh

+7-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,12 @@ __device__ __forceinline__ ReadOnlyDeviceMacroProperty<T, I, J, K, W> ReadOnlyDe
102102
if (!d_ptr) {
103103
return ReadOnlyDeviceMacroProperty<T, I, J, K, W>(nullptr, nullptr);
104104
}
105-
#endif
106105
return ReadOnlyDeviceMacroProperty<T, I, J, K, W>(reinterpret_cast<T*>(d_ptr),
107106
reinterpret_cast<unsigned int*>(d_ptr + (I * J * K * W * sizeof(T)))); // Read-write flag resides in 8 bits at the end of the buffer
107+
#else
108+
109+
return ReadOnlyDeviceMacroProperty<T, I, J, K, W>(reinterpret_cast<T*>(d_ptr));
110+
#endif
108111
}
109112
template<typename T, unsigned int I, unsigned int J, unsigned int K, unsigned int W, unsigned int N>
110113
__device__ __forceinline__ DeviceMacroProperty<T, I, J, K, W> DeviceEnvironment::getMacroProperty(const char(&name)[N]) const {
@@ -113,9 +116,11 @@ __device__ __forceinline__ DeviceMacroProperty<T, I, J, K, W> DeviceEnvironment:
113116
if (!d_ptr) {
114117
return DeviceMacroProperty<T, I, J, K, W>(nullptr, nullptr);
115118
}
116-
#endif
117119
return DeviceMacroProperty<T, I, J, K, W>(reinterpret_cast<T*>(d_ptr),
118120
reinterpret_cast<unsigned int*>(d_ptr + (I * J * K * W * sizeof(T)))); // Read-write flag resides in 8 bits at the end of the buffer
121+
#else
122+
return DeviceMacroProperty<T, I, J, K, W>(reinterpret_cast<T*>(d_ptr));
123+
#endif
119124
}
120125
#endif // __CUDACC_RTC__
121126

0 commit comments

Comments
 (0)