Simplified the dispatch code.

This commit is contained in:
Benoit Steiner 2016-01-08 16:50:57 -08:00
parent d726e864ac
commit e76904af1b

View File

@ -342,7 +342,7 @@ template <typename Self, typename Op, typename Device>
struct InnerReducer { struct InnerReducer {
static const bool HasOptimizedImplementation = false; static const bool HasOptimizedImplementation = false;
static EIGEN_DEVICE_FUNC void run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) { static void run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) {
assert(false && "Not implemented"); assert(false && "Not implemented");
} }
}; };
@ -352,7 +352,7 @@ template <typename Self, typename Op, typename Device>
struct OuterReducer { struct OuterReducer {
static const bool HasOptimizedImplementation = false; static const bool HasOptimizedImplementation = false;
static EIGEN_DEVICE_FUNC void run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) { static void run(const Self&, Op&, const Device&, typename Self::CoeffReturnType*, typename Self::Index, typename Self::Index) {
assert(false && "Not implemented"); assert(false && "Not implemented");
} }
}; };
@ -527,6 +527,7 @@ struct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType>, Device>
} }
// Attempt to use an optimized reduction. // Attempt to use an optimized reduction.
#if 0
else if (RunningOnGPU && data && (m_device.majorDeviceVersion() >= 3)) { else if (RunningOnGPU && data && (m_device.majorDeviceVersion() >= 3)) {
bool reducing_inner_dims = true; bool reducing_inner_dims = true;
for (int i = 0; i < NumReducedDims; ++i) { for (int i = 0; i < NumReducedDims; ++i) {
@ -562,6 +563,7 @@ struct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType>, Device>
return false; return false;
} }
} }
#endif
return true; return true;
} }