Bassoy, Cem Savas (2022) Iterator-Based Design of Generic C++ Algorithms for Basic Tensor Operations. Frontiers in Applied Mathematics and Statistics, 8. ISSN 2297-4687
pubmed-zip/versions/1/package-entries/fams-08-806537/fams-08-806537.pdf - Published Version
Download (989kB)
Abstract
Numerical tensor calculus has recently gained increasing attention in many scientific fields including quantum computing and machine learning which contain basic tensor operations such as the pointwise tensor addition and multiplication of tensors. We present a C++ design of multi-dimensional iterators and iterator-based C++ functions for basic tensor operations using mode-specific iterators only, simplifying the implementation of algorithms with recursion and multiple loops. The proposed C++ functions are designed for dense tensor and subtensor types with any linear storage format, mode and dimensions. We demonstrate our findings with Boost's latest uBlas tensor extension and discuss how other C++ frameworks can utilize our proposal without modifying their code base. Our runtime measurements show that C++ functions with iterators can compute tensor operations at least as fast as their pointer-based counterpart.
Item Type: | Article |
---|---|
Subjects: | Scholar Eprints > Mathematical Science |
Depositing User: | Managing Editor |
Date Deposited: | 23 Jan 2023 06:07 |
Last Modified: | 21 Oct 2024 04:04 |
URI: | http://repository.stmscientificarchives.com/id/eprint/937 |