#ifndef PFOR_PFOR_EXPRESSION_INFO_H #define PFOR_PFOR_EXPRESSION_INFO_H #include "access.h" #include "expression.h" #include "operandtag.h" #include "tagger.h" #include "../mp/pack.h" #include "../mp/meta.h" namespace pfor { namespace expr { namespace impl { /** * @brief filters variables ids from an expression depending on access category */ template struct RWListImpl; template struct RWListImpl, Ts...>, accessReq> { using trail = typename RWListImpl, accessReq>::type; using type = pfor::If, trail>; }; template struct RWListImpl, Ts...>, accessReq> { using type = typename RWListImpl, accessReq>::type; }; template struct RWListImpl, accessReq> { using type = Pack<>; }; template using RWList = typename RWListImpl::type; } template using ReadList = impl::RWList; template using WriteList = impl::RWList; /** * @brief returns informations about the input expression */ template struct ExpressionInfoImpl; template struct ExpressionInfoImpl> { using trail = typename ExpressionInfoImpl>::type; using exprtags = ExpressionTagger; using read = ReadList; using write = WriteList; using type = PackPrepend, write, read>>; }; template struct ExpressionInfoImpl> { using type = Pack<>; }; template using ExpressionInfo = typename ExpressionInfoImpl<0, T>::type; // template // using SortedExpressionInfo = PackSort::type>; } } #endif