openGPMP
Open Source Mathematics Package
|
#include <cstdint>
#include <vector>
Go to the source code of this file.
Namespaces | |
gpmp | |
The source C++ openGPMP namespace. | |
gpmp::linalg | |
Functions | |
template<typename T > | |
void | gpmp::linalg::vector_add_i8 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector addition for signed 8-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_add_i16 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector addition for signed 16-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_add_i32 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector addition for signed 32-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_add_i64 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector addition for signed 64-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< int8_t > &vec1, const std::vector< int8_t > &vec2, std::vector< int8_t > &result) |
Performs vector addition for vectors of signed 8-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< uint8_t > &vec1, const std::vector< uint8_t > &vec2, std::vector< uint8_t > &result) |
Performs vector addition for vectors of unsigned 8-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< int16_t > &vec1, const std::vector< int16_t > &vec2, std::vector< int16_t > &result) |
Performs vector addition for vectors of signed 16-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< uint16_t > &vec1, const std::vector< uint16_t > &vec2, std::vector< uint16_t > &result) |
Performs vector addition for vectors of unsigned 16-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< int32_t > &vec1, const std::vector< int32_t > &vec2, std::vector< int32_t > &result) |
Performs vector addition for vectors of signed 32-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< uint32_t > &vec1, const std::vector< uint32_t > &vec2, std::vector< uint32_t > &result) |
Performs vector addition for vectors of unsigned 32-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< int64_t > &vec1, const std::vector< int64_t > &vec2, std::vector< int64_t > &result) |
Performs vector addition for vectors of signed 64-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< uint64_t > &vec1, const std::vector< uint64_t > &vec2, std::vector< uint64_t > &result) |
Performs vector addition for vectors of unsigned 64-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_sub_i8 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector subtraction for signed 8-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_sub_i16 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector subtraction for signed 16-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_sub_i32 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector subtraction for signed 32-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::vector_sub_i64 (const T *data1, const T *data2, T *result_data, size_t size) |
Performs vector subtraction for signed 64-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< int8_t > &vec1, const std::vector< int8_t > &vec2, std::vector< int8_t > &result) |
Performs vector subtraction for vectors of signed 8-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< uint8_t > &vec1, const std::vector< uint8_t > &vec2, std::vector< uint8_t > &result) |
Performs vector subtraction for vectors of unsigned 8-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< int16_t > &vec1, const std::vector< int16_t > &vec2, std::vector< int16_t > &result) |
Performs vector subtraction for vectors of signed 16-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< uint16_t > &vec1, const std::vector< uint16_t > &vec2, std::vector< uint16_t > &result) |
Performs vector subtraction for vectors of unsigned 16-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< int32_t > &vec1, const std::vector< int32_t > &vec2, std::vector< int32_t > &result) |
Performs vector subtraction for vectors of signed 32-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< uint32_t > &vec1, const std::vector< uint32_t > &vec2, std::vector< uint32_t > &result) |
Performs vector subtraction for vectors of unsigned 32-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< int64_t > &vec1, const std::vector< int64_t > &vec2, std::vector< int64_t > &result) |
Performs vector subtraction for vectors of signed 64-bit integers. More... | |
void | gpmp::linalg::vector_sub (const std::vector< uint64_t > &vec1, const std::vector< uint64_t > &vec2, std::vector< uint64_t > &result) |
Performs vector subtraction for vectors of unsigned 64-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::scalar_mult_i8 (const T *data, int scalar, T *result_data, size_t size) |
Performs scalar multiplication for signed 8-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::scalar_mult_i16 (const T *data, int scalar, T *result_data, size_t size) |
Performs scalar multiplication for signed 16-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::scalar_mult_i32 (const T *data, int scalar, T *result_data, size_t size) |
Performs scalar multiplication for signed 32-bit integers. More... | |
template<typename T > | |
void | gpmp::linalg::scalar_mult_i64 (const T *data, int scalar, T *result_data, size_t size) |
Performs scalar multiplication for signed 64-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< int8_t > &vec1, int scalar, std::vector< int8_t > &result) |
Performs scalar multiplication for vectors of signed 8-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< uint8_t > &vec1, int scalar, std::vector< uint8_t > &result) |
Performs scalar multiplication for vectors of unsigned 8-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< int16_t > &vec1, int scalar, std::vector< int16_t > &result) |
Performs scalar multiplication for vectors of signed 16-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< uint16_t > &vec1, int scalar, std::vector< uint16_t > &result) |
Performs scalar multiplication for vectors of unsigned 16-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< int32_t > &vec1, int scalar, std::vector< int32_t > &result) |
Performs scalar multiplication for vectors of signed 32-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< uint32_t > &vec1, int scalar, std::vector< uint32_t > &result) |
Performs scalar multiplication for vectors of unsigned 32-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< int64_t > &vec1, int scalar, std::vector< int64_t > &result) |
Performs scalar multiplication for vectors of signed 64-bit integers. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< uint64_t > &vec1, int scalar, std::vector< uint64_t > &result) |
Performs scalar multiplication for vectors of unsigned 64-bit integers. More... | |
template<typename T > | |
T | gpmp::linalg::dot_product_i8 (const T *vec1, const T *vec2, size_t size) |
Computes the dot product for signed 8-bit integer vectors. More... | |
template<typename T > | |
T | gpmp::linalg::dot_product_i16 (const T *vec1, const T *vec2, size_t size) |
Computes the dot product for signed 16-bit integer vectors. More... | |
template<typename T > | |
T | gpmp::linalg::dot_product_i32 (const T *vec1, const T *vec2, size_t size) |
Computes the dot product for signed 32-bit integer vectors. More... | |
template<typename T > | |
T | gpmp::linalg::dot_product_i64 (const T *vec1, const T *vec2, size_t size) |
Computes the dot product for signed 64-bit integer vectors. More... | |
int | gpmp::linalg::dot_product (const std::vector< int8_t > &vec1, const std::vector< int8_t > &vec2) |
Computes the dot product for vectors of signed 8-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< uint8_t > &vec1, const std::vector< uint8_t > &vec2) |
Computes the dot product for vectors of unsigned 8-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< int16_t > &vec1, const std::vector< int16_t > &vec2) |
Computes the dot product for vectors of signed 16-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< uint16_t > &vec1, const std::vector< uint16_t > &vec2) |
Computes the dot product for vectors of unsigned 16-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< int32_t > &vec1, const std::vector< int32_t > &vec2) |
Computes the dot product for vectors of signed 32-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< uint32_t > &vec1, const std::vector< uint32_t > &vec2) |
Computes the dot product for vectors of unsigned 32-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< int64_t > &vec1, const std::vector< int64_t > &vec2) |
Computes the dot product for vectors of signed 64-bit integers. More... | |
int | gpmp::linalg::dot_product (const std::vector< uint64_t > &vec1, const std::vector< uint64_t > &vec2) |
Computes the dot product for vectors of unsigned 64-bit integers. More... | |
void | gpmp::linalg::vector_add (const std::vector< double > &vec1, const std::vector< double > &vec2, std::vector< double > &result) |
Performs vector addition for double vectors. More... | |
void | gpmp::linalg::vector_sub (const std::vector< double > &vec1, const std::vector< double > &vec2, std::vector< double > &result) |
Performs vector subtraction for double vectors. More... | |
void | gpmp::linalg::scalar_mult (const std::vector< double > &vec, double scalar, std::vector< double > &result) |
Performs scalar multiplication for double vectors. More... | |
double | gpmp::linalg::dot_product (const std::vector< double > &vec1, const std::vector< double > &vec2) |
Computes the dot product of two double vectors. More... | |
template<typename T > | |
void | gpmp::linalg::std_vector_add (const std::vector< T > &vec1, const std::vector< T > &vec2, std::vector< T > &result) |
Add two vectors element-wise. More... | |
template<typename T > | |
void | gpmp::linalg::std_vector_sub (const std::vector< T > &vec1, const std::vector< T > &vec2, std::vector< T > &result) |
Subtract one vector from another element-wise. More... | |
template<typename T > | |
void | gpmp::linalg::std_scalar_mult (const std::vector< T > &vec, int scalar, std::vector< T > &result) |
Multiply each element of a vector by a scalar. More... | |
template<typename T > | |
T | gpmp::linalg::std_dot_product (const std::vector< T > &vec1, const std::vector< T > &vec2) |
Compute the dot product of two vectors. More... | |
void | gpmp::linalg::std_cross_product (const std::vector< double > &vec1, const std::vector< double > &vec2, std::vector< double > &result) |
Compute the cross product of two 3D vectors. More... | |
double | gpmp::linalg::std_vector_norm (const std::vector< double > &vec) |
Compute the Euclidean norm (magnitude) of a vector. More... | |
void | gpmp::linalg::std_vector_normalize (const std::vector< double > &vec, std::vector< double > &result) |
Normalize a vector to have unit length. More... | |
void | gpmp::linalg::std_vector_projection (const std::vector< double > &vec, const std::vector< double > &onto_vec, std::vector< double > &result) |
Compute the projection of one vector onto another. More... | |
void | gpmp::linalg::std_cross_product (const std::vector< int > &vec1, const std::vector< int > &vec2, std::vector< int > &result) |
Compute the cross product of two 3D vectors of integers. More... | |
double | gpmp::linalg::std_vector_norm (const std::vector< int > &vec) |
Compute the Euclidean norm (magnitude) of a vector of integers. More... | |
void | gpmp::linalg::std_vector_normalize (const std::vector< int > &vec, std::vector< double > &result) |
Normalize a vector of integers to have unit length. More... | |
void | gpmp::linalg::std_vector_projection (const std::vector< int > &vec, const std::vector< int > &onto_vec, std::vector< double > &result) |
Compute the projection of one vector of integers onto another. More... | |