apply_access_property implementation doubt
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
### Discussed in https://github.com/NVIDIA/cccl/discussions/1125
Originally posted by **sicario001** November 19, 2023
The following [code snippet](https://github.com/NVIDIA/cccl/blob/61c328aee025a43045ed2f971ec3ec3fbd6bf695/libcudacxx/include/cuda/annotated_ptr#L150C1-L152C1) is part of the apply_access_property implementation. My concern is that doesn't this apply the evict_last property to addresses in multiples of **_LINE_SIZE*_LINE_SIZE = 128*128**? Shouldn't we actually do this in multiples of **_LINE_SIZE**? That would require replacing `__i += _LINE_SIZE` with `__i += 1`.
Please correct me if I am wrong if I am missing something.
Thanks
```
for (std::size_t __i = 0; __i < __end; __i += _LINE_SIZE) {
asm volatile ("prefetch.global.L2::evict_last [%0];" ::"l"(__p + (__i * _LINE_SIZE)) :);
}
```
Contributor guide
Assessment
This issue has not been assessed yet.