<cuda/std/cstring>#
2026-10-23
1 min read time
This page documents <cuda/std/cstring>, which provides the byte-wise memory functions cuda::std::memset and
cuda::std::memcpy for host and device code.
cuda::std::memset#
__host__ __device__
inline void* memset(void* dest, int ch, size_t count) noexcept;
See std::memset for the full documentation.
Preconditions
The following preconditions are only enabled with libhipcxx 3.4 or later:
destis a valid pointer.
dest + countis a valid pointer.
A valid pointer is one that is not NULL and within the correct range if it belongs to the shared memory address space.
cuda::std::memcpy#
__host__ __device__
inline void* memcpy(void* dest, const void* src, size_t count) noexcept;
See std::memcpy for the full documentation.
Preconditions
The following preconditions are only enabled with libhipcxx 3.4 or later:
srcis a valid pointer.
src + countis a valid pointer.
destis a valid pointer.
dest + countis a valid pointer.
srcanddestdon’t overlap.
A valid pointer is one that is not NULL and within the correct range if it belongs to the shared memory address space.