Refactor progress
Sync public mirror / sync (push) Failing after 27s

Next step is ramdom and equal. I also need to have a look at add and the serial naming of the functions.
This commit is contained in:
2026-01-13 20:07:27 +01:00
parent 48f329feef
commit 9709949a5b
52 changed files with 2038 additions and 1058 deletions
+57
View File
@@ -0,0 +1,57 @@
#pragma once
#include "./core/omp_config.h"
#include "detail/pow_serial.h"
namespace numerics{
// ---------------- Scalar ----------------
template <typename T>
inline void inplace_pow(utils::Matrix<T>& A, const T b) {
detail::inplace_pow_scalar_serial(A,b);
}
template <typename T>
inline utils::Matrix<T> pow(const utils::Matrix<T>& A, const T b) {
utils::Matrix<T> out = A;
inplace_pow(out, b);
return out;
}
template <typename T>
inline void inplace_pow(utils::Vector<T>& v, const T b) {
detail::inplace_pow_scalar_serial(v,b);
}
template <typename T>
inline utils::Vector<T> pow(const utils::Vector<T>& v, const T b) {
utils::Vector<T> out = v;
inplace_pow(out, b);
return out;
}
// ---------------- Elementwise ----------------
template <typename T>
inline void inplace_pow(utils::Matrix<T>& A, const utils::Matrix<T>& B) {
detail::inplace_pow_elementwise_serial(A,B);
}
template <typename T>
inline utils::Matrix<T> pow(const utils::Matrix<T>& A, const utils::Matrix<T>& B) {
utils::Matrix<T> out = A;
inplace_pow(out, B);
return out;
}
template <typename T>
inline void inplace_pow(utils::Vector<T>& v, const utils::Vector<T>& p) {
detail::inplace_pow_elementwise_serial(v,p);
}
template <typename T>
inline utils::Vector<T> pow(const utils::Vector<T>& v, const utils::Vector<T>& p) {
utils::Vector<T> out = v;
inplace_pow(out, p);
return out;
}
}