## Introduction

MtxVec is an object oriented vectorized math library, the core of Dew Lab Studio, featuring a comprehensive set of mathematical and statistical functions executing at impressive speeds (check the testimonies of some of our many customers ). Just a few of the MtxVec Version 5 features are:

- Use pure pascal (100% full source code) or high performance external dlls (for maximum speed on Windows OS). With FireMonkey use common source to compile your applications for Windows, Mac OS, iOS / iPhone and Android. The full source version is called MtxVec Core Edition.
- Supports a large set of compilers: Delphi 6 and 7, Delphi 2005, Delphi 2006, 2007 W32 and .NET, Delphi and C++Builder 2006, 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8,
*Seattle*(v10) and Berlin (v10.1). FireMonkey support requires at least XE8. - Optimized LAPACK v3.4.1 (Linear Algebra Package) numerical library.
- CPU specific optimized set of a wide range of numerical algorithms supporting: SSE2, SSE3, SSE4.2, AVX v1.0, AVX v2.0, AVX 512
- Vector processes streams of complex variables and complex numbers for higher speed
- Wide ranging multi-core support for many vector and matrix functions. Matrix multiply, FFT's, Sparse matrix solvers, SVD, EIG .. are internally threaded.
- Super conductive memory management allows linear scaling of numerical algorithms with number of cores when multithreading.
- Operator overloading support for vectors and matrices from including Delphi 2006 and C++Builder 2006.
- Vectorized math expression evaluator/scripter. User specified expressions can execute with on multiple CPU's.
- Includes Debugger Visualizer, a debugger plug-in for faster debugging of numerical algorithms.
- support for native 64bit execution for (Delphi).NET
- Various optimization and fitting algorithms allow solution to a large set of problems
- Support for 4GB address space for 32bit applications under 64bit OS and 3GB address space for 32bit OS. For more info how to enable this support for your project see here.
- 64bit compiler support for Embarcadero Delphi XE2 and later. 64bit compiler support Embarcadero C++Builder XE4 and later.
- Open CL object interface and Cougar Open CL numerical library.
- All functions, methods and components are optionally available in single and double precision concurrently in the same project. (Not included in trial version)

The secret behind our performance is called "code vectorization". We achieve substantial floating-point math performance improvements by exploiting the Streaming SIMD Extensions SSE2, SSE3 and SSE4 instruction sets. (SIMD: Single Instruction Multiple Data)

MtxVec makes extensive use of the Linear Algebra Package, which today is the de-facto standard for linear algebra and is free from www.netlib.org. Because this package is standard, different CPU makers provide performance-optimized versions to achieve maximum performance. Linear algebra routines are the bottleneck of many frequently used algorithms; therefore, this package is the part of the code that makes the most sense to optimize. MtxVec uses the version optimized for individual CPUs provided by Intel with their Math Kernel library.

Our library also makes extensive use of Intel Performance Primitives, which accelerate mainly the non-linear algebra based functions. The Intel Performance Primitives run on all Intel x86-compatible CPUs, old and new, but will achieve highest performance on the Intel Core architecture.

**What You Gain With MtxVec**

- Low-level math functions are wrapped in simple-to-use code primitives.
- Write Vector/Matrix expressions with the standard set of *,/,+- operators in D2006 and later.
- Best in class performance when evaluating Vector/Matrix expressions.
- All primitives have internal and automatic memory management. This frees you from a wide range of possible errors like: allocating insufficient memory, forgetting to free the memory, keeping too much memory allocated at the same time, and similar errors.
- Parameters are explicitly range checked before they are passed to the dll routines. This ensures that all internal dll calls are safe to use.
- When calling linear algebra routines, the software automatically compensates for the fact that in FORTRAN the matrices are stored by columns but in other languages are stored by rows.
- Many linear algebra functions take several parameters. The software automatically fills in most of the parameters, thus reducing the time to study each function extensively before you can use it.
- The software is organized into a set of "primitive" highly optimized functions covering all the basic math operations. All higher-level algorithms use these basic operations, in a way similar to how LAPACK uses the Basic Linear Algebra Subprograms (BLAS).
- Although some compilers support native SSE2/SSE3/SSE4/AVX instruction sets, the resulting code can never be as optimal as a hand-optimized version.
- Many linear algebra routines are multithreaded, including FFT's and sparse matrix solvers.
- All functions must pass very strict automated tests. These tests give the library the highest possible level of reliability, accuracy and error protection.
- When you write numerical algorithms, you will find the compactness and readability of code improves noticeably and you achieve significantly shorter development times.
- High performance expression parser/scripter that can work with vector and matrix variables.
- Debugger Visualizer for faster inspection of variable contents during debugging.

**How Fast is it Really?**

Most users observe typical performance improvements of 2x to 3x for vector functions, but speed increases up to 10x are often obtained. The matrix multiplication, for example, is up to 20x faster. For .NET applications, these factors should be multiplied by an additional improvement figure of about 1.3.

**Product features dependig on Delphi version:**

- operator overloading since Delphi 2006
- support for native 64bit execution for Delphi since Rad Studio XE2
- support for native 64bit execution for C++Builder since Rad Studio XE4
- fast function inlining for Delphi since Rad Studio XE6
- simplified syntax for arrays specified in code since Rad Studio XE7.

For a list of functions and the Release history, see the links in the right column.

More information about MtxVec math library for .NET users.