host/tensor_fill.h File Reference
`#include <utility>`
`#include <cstdlib>`
`#include <cmath>`
`#include "cutlass/cutlass.h"`
`#include "cutlass/complex.h"`
`#include "cutlass/array.h"`
`#include "cutlass/numeric_types.h"`
`#include "cutlass/util/distribution.h"`
`#include "tensor_foreach.h"`
Include dependency graph for host/tensor_fill.h:

Go to the source code of this file.

## Classes

struct | cutlass::reference::host::detail::TensorFillFunc< Element, Layout >
| < Layout function More...
struct | cutlass::reference::host::detail::RandomGaussianFunc< Element >
struct | cutlass::reference::host::detail::RandomGaussianFunc< complex< Element > >
| Partial specialization for initializing a complex value. More...
struct | cutlass::reference::host::detail::TensorFillGaussianFunc< Element, Layout >
| Computes a random Gaussian distribution. More...
struct | cutlass::reference::host::detail::RandomUniformFunc< Element >
struct | cutlass::reference::host::detail::RandomUniformFunc< complex< Element > >
| Partial specialization for initializing a complex value. More...
struct | cutlass::reference::host::detail::TensorFillRandomUniformFunc< Element, Layout >
| Computes a random Gaussian distribution. More...
struct | cutlass::reference::host::detail::TensorFillDiagonalFunc< Element, Layout >
| < Layout function More...
struct | cutlass::reference::host::detail::TensorUpdateOffDiagonalFunc< Element, Layout >
| < Layout function More...
struct | cutlass::reference::host::detail::TensorFillLinearFunc< Element, Layout >
| < Layout function More...

## Namespaces

| cutlass
| cutlass::reference
| cutlass::reference::host
| cutlass::reference::host::detail
| Defines several helpers.

## Functions

template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFill (TensorView< Element, Layout > dst, Element val=Element(0))
| Fills a tensor with a uniform value. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFillRandomGaussian (TensorView< Element, Layout > dst, uint64_t seed, double mean=0, double stddev=1, int bits=-1)
| Fills a tensor with random values with a Gaussian distribution. More...
template<typename Element >
void | cutlass::reference::host::BlockFillRandomGaussian (Element *ptr, size_t capacity, uint64_t seed, double mean=0, double stddev=1, int bits=-1)
| Fills a tensor with random values with a Gaussian distribution. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFillRandomUniform (TensorView< Element, Layout > dst, uint64_t seed, double max=1, double min=0, int bits=-1)
| Fills a tensor with random values with a uniform random distribution. More...
template<typename Element >
void | cutlass::reference::host::BlockFillRandomUniform (Element *ptr, size_t capacity, uint64_t seed, double max=1, double min=0, int bits=-1)
| Fills a tensor with random values with a uniform random distribution. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFillDiagonal (TensorView< Element, Layout > dst, Element diag=Element(1), Element other=Element(0))
| Fills a tensor everywhere with a unique value for its diagonal. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFillIdentity (TensorView< Element, Layout > dst)
| Helper to fill a tensor's diagonal with 1 and 0 everywhere else. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorUpdateDiagonal (TensorView< Element, Layout > dst, Element val=Element(1))
| Writes a uniform value to the diagonal of a tensor without modifying off-diagonal elements. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorUpdateOffDiagonal (TensorView< Element, Layout > dst, Element other=Element(1))
| Writes a uniform value to all elements in the tensor without modifying diagonal elements. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFillLinear (TensorView< Element, Layout > dst, Array< Element, Layout::kRank > const &v, Element s=Element(0))
| Fills tensor with a linear combination of its coordinate and another vector. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorFillSequential (TensorView< Element, Layout > dst, Element s=Element(0))
| Fills tensor with a linear combination of its coordinate and another vector. More...
template<typename Element >
void | cutlass::reference::host::BlockFillSequential (Element *ptr, int64_t capacity, Element v=Element(1), Element s=Element(0))
| Fills a block of data with sequential elements. More...
template<typename Element >
void | cutlass::reference::host::BlockFillRandom (Element *ptr, size_t capacity, uint64_t seed, Distribution dist)
| Fills a block of data with sequential elements. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorCopyDiagonalIn (TensorView< Element, Layout > dst, Element const *ptr)
| Copies a diagonal in from host memory without modifying off-diagonal elements. More...
template<typename Element , typename Layout >
void | cutlass::reference::host::TensorCopyDiagonalOut (Element *ptr, TensorView< Element, Layout > src)
| Copies the diagonal of a tensor into a dense buffer in host memory. More...