Variable nvcv::cuda::NumComponents

Variable Documentation

template<class T, class = Require<HasTypeTraits<T>>>
constexpr int nvcv::cuda::NumComponents = TypeTraits<T>::components

Metavariable to get the number of components of a type.

using DataType = ...;
int nc = nvcv::cuda::NumComponents<DataType>;

Note

This is zero for regular C types.

Template Parameters:

T – Type to get the number of components from.