Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/ruy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ruy/ruy.h
diff options
context:
space:
mode:
Diffstat (limited to 'ruy/ruy.h')
-rw-r--r--ruy/ruy.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ruy/ruy.h b/ruy/ruy.h
index 3cf7bdd..ddbe192 100644
--- a/ruy/ruy.h
+++ b/ruy/ruy.h
@@ -93,6 +93,14 @@ void Mul(const Matrix<LhsScalar>& lhs, const Matrix<RhsScalar>& rhs,
// (e.g. the number of CPU cores in typical scenarios). At least ruy forces
// each invocation to make an explicit decision here, there is no automatic
// detection of the best number of threads to use in ruy.
+//
+// Constraints on the template parameters:
+// * If DstScalar is floating-point then AccumScalar must also be.
+// * If DstScalar is integral then AccumScalar must be std::int32_t.
+// Please refer to MulParams' class comment for more information. When
+// DstScalar is integral and is narrower than AccumScalar, additional
+// MulParams fields must be set to control the scaling of internal accumulators
+// before the final saturating cast to the DstScalar type.
template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
typename DstScalar>
void Mul(const Matrix<LhsScalar>& lhs, const Matrix<RhsScalar>& rhs,