I'm still working on this
This commit is contained in:
29
src/spider/runtime/math/Matrix.hpp
Normal file
29
src/spider/runtime/math/Matrix.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <spider/runtime/common.hpp>
|
||||
|
||||
namespace spider {
|
||||
|
||||
template<typename T>
|
||||
struct Matrix {
|
||||
T* data;
|
||||
isize rows, cols;
|
||||
};
|
||||
|
||||
void matrix_fill(f32 diag, Matrix<f32> mat);
|
||||
|
||||
void matrix_fill(f64 diag, Matrix<f64> mat);
|
||||
|
||||
Matrix<f32> matrix_mul(Matrix<f32> m1, Matrix<f32> m2);
|
||||
|
||||
Matrix<f64> matrix_mul(Matrix<f64> m1, Matrix<f64> m2);
|
||||
|
||||
Matrix<f32> matrix_inv(Matrix<f32> mat);
|
||||
|
||||
Matrix<f64> matrix_inv(Matrix<f64> mat);
|
||||
|
||||
f32 matrix_det(Matrix<f32> mat);
|
||||
|
||||
f64 matrix_det(Matrix<f64> mat);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user