TRIOT: Faster tensor manipulation in C++11

07/30/2016
by   Florian Heyl, et al.
0

[abridged] Context: Multidimensional arrays are used by many different algorithms. As such, indexing and broadcasting complex operations over multidimensional arrays are ubiquitous tasks and can be performance limiting. Inquiry: Simultaneously indexing two or more multidimensional arrays with different shapes (e.g., copying data from one tensor to another larger, zero padded tensor in anticipation of a convolution) is difficult to do efficiently: Hard-coded nested for loops in C, Fortran, and Go cannot be applied when the dimension of a tensor is unknown at compile time. Likewise, boost::multi_array cannot be used unless the dimensions of the array are known at compile time, and the style of implementation restricts the user from using the index tuple inside a vectorized operation (as would be required to compute an expected value of a multidimensional distribution). On the other hand, iteration methods that do not require the dimensionality or shape to be known at compile time (e.g., incrementing and applying carry operations to index tuples or remapping integer indices in the flat array), can be substantially slower than hard-coded nested for loops. ... Importance: Manipulation of multidimensional arrays is a common task in software, especially in high performance numerical methods. This paper proposes a novel way to leverage template recursion to iterate over and apply operations to multidimensional arrays, and then demonstrates the superior performance and flexibility of operations that can be achieved using this new approach.

READ FULL TEXT

page 3

page 7

page 8

page 9

page 11

page 12

page 14

page 19

research
08/31/2021

Hierarchical Bitmap Indexing for Range and Membership Queries on Multidimensional Arrays

Traditional indexing techniques commonly employed in da­ta­ba­se systems...
research
03/19/2023

Sparse Partial-Tracing

Matrices and more generally multidimensional arrays, form the backbone o...
research
08/03/2022

Multidimensional Costas Arrays and Their Periodicity

A novel higher-dimensional definition for Costas arrays is introduced. T...
research
03/11/2018

k-Error linear complexity for multidimensional arrays

In this paper, we focus on linear complexity measures of multidimensiona...
research
10/14/2020

Interpolation and Amalgamation for Arrays with MaxDiff (Extended Version)

In this paper, the theory of McCarthy's extensional arrays enriched with...
research
07/28/2022

Analysis and Computation of Multidimensional Linear Complexity of Periodic Arrays

Linear complexity is an important parameter for arrays that are used in ...
research
10/18/2017

Typesafe Abstractions for Tensor Operations

We propose a typesafe abstraction to tensors (i.e. multidimensional arra...

Please sign up or login with your details

Forgot password? Click here to reset