1#ifndef TATAMI_ISOMETRIC_BINARY_ARITHMETIC_HELPERS_H
2#define TATAMI_ISOMETRIC_BINARY_ARITHMETIC_HELPERS_H
4#include "../arithmetic_utils.hpp"
24template<ArithmeticOperation op_>
30 static constexpr bool known_sparse = (
op_ == ArithmeticOperation::ADD ||
31 op_ == ArithmeticOperation::SUBTRACT ||
32 op_ == ArithmeticOperation::MULTIPLY);
34 static constexpr bool is_basic =
false;
43 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
46 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
55 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
59 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
68 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
75 !std::numeric_limits<InputValue_>::has_quiet_NaN &&
76 !std::numeric_limits<InputValue_>::has_infinity);
91 template<
typename OutputValue_,
typename InputValue_,
typename Index_>
94 throw std::runtime_error(
"division by zero is not supported");
101 bool is_sparse()
const {
Delayed binary isometric arithmetic.
Definition arithmetic_helpers.hpp:25
Flexible representations for matrix data.
Definition Extractor.hpp:15
DelayedBinaryIsometricArithmetic< ArithmeticOperation::MULTIPLY > make_DelayedBinaryIsometricMultiply()
Definition arithmetic_helpers.hpp:129
DelayedBinaryIsometricArithmetic< ArithmeticOperation::POWER > make_DelayedBinaryIsometricPower()
Definition arithmetic_helpers.hpp:145
DelayedBinaryIsometricArithmetic< ArithmeticOperation::MODULO > make_DelayedBinaryIsometricModulo()
Definition arithmetic_helpers.hpp:152
DelayedBinaryIsometricArithmetic< ArithmeticOperation::SUBTRACT > make_DelayedBinaryIsometricSubtract()
Definition arithmetic_helpers.hpp:121
DelayedBinaryIsometricArithmetic< ArithmeticOperation::ADD > make_DelayedBinaryIsometricAdd()
Definition arithmetic_helpers.hpp:113
DelayedBinaryIsometricArithmetic< ArithmeticOperation::DIVIDE > make_DelayedBinaryIsometricDivide()
Definition arithmetic_helpers.hpp:137
DelayedBinaryIsometricArithmetic< ArithmeticOperation::INTEGER_DIVIDE > make_DelayedBinaryIsometricIntegerDivide()
Definition arithmetic_helpers.hpp:159
auto consecutive_extractor(const Matrix< Value_, Index_ > *mat, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args)
Definition consecutive_extractor.hpp:35
A range of a sparse vector.
Definition SparseRange.hpp:32