Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_compat_cpu.h
| Show All 36 Lines | |||||
| #include "util/util_debug.h" | #include "util/util_debug.h" | ||||
| #include "util/util_math.h" | #include "util/util_math.h" | ||||
| #include "util/util_simd.h" | #include "util/util_simd.h" | ||||
| #include "util/util_half.h" | #include "util/util_half.h" | ||||
| #include "util/util_types.h" | #include "util/util_types.h" | ||||
| #include "util/util_texture.h" | #include "util/util_texture.h" | ||||
| #define ccl_readonly_ptr const * __restrict | |||||
brecht: Can we rename this to `ccl_restrict_ptr`? I think this has a specific meaning and "readonly"… | |||||
| #define ccl_addr_space | #define ccl_addr_space | ||||
| #define ccl_local_id(d) 0 | #define ccl_local_id(d) 0 | ||||
| #define ccl_global_id(d) (kg->global_id[d]) | #define ccl_global_id(d) (kg->global_id[d]) | ||||
| #define ccl_local_size(d) 1 | #define ccl_local_size(d) 1 | ||||
| #define ccl_global_size(d) (kg->global_size[d]) | #define ccl_global_size(d) (kg->global_size[d]) | ||||
| ▲ Show 20 Lines • Show All 551 Lines • Show Last 20 Lines | |||||
Can we rename this to ccl_restrict_ptr? I think this has a specific meaning and "readonly" doesn't quite cover it.
I'm curious if you measured any performance improvements from using restrict? Every time I try it, it doesn't seem to help, but maybe because we already try to write code to avoid reading from the same memory location multiple times.