| #include "THCHalfAutoNumerics.cuh" |
| #include <thrust/device_ptr.h> |
| #include <thrust/reduce.h> |
| #include <thrust/transform_reduce.h> |
| template <typename Dtype, typename Acctype> |
| __host__ __device__ Acctype operator()(Dtype x) const |
| return THCNumerics<Acctype>::abs(ScalarConvert<Dtype, Acctype>::to(x)); |
| template <typename Dtype> |
| struct l1cost_updateGradInput_functor |
| __host__ __device__ Dtype operator()(Dtype x) const |
| return ScalarConvert<int, Dtype>::to(1); |
| return ScalarConvert<int, Dtype>::to(-1); |
| return ScalarConvert<int, Dtype>::to(0); |
| #include "generic/L1Cost.cu" |
| #include "THCGenerateFloatTypes.h" |