Load#

group thread_load

Enums

enum cache_load_modifier#

These enum values are used to specify caching behaviour on load.

Values:

enumerator load_default#

Default (no modifier)

enumerator load_ca#

Cache at all levels.

enumerator load_cg#

Cache at global level.

enumerator load_nontemporal#

Cache streaming (likely not to be accessed again after loading)

enumerator load_cv#

Cache as volatile (including cached system lines)

enumerator load_ldg#

Cache as texture.

enumerator load_volatile#

Volatile (any memory space)

enumerator load_cs#

Alias for load_nontemporal (will be deprecated in 7.0)

Functions

template<cache_load_modifier CacheLoadModifier = load_default, typename InputIteratorT>
__device__ inline std::iterator_traits<InputIteratorT>::value_type thread_load(InputIteratorT itr)#

Load data using the load instruction specified by CacheLoadModifier.

Template Parameters:
  • CacheLoadModifier – Value in enum for determine which type of cache store modifier to be used

  • InputIteratorT – Type of Output Iterator

Parameters:

itr – [in] Iterator to location where data is to be stored

Returns:

Data that is loaded from memory

template<cache_load_modifier CacheLoadModifier = load_default, typename T, size_t Alignment = alignof(T)>
__device__ inline std::enable_if_t<CacheLoadModifier == load_ca || CacheLoadModifier == load_default || CacheLoadModifier == load_ldg, T> thread_load(T *ptr)#

Load data using the default load instruction.

Template Parameters:
  • CacheLoadModifier – Value in enum for determine which type of cache store modifier to be used

  • T – Type of Data to be loaded

  • Alignment – Explicit alignment of the source data.

Parameters:

ptr – [in] Pointer to data to be loaded

Returns:

Data that is loaded from memory

template<int Count, cache_load_modifier CacheLoadModifier, typename T>
__device__ inline void unrolled_thread_load(T *src, T *dst)#

Load Count number of items from src to dst.

Template Parameters:
  • Count – number of items to load

  • CacheLoadModifier – the modifier used for the thread_load

  • T – Type of Data to be copied to

Parameters:
  • src – [in] Input iterator for data that will be loaded in

  • dst – [out] The pointer the data will be loaded to.