array
C++ library for multi-dimensional arrays
Public Types | Static Public Member Functions | List of all members
shape_traits< Shape > Class Template Reference

#include <array.h>

Public Types

using shape_type = Shape
 

Static Public Member Functions

template<class Fn >
static NDARRAY_HOST_DEVICE void for_each_index (const Shape &shape, Fn &&fn)
 
template<class Ptr , class Fn >
static NDARRAY_HOST_DEVICE void for_each_value (const Shape &shape, Ptr base, Fn &&fn)
 

Detailed Description

template<class Shape>
class nda::shape_traits< Shape >

Shape traits enable some behaviors to be customized per shape type.

Member Function Documentation

static NDARRAY_HOST_DEVICE void for_each_index ( const Shape &  shape,
Fn &&  fn 
)
inlinestatic

The for_each_index implementation for the shape may choose to iterate in a different order than the default (in-order).

static NDARRAY_HOST_DEVICE void for_each_value ( const Shape &  shape,
Ptr  base,
Fn &&  fn 
)
inlinestatic

The for_each_value implementation for the shape may be able to statically optimize shape. The default implementation optimizes the shape at runtime, and only attempts to convert the shape to a dense_shape.


The documentation for this class was generated from the following file: