PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
March 15, 20240 citationsOpen Access

On a vectorized basic linear algebra package for prototyping codes in MATLAB

View Full Paper
AMAlexej MoskovkaTRTalal RahmanJVJan Valdman

Key Points

Key points are not available for this paper at this time.

Abstract

When writing high-performance code for numerical computation in a scripting language like MATLAB, it is crucial to have the operations in a large for-loop vectorized. If not, the code becomes too slow to use, even for a moderately large problem. However, in the process of vectorizing, the code often loses its original structure and becomes less readable. This is particularly true in the case of a finite element implementation, even though finite element methods are inherently structured. A basic remedy to this is the separation of the vectorization part from the mathematics part of the code, which is easily achieved through building the code on top of the basic linear algebra subprograms that are already vectorized codes, an idea that has been used in a series of papers over the last fifteen years, developing codes that are fast and still structured and readable. We discuss the vectorized basic linear algebra package and introduce a formalism using multi-linear algebra to explain and define formally the functions in the package, as well as MATLAB pagetime functions. We provide examples from computations of varying complexity, including the computation of normal vectors, volumes, and finite element methods. Benchmarking shows that we also get fast computations. Using the library, we can write codes that closely follow our mathematical thinking, making writing, following, reusing, and extending the code easier.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Moskovka et al. (2024) studied this question.

synapsesocial.com/papers/68e73fd5b6db6435876b905chttps://doi.org/10.48550/arxiv.2404.16039
Ask AI
Helpful
Bookmark
Share
View Full Paper