示例#1
0
 template <typename Ptr2D> __device__ __forceinline__ D at(typename Ptr2D::index_type y, typename Ptr2D::index_type x, const Ptr2D& src) const
 {
     return saturate_cast<D>(src(idx_row(y), idx_col(x)));
 }
示例#2
0
 template <typename T> __device__ __forceinline__ D at(int x, const T* data) const
 {
     return saturate_cast<D>(data[idx_col(x)]);
 }
示例#3
0
 template <typename T> __device__ __forceinline__ D at(int y, int x, const T* data, size_t step) const
 {
     return saturate_cast<D>(((const T*)((const char*)data + idx_row(y) * step))[idx_col(x)]);
 }
示例#4
0
 __device__ __forceinline__ typename PtrTraits<SrcPtr>::value_type operator ()(int y, int x) const
 {
     return src(idx_row(y), idx_col(x));
 }