Convert a TensorDescriptor
into a Tensor
by finding the type/rank at runtime.
More...
#include <TensorDescriptor.hpp>
Static Public Member Functions | |
template<typename T > | |
static constexpr bool | test () |
template<typename TargetType , typename... Ts> | |
constexpr static bool | checkTensorRanks (sp::TypeList< Ts... > &&) |
Call validTensorRanks() on the functor type. More... | |
template<typename TargetType , typename... Ts> | |
constexpr static bool | checkTensorTypes (sp::TypeList< Ts... > &&) |
Call validTensorTypes() on the functor type. More... | |
template<typename... O, typename TensorType , int TensorRank, typename Fn , typename... Stuff> | |
static auto | createTensor (const TensorDescriptor< TensorType, TensorRank > &arg, Fn &fn, std::tuple< O &&... >, Stuff &&... stuff) |
Once the rank/type are known, create the Tensor and pass it to TensorSpecialiser to have its optimisation flags refined. More... | |
template<typename TensorType , int TDRank, typename... Stuff> | |
static auto | selectRank (const TensorDescriptor< TensorType, TDRank > &arg, Stuff &&... stuff) |
template<typename TDType , int TDRank, typename... Stuff> | |
static auto | run (const sp::TensorDescriptor< TDType, TDRank > &arg, Stuff &&... stuff) |
Static Public Member Functions inherited from sp::Specialiser | |
template<typename T > | |
static constexpr bool | test () |
Return true iff the specialiser is able to specialise arguments of type T. More... | |
template<typename... O, typename ArgType , typename... Stuff> | |
static auto | run (const ArgType &thisArg, Stuff &&... stuff) |
Specialise an argument. More... | |
Convert a TensorDescriptor
into a Tensor
by finding the type/rank at runtime.
If the deduced rank/type combination is rejected by the target Specialisable
, that branch of the specialisation tree throws sp::RejectedSpecialiationException
.
|
staticconstexpr |
Call validTensorRanks()
on the functor type.
Tensors
is a TypeList.
|
staticconstexpr |
Call validTensorTypes()
on the functor type.
Tensors
is a TypeList.
|
static |
Once the rank/type are known, create the Tensor
and pass it to TensorSpecialiser
to have its optimisation flags refined.
If the functor type rejected this rank/type combination (by returning false
from validTensorRanks()
, validTensorTypes()
, or similar functions defined in Specialisable.hpp), this function will instead call the corresponding error handling, which is guaranteed to throw.
That throw prevents the specialiser from continuing to explore this branch of the specialisation tree.