NVIDIA / NVIDIA/cccl

`cub::ThreadStore` reinterprets non-trivially copyable types

Open
#7,417 0 comments 0 reactions 1 assignee Claimed by @bernhardmgruber View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

When `cub::ThreadStore` is used to store a `T` that is not trivially copyable, the value to be stored is still reinterpret-casted and stored using as many device words as needed. This violates the type requirements on `T`. We should probably add a fallback that performs an ordinary store if `T` is not trivially copyable.

This occurred when working on #6811 for the type `custom_output_t` in test `catch2_test_device_scan_iterators.cu`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.