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