Classes | Macros | Functions
cxx11_tensor_block_access.cpp File Reference
#include "main.h"
#include <algorithm>
#include <set>
#include <Eigen/CXX11/Tensor>
Include dependency graph for cxx11_tensor_block_access.cpp:

Go to the source code of this file.

Classes

class  EqualityChecker< Scalar, StorageIndex, Dim >
 

Macros

#define TEST_LAYOUTS(NAME)
 
#define TEST_LAYOUTS_AND_DIMS(TYPE, NAME)
 
#define TEST_LAYOUTS_WITH_ARG(NAME, ARG)
 

Functions

template<typename T >
static const Tchoose (int layout, const T &col, const T &row)
 
template<int Layout, int NumDims>
static array< Index, NumDims > ComputeStrides (const array< Index, NumDims > &sizes)
 
template<int NumDims>
static void Debug (DSizes< Index, NumDims > dims)
 
 EIGEN_DECLARE_TEST (cxx11_tensor_block_access)
 
template<typename T >
static TGenerateRandomData (const Index &size)
 
template<int Layout, int NumDims>
static Index GetInputIndex (Index output_index, const array< Index, NumDims > &output_to_input_dim_map, const array< Index, NumDims > &input_strides, const array< Index, NumDims > &output_strides)
 
template<int NumDims>
static DSizes< Index, NumDims > RandomDims ()
 
static TensorBlockShapeType RandomShape ()
 
template<int NumDims>
static size_t RandomTargetSize (const DSizes< Index, NumDims > &dims)
 
template<typename T , int NumDims, int Layout>
static void test_block_mapper_maps_every_element ()
 
template<int Layout>
static void test_block_mapper_sanity ()
 
template<int Layout>
static void test_empty_dims (const internal::TensorBlockShapeType block_shape)
 
template<int Layout>
static void test_skewed_inner_dim_block_shape ()
 
template<int Layout>
static void test_uniform_block_shape ()
 
template<int NumDims, int Layout>
static void UpdateCoeffSet (const DSizes< Index, NumDims > &tensor_strides, const internal::TensorBlockDescriptor< NumDims > &block, Index first_coeff_index, int dim_index, std::set< Index > *visited_coeffs)
 
static TensorOpCost zeroCost ()
 

Macro Definition Documentation

◆ TEST_LAYOUTS

#define TEST_LAYOUTS (   NAME)
Value:
CALL_SUBTEST(NAME<ColMajor>()); \
CALL_SUBTEST(NAME<RowMajor>())
#define CALL_SUBTEST(FUNC)
Definition: main.h:399

Definition at line 546 of file cxx11_tensor_block_access.cpp.

◆ TEST_LAYOUTS_AND_DIMS

#define TEST_LAYOUTS_AND_DIMS (   TYPE,
  NAME 
)
Value:
CALL_SUBTEST((NAME<TYPE, 1, ColMajor>())); \
CALL_SUBTEST((NAME<TYPE, 1, RowMajor>())); \
CALL_SUBTEST((NAME<TYPE, 2, ColMajor>())); \
CALL_SUBTEST((NAME<TYPE, 2, RowMajor>())); \
CALL_SUBTEST((NAME<TYPE, 3, ColMajor>())); \
CALL_SUBTEST((NAME<TYPE, 3, RowMajor>())); \
CALL_SUBTEST((NAME<TYPE, 4, ColMajor>())); \
CALL_SUBTEST((NAME<TYPE, 4, RowMajor>())); \
CALL_SUBTEST((NAME<TYPE, 5, ColMajor>())); \
CALL_SUBTEST((NAME<TYPE, 5, RowMajor>()))
#define CALL_SUBTEST(FUNC)
Definition: main.h:399

Definition at line 550 of file cxx11_tensor_block_access.cpp.

◆ TEST_LAYOUTS_WITH_ARG

#define TEST_LAYOUTS_WITH_ARG (   NAME,
  ARG 
)
Value:
CALL_SUBTEST(NAME<ColMajor>(ARG)); \
CALL_SUBTEST(NAME<RowMajor>(ARG))
#define CALL_SUBTEST(FUNC)
Definition: main.h:399

Definition at line 562 of file cxx11_tensor_block_access.cpp.

Function Documentation

◆ choose()

template<typename T >
static const T& choose ( int  layout,
const T col,
const T row 
)
static

Definition at line 27 of file cxx11_tensor_block_access.cpp.

◆ ComputeStrides()

template<int Layout, int NumDims>
static array<Index, NumDims> ComputeStrides ( const array< Index, NumDims > &  sizes)
static

Definition at line 178 of file cxx11_tensor_block_access.cpp.

◆ Debug()

template<int NumDims>
static void Debug ( DSizes< Index, NumDims >  dims)
static

Definition at line 61 of file cxx11_tensor_block_access.cpp.

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( cxx11_tensor_block_access  )

Definition at line 566 of file cxx11_tensor_block_access.cpp.

◆ GenerateRandomData()

template<typename T >
static T* GenerateRandomData ( const Index size)
static

Definition at line 52 of file cxx11_tensor_block_access.cpp.

◆ GetInputIndex()

template<int Layout, int NumDims>
static Index GetInputIndex ( Index  output_index,
const array< Index, NumDims > &  output_to_input_dim_map,
const array< Index, NumDims > &  input_strides,
const array< Index, NumDims > &  output_strides 
)
static

Definition at line 153 of file cxx11_tensor_block_access.cpp.

◆ RandomDims()

template<int NumDims>
static DSizes<Index, NumDims> RandomDims ( )
static

Definition at line 43 of file cxx11_tensor_block_access.cpp.

◆ RandomShape()

static TensorBlockShapeType RandomShape ( )
static

Definition at line 31 of file cxx11_tensor_block_access.cpp.

◆ RandomTargetSize()

template<int NumDims>
static size_t RandomTargetSize ( const DSizes< Index, NumDims > &  dims)
static

Definition at line 38 of file cxx11_tensor_block_access.cpp.

◆ test_block_mapper_maps_every_element()

template<typename T , int NumDims, int Layout>
static void test_block_mapper_maps_every_element ( )
static

Definition at line 124 of file cxx11_tensor_block_access.cpp.

◆ test_block_mapper_sanity()

template<int Layout>
static void test_block_mapper_sanity ( )
static

Definition at line 69 of file cxx11_tensor_block_access.cpp.

◆ test_empty_dims()

template<int Layout>
static void test_empty_dims ( const internal::TensorBlockShapeType  block_shape)
static

Definition at line 508 of file cxx11_tensor_block_access.cpp.

◆ test_skewed_inner_dim_block_shape()

template<int Layout>
static void test_skewed_inner_dim_block_shape ( )
static

Definition at line 356 of file cxx11_tensor_block_access.cpp.

◆ test_uniform_block_shape()

template<int Layout>
static void test_uniform_block_shape ( )
static

Definition at line 229 of file cxx11_tensor_block_access.cpp.

◆ UpdateCoeffSet()

template<int NumDims, int Layout>
static void UpdateCoeffSet ( const DSizes< Index, NumDims > &  tensor_strides,
const internal::TensorBlockDescriptor< NumDims > &  block,
Index  first_coeff_index,
int  dim_index,
std::set< Index > *  visited_coeffs 
)
static

Definition at line 103 of file cxx11_tensor_block_access.cpp.

◆ zeroCost()

static TensorOpCost zeroCost ( )
static

Definition at line 24 of file cxx11_tensor_block_access.cpp.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:48