CppMatrix
Loading...
Searching...
No Matches
matrix.cpp File Reference
module cpp_matrix
#include <format>
#include <span>
#include <stdexcept>
#include <stdfloat>
#include <variant>
#include <vector>
import cpp_matrix:matrix_type;
Include dependency graph for matrix.cpp:

Classes

class  cpp_matrix::Matrix< M >
 

Concepts

concept  cpp_matrix::MatrixBackend
 

Macros

#define OpOperators(M, op)
 
#define ReverseOpOperators(M, op)
 
#define OperatorsElementType(M, T)
 
#define Operators(M)
 

Typedefs

template<MatrixElementType T>
using cpp_matrix::CpuMatrix = Matrix<backend::CpuMatrix<T>>
 
template<MatrixElementType T>
using cpp_matrix::CudaMatrix = Matrix<backend::CudaMatrix<T>>
 

Functions

 cpp_matrix::Operators (CpuMatrix)
 
 cpp_matrix::Operators (CudaMatrix)
 

Macro Definition Documentation

◆ Operators

#define Operators ( M)
Value:
OperatorsElementType(M, std::float16_t) \
OperatorsElementType(M, std::float32_t)

◆ OperatorsElementType

#define OperatorsElementType ( M,
T )
Value:
ReverseOpOperators(M<T>, +) \
OpOperators(M<T>, -) \
ReverseOpOperators(M<T>, *) \
OpOperators(M<T>, /) \

◆ OpOperators

#define OpOperators ( M,
op )
Value:
M operator op(typename M::ElementType v, const M& m) \
{ \
return operator op(v, m.m_matrix); \
}

◆ ReverseOpOperators

#define ReverseOpOperators ( M,
op )
Value:
M operator op(typename M::ElementType v, const M& m) \
{ \
return m.operator op(v); \
}