Temporary transpose storage class, used during tensor-tensor products. More...
#include <dense_prod_tmp_transpose_storage.h>
Public Types | |
using | EntryA = std::pair< DenseTensor< rank_a, Scalar >, std::array< int, rank_a > > |
Type of entries for tensor A, a pair of the transposed tensor and transposed array of the correct size. More... | |
using | EntryB = std::pair< DenseTensor< rank_b, Scalar >, std::array< int, rank_b > > |
Type of entries for tensor B, a pair of the transposed tensor and the transposed array of the correct size. More... | |
Public Attributes | |
std::unordered_map< DenseTensor< rank_a, Scalar > const *, EntryA * > | map_a |
Map for tensor A, mapping input dense tensor locations (by their address) to entries in the storage vector. More... | |
std::unordered_map< DenseTensor< rank_b, Scalar > const *, EntryB * > | map_b |
Map for tensor B, mapping input dense tensor locations (by their address) to entries in the storage vector. More... | |
std::mutex | mtx_a |
Mutex protecting map_a and storage_a . More... | |
std::mutex | mtx_b |
Mutex protecting map_b and storage_b . More... | |
std::vector< EntryA > | storage_a |
Storage vector for tensor A. More... | |
std::vector< EntryB > | storage_b |
Storage vector for tensor B. More... | |
Temporary transpose storage class, used during tensor-tensor products.
After creation, make sure to reserve sufficient space in the storage vectors that no reallocation has to take place.