Linux Assemblycollection of fast libraries

Common C/C++ Libraries

Data types

LinAsm libraries define their own data types. They are separated into two categories: scalar and vector data types. Scalar types are just aliases to internal C and C++ types and have the same length and operations set. Vector types are custom types, which use gcc aggregates to hold vectors. LinAsm also define union types which can hold both types simultaneously. They are useful when you apply vector operations to the data, but also need to extract some elements of target vectors.

Angle library

Angle library converts angle values between different popular units: degrees, radians and gradians. All functions in this library are implemented as inline functions, and can do angle conversion very fast. They are useful to change angle representation format in programs.

Approximation library

The need for function approximations arises in many branches of applied mathematics, and computer science in particular. In general, a function approximation problem asks us to select a function among a well-defined class that closely matches a target function in a task-specific way. In mathematics, the idea of least squares can be applied to approximating a given function by a weighted sum of other functions. The best approximation can be defined as that which minimises the difference between the original function and the approximation; for a least-squares approach the quality of the approximation is measured in terms of the squared differences between the two.

Array library

Array manipulations are core functions of many popular algorithms: linear and binary searching, sorting keys and mathematical operations to vectors. If these operations can be optimized in many times, then all programs that use them can process data much faster. And responsibility of whole system will grow up.

Array library provides very fast and optimized routines to work with integer and floating-point arrays. It uses SIMD extension of modern x86-64 processors to accelerate data manipulations. Cache prefetch and hint instructions speed up memory operations and improve total speed of algorithms, especially for very big arrays.

Complex library

Complex numbers extend the concept of the one-dimensional number line to the two-dimensional complex plane (also called Argand plane) by using the horizontal axis for the real part and the vertical axis for the imaginary part. The complex number re + im * i can be identified with the point (re, im) in the complex plane. A complex number whose real part is zero is said to be purely imaginary, whereas a complex number whose imaginary part is zero is a real number. In this way, the complex numbers contain the ordinary real numbers while extending them in order to solve problems that cannot be solved with real numbers alone.

FPU library

FPU library was designed to allow C/C++ programs to communicate with FPU directly via simple interface, to get its status, and change unit work mode. This is common routine for any mathematics and computation algorithms. But "C" and "C++" language just provide very abstract paradigm how programs should operate with hardware units. It is because of portability of both languages. But if we need high speed calculation, we also need to operate with hardware units as close as it is possible. That is why such programs require some kind of interface functions to manipulate with hardware units state and change working mode.

Math library

Math library declares a set of functions to compute common mathematical operations and transformations. They may replace and extend standard math functions from C library, and provide extra operations for specific mathematical algorithms. It is optimized for x86-64 Linux systems and much faster that standard GNU lib C functions.

Matrix library

In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns, that is treated in certain prescribed ways. The individual items in a matrix are called its elements or entries. A major application of matrices is to represent linear transformations. For example, the rotation of vectors in three dimensional space is a linear transformation which can be represented by a rotation matrix. Another application of matrices is in the solution of systems of linear equations. If the matrix is square, it is possible to deduce some of its properties by computing its determinant. For example, a square matrix has an inverse if and only if its determinant is not zero. Insight into the geometry of a linear transformation is obtainable (along with other information) from the matrix's eigenvalues and eigenvectors.

Numbers library

The Numbers library scans C style string for number values in different numeral systems, and converts them to internal computer format, depending of expected data types. The library checks integer overflow and underflow conditions and signals to caller if such situation has occurred. The functions don't use local decimal mark to separate integer and fractional parts. They use only point symbol ('.') as the default decimal mark.

These functions were made as replacement for standard C library string conversion functions, and may be useful in programs that do intensive numbers extraction from any strings representations: binary, octal, decimal and hexadecimal. They are extremely fast, especially for floating-point numbers.

Sequence library

Sequence library is developed to provide fast algorithms for subsequence searching. It implements only Boyer-Moore-Horspool searching algorithm now, but in future it may be extended with more specific algorithms for sequence matching.

SIMD library

SIMD library was designed to allow C/C++ programs to communicate with SIMD directly via simple interface, to get its status, and change unit work mode. This is common routine for any mathematics and computation algorithms. But "C" and "C++" language just provide very abstract paradigm how programs should operate with hardware units. It is because of portability of both languages. But if we need high speed calculation, we also need to operate with hardware units as close as it is possible. That is why such programs require some kind of interface functions to manipulate with hardware units state and change working mode.

Statistics library

Statistics library implements most popular statistics functions for data analysis. It finds measures of location, variability, shape and others. The library provides functions which find different aspects of normally distributed values, and also has functions from robust statistics like median, quartiles and inter quartile range. The last ones usually need data sorting, but this implementation uses fast quantile location algorithm, which significantly improves these methods.

String library

The String library provides safe string functions which have almost the same functionality as string functions from the standard C library, but without their shortcomings. They work around buffer overflow problem, which is common problem for string library in libc. These safe functions signal by a return code to caller, that source string is too long to store it into selected buffer, and roll back all data which have been already partially copied from source string into the target buffer.


Time library

Time library is implemented as Time class, which allow programs to convert time variables from human readable format to Unix time format and vice versa. It also understands time zone records which are covered by tzfiles from package "tzdata". You may load data from that files into Time objects and use them to get local time in different time zones.

2D vector library

2D vectors library provide primitives for math calculations with two dimensional vectors. It implements basic functions of linear algebra in vector space and can be used in analytic geometry, engineering, physics, natural sciences, computer science, and the social sciences (particularly in economics). The library provides structures/classes with public components which represent projections of vector onto common axes: X and Y. You may set these components directly or change them via the library functions.

3D vector library

3D vectors library provide primitives for math calculations with three dimensional vectors. It implements basic functions of linear algebra in vector space and can be used in analytic geometry, engineering, physics, natural sciences, computer science, and the social sciences (particularly in economics). The library provides structures/classes with public components which represent projections of vector onto common axes: X, Y and Z. You may set these components directly or change them via the library functions.

Copyright 2012-2018 Jack Black. All rights reserved.