Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
faiss::gpu::detail::SubTensor< TensorType, SubDim, PtrTraits > Class Template Reference

A `SubDim`-rank slice of a parent Tensor. More...

## Public Member Functions
__host__ __device__ SubTensor < TensorType, SubDim-1, PtrTraits > | operator[] (typename TensorType::IndexType index)
__host__ __device__ const SubTensor< TensorType, SubDim-1, PtrTraits > | operator[] (typename TensorType::IndexType index) const
__host__ __device__ TensorType::DataType * | operator& ()
__host__ __device__ const TensorType::DataType * | operator& () const
__host__ __device__ TensorType::DataPtrType | data ()
| Returns a raw accessor to our slice.
__host__ __device__ const TensorType::DataPtrType | data () const
| Returns a raw accessor to our slice (const).
template<typename T >
__host__ __device__ T & | as ()
| Cast to a different datatype.
template<typename T >
__host__ __device__ const T & | as () const
| Cast to a different datatype (const).
template<typename T >
__host__ __device__ PtrTraits < T >::PtrType | dataAs ()
| Cast to a different datatype.
template<typename T >
__host__ __device__ PtrTraits < const T >::PtrType | dataAs () const
| Cast to a different datatype (const)
__device__ TensorType::DataType | ldg () const
| Use the texture cache for reads.
template<typename T >
__device__ T | ldgAs () const
| Use the texture cache for reads; cast as a particular type.
Tensor< typename TensorType::DataType, SubDim, TensorType::IsInnerContig, typename TensorType::IndexType, PtrTraits > | view ()

## Protected Member Functions
__host__ __device__ | SubTensor (TensorType &t, typename TensorType::DataPtrType data)

## Protected Attributes
TensorType & | tensor_
| The tensor we're referencing.
TensorType::DataPtrType const | data_
| The start of our sub-region.

## Friends
class | SubTensor< TensorType, SubDim+1, PtrTraits >
| One dimension greater can create us.
class | Tensor< typename TensorType::DataType, TensorType::NumDim, TensorType::IsInnerContig, typename TensorType::IndexType, PtrTraits >
| Our parent tensor can create us.

## Detailed Description

### template<typename TensorType, int SubDim, template< typename U > class PtrTraits>
class faiss::gpu::detail::SubTensor< TensorType, SubDim, PtrTraits >

A `SubDim`-rank slice of a parent Tensor.

Definition at line 37 of file Tensor.cuh.

## Member Function Documentation

template<typename TensorType , int SubDim, template< typename U > class PtrTraits>

__host__ __device__ SubTensor<TensorType, SubDim - 1, PtrTraits> faiss::gpu::detail::SubTensor< TensorType, SubDim, PtrTraits >::operator[] | ( | typename TensorType::IndexType | index | ) |
| inline

Returns a view of the data located at our offset (the dimension `SubDim` - 1 tensor).

Definition at line 497 of file Tensor.cuh.

template<typename TensorType , int SubDim, template< typename U > class PtrTraits>

__host__ __device__ const SubTensor<TensorType, SubDim - 1, PtrTraits> faiss::gpu::detail::SubTensor< TensorType, SubDim, PtrTraits >::operator[] | ( | typename TensorType::IndexType | index | ) | const
| inline

Returns a view of the data located at our offset (the dimension `SubDim` - 1 tensor) (const).

Definition at line 513 of file Tensor.cuh.

template<typename TensorType , int SubDim, template< typename U > class PtrTraits>

Tensor<typename TensorType::DataType, SubDim, TensorType::IsInnerContig, typename TensorType::IndexType, PtrTraits> faiss::gpu::detail::SubTensor< TensorType, SubDim, PtrTraits >::view | ( |  | ) |
| inline

Returns a tensor that is a view of the SubDim-dimensional slice of this tensor, starting where our data begins

Definition at line 597 of file Tensor.cuh.

The documentation for this class was generated from the following file:

- /data/users/matthijs/github_faiss/faiss/gpu/utils/Tensor.cuh