40 lines
900 B
C++
40 lines
900 B
C++
#pragma once
|
|
|
|
#include "core/omp_config.h"
|
|
#include "detail/max_serial.h"
|
|
|
|
|
|
|
|
namespace numerics{
|
|
|
|
|
|
// ---------------- (Scalar, Scalar) -> Scalar ----------------
|
|
template <typename T>
|
|
inline T max(const T a, const T b) {
|
|
return detail::max_serial(a, b);
|
|
}
|
|
|
|
// ---------------- Vector -> Scalar ----------------
|
|
template <typename T>
|
|
inline T max(const utils::Vector<T>& v) {
|
|
return detail::max_serial(v);
|
|
}
|
|
|
|
|
|
// ---------------- Matrix -> Scalar ----------------
|
|
template <typename T>
|
|
inline T max(const utils::Matrix<T>& A) {
|
|
return detail::max_serial(A);
|
|
}
|
|
|
|
// ---------------- Matrix -> Vector ----------------
|
|
template <typename T>
|
|
inline utils::Vector<T> max_rowwise(const utils::Matrix<T>& A) {
|
|
return detail::max_rowwise_serial(A);
|
|
}
|
|
|
|
template <typename T>
|
|
inline utils::Vector<T> max_colwise(const utils::Matrix<T>& A) {
|
|
return detail::max_colwise_serial(A);
|
|
}
|
|
} |