mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-12 15:58:05 +08:00
Merged in ibab/eigen (pull request PR-195)
Add small fixes to TensorScanOp
This commit is contained in:
commit
65d33e5898
@ -81,7 +81,7 @@ struct TensorEvaluator<const TensorScanOp<Op, ArgType>, Device> {
|
|||||||
typedef typename XprType::Index Index;
|
typedef typename XprType::Index Index;
|
||||||
static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;
|
static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;
|
||||||
typedef DSizes<Index, NumDims> Dimensions;
|
typedef DSizes<Index, NumDims> Dimensions;
|
||||||
typedef typename XprType::Scalar Scalar;
|
typedef typename internal::remove_const<typename XprType::Scalar>::type Scalar;
|
||||||
typedef typename XprType::CoeffReturnType CoeffReturnType;
|
typedef typename XprType::CoeffReturnType CoeffReturnType;
|
||||||
typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;
|
typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;
|
||||||
|
|
||||||
@ -152,6 +152,10 @@ struct TensorEvaluator<const TensorScanOp<Op, ArgType>, Device> {
|
|||||||
return m_output[index];
|
return m_output[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool) const {
|
||||||
|
return TensorOpCost(sizeof(CoeffReturnType), 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {
|
||||||
if (m_output != NULL) {
|
if (m_output != NULL) {
|
||||||
m_device.deallocate(m_output);
|
m_device.deallocate(m_output);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user