mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Added missing costPerCoeff method
This commit is contained in:
parent
83ef39e055
commit
a80d875916
@ -254,6 +254,14 @@ struct TensorEvaluator<const TensorTupleReducerOp<ReduceOp, Dims, ArgType>, Devi
|
|||||||
|
|
||||||
EIGEN_DEVICE_FUNC Scalar* data() const { return NULL; }
|
EIGEN_DEVICE_FUNC Scalar* data() const { return NULL; }
|
||||||
|
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost
|
||||||
|
costPerCoeff(bool vectorized) const {
|
||||||
|
const double compute_cost = 1.0 +
|
||||||
|
(m_return_dim < 0 ? 0.0 : (TensorOpCost::ModCost<Index>() + TensorOpCost::DivCost<Index>()));
|
||||||
|
return m_orig_impl.costPerCoeff(vectorized) +
|
||||||
|
m_impl.costPerCoeff(vectorized) + TensorOpCost(0, 0, compute_cost);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EIGEN_DEVICE_FUNC void gen_strides(const InputDimensions& dims, StrideDims& strides) {
|
EIGEN_DEVICE_FUNC void gen_strides(const InputDimensions& dims, StrideDims& strides) {
|
||||||
if (m_return_dim < 0) {
|
if (m_return_dim < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user