1#ifndef TATAMI_ARITHMETIC_UTILS_HPP
2#define TATAMI_ARITHMETIC_UTILS_HPP
38template<ArithmeticOperation op_,
bool right_,
typename Value_,
typename Scalar_>
55 if constexpr(
op_ == ArithmeticOperation::ADD) {
58 }
else if constexpr(
op_ == ArithmeticOperation::MULTIPLY) {
61 }
else if constexpr(
op_ == ArithmeticOperation::SUBTRACT) {
64 }
else if constexpr(
op_ == ArithmeticOperation::DIVIDE) {
72 }
else if constexpr(
op_ == ArithmeticOperation::POWER) {
75 }
else if constexpr(
op_ == ArithmeticOperation::MODULO) {
87 }
else if constexpr(
op_ == ArithmeticOperation::INTEGER_DIVIDE) {
94 return std::floor(
out);
104template<ArithmeticOperation op_,
bool right_,
typename Value_,
typename Scalar_>
107 if constexpr(std::numeric_limits<Product>::is_iec559) {
115 if constexpr(
op_ == ArithmeticOperation::DIVIDE) {
118 if constexpr(
op_ == ArithmeticOperation::MODULO) {
121 if constexpr(
op_ == ArithmeticOperation::INTEGER_DIVIDE) {
Flexible representations for matrix data.
Definition Extractor.hpp:15
ArithmeticOperation
Definition arithmetic_utils.hpp:23
auto consecutive_extractor(const Matrix< Value_, Index_ > *mat, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args)
Definition consecutive_extractor.hpp:35