14 namespace faiss {
namespace gpu {
18 bool InnerContig =
false,
19 typename IndexT = int,
20 template <
typename U>
class PtrTraits = traits::DefaultPtrTraits>
23 typedef IndexT IndexType;
24 typedef typename PtrTraits<T>::PtrType DataPtrType;
40 const IndexT sizes[Dim]);
42 std::initializer_list<IndexT> sizes);
47 const IndexT sizes[Dim],
85 #include "HostTensor-inl.cuh"
__host__ ~HostTensor()
Destructor.
__host__ HostTensor< T, Dim, InnerContig, IndexT, PtrTraits > & zero()
Call to zero out memory.
__host__ __device__ const IndexT * sizes() const
Returns the size array.
__host__ HostTensor()
Default constructor.
__host__ __device__ const IndexT * strides() const
Returns the stride array.
__host__ __device__ DataPtrType data()
Returns a raw pointer to the start of our data.
__host__ bool equal(const HostTensor< T, Dim, InnerContig, IndexT, PtrTraits > &t) const
Are the two tensors exactly equal?
__host__ T maxDiff(const HostTensor< T, Dim, InnerContig, IndexT, PtrTraits > &t) const
Returns the maximum difference seen between two tensors.