GeneratorTensor_Sequential< T, Dim > Struct Template Reference

GeneratorTensor_Sequential&lt; T, Dim &gt; Struct Template Reference#

Composable Kernel: GeneratorTensor_Sequential< T, Dim > Struct Template Reference
GeneratorTensor_Sequential< T, Dim > Struct Template Reference

Is used to generate sequential values based on the specified dimension. More...

#include <host_tensor_generator.hpp>

Public Member Functions

template<typename... Ts>
operator() (Ts... Xs) const
 

Detailed Description

template<typename T, ck::index_t Dim>
struct GeneratorTensor_Sequential< T, Dim >

Is used to generate sequential values based on the specified dimension.

Template Parameters
TThe type of the tensor values.
DimThe specific dimension used for generation.

GeneratorTensor_Sequential<1>{} will generate the following values for a 3x3 tensor:

0 1 2 0 1 2 0 1 2

Essentially, the values generated are logical coordinates of the generated element that correspond to dimension Dim. E.g. for 2-dimensional tensor and Dim=1, the values are the column indices.

Member Function Documentation

◆ operator()()

template<typename T , ck::index_t Dim>
template<typename... Ts>
T GeneratorTensor_Sequential< T, Dim >::operator() ( Ts...  Xs) const
inline

The documentation for this struct was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/develop/include/ck/library/utility/host_tensor_generator.hpp