Home | History | Annotate | Download | only in include

Lines Matching refs:_Type

213 #define DEFINE_CAST_OPERATORS(_Type) \
214 inline static _Type* From(C2Param *other) { \
215 return (_Type*)C2Param::IfSuitable( \
216 other, sizeof(_Type), _Type::PARAM_TYPE, _Type::FLEX_SIZE, \
217 (_Type::PARAM_TYPE & T::Index::DIR_UNDEFINED) != T::Index::DIR_UNDEFINED); \
219 inline static const _Type* From(const C2Param *other) { \
220 return const_cast<const _Type*>(From(const_cast<C2Param *>(other))); \
222 inline static _Type* From(std::nullptr_t) { return nullptr; } \
239 #define DEFINE_FLEXIBLE_ALLOC(_Type, S, ptr, Ptr) \
241 inline static std::ptr##_ptr<_Type> Alloc##Ptr(size_t flexCount, const Args(&... args)) { \
242 return std::ptr##_ptr<_Type>(new(flexCount) _Type(flexCount, args...)); \
245 inline static std::ptr##_ptr<_Type> Alloc##Ptr( \
247 return std::ptr##_ptr<_Type>(new(init.size()) _Type(init.size(), args..., init)); \
250 inline static std::ptr##_ptr<_Type> Alloc##Ptr( \
252 return std::ptr##_ptr<_Type>(new(init.size()) _Type(init.size(), args..., init)); \
255 inline static std::ptr##_ptr<_Type> Alloc##Ptr(const U(&init)[N], const Args(&... args)) { \
256 return std::ptr##_ptr<_Type>(new(N) _Type(N, args..., init)); \
262 #define DEFINE_FLEXIBLE_METHODS(_Type, S) \
263 DEFINE_FLEXIBLE_ALLOC(_Type, S, shared, Shared) \
264 DEFINE_FLEXIBLE_ALLOC(_Type, S, unique, Unique) \
266 static_assert(sizeof(_Type) == _Type::BASE_SIZE, "incorrect BASE_SIZE"); \
268 if (sz >= sizeof(_Type)) { \
269 return (sz - sizeof(_Type)) / _Type::FLEX_SIZE; \
315 typedef C2GlobalParam<T, S, ParamIndex> _Type;
320 inline C2GlobalParam(const Args(&... args)) : T(sizeof(_Type), _Type::PARAM_TYPE), S(args...) { }
322 DEFINE_CAST_OPERATORS(_Type)
344 typedef C2GlobalParam<T, S, ParamIndex> _Type;
349 : T(_Type::CalcSize(flexCount), _Type::PARAM_TYPE), m(flexCount, args...) { }
354 DEFINE_FLEXIBLE_METHODS(_Type, S)
355 DEFINE_CAST_OPERATORS(_Type)
382 typedef C2PortParam<T, S, ParamIndex> _Type;
386 inline C2PortParam() : T(sizeof(_Type), _Type::PARAM_TYPE) { }
390 : T(sizeof(_Type), _output ? output::PARAM_TYPE : input::PARAM_TYPE), S(args...) { }
394 DEFINE_CAST_OPERATORS(_Type)
402 inline input(const Args(&... args)) : T(sizeof(_Type), input::PARAM_TYPE), S(args...) { }
414 inline output(const Args(&... args)) : T(sizeof(_Type), output::PARAM_TYPE), S(args...) { }
443 typedef C2PortParam<T, S, ParamIndex> _Type;
446 inline C2PortParam(size_t flexCount) : T(_Type::CalcSize(flexCount), _Type::PARAM_TYPE) { }
450 : T(_Type::CalcSize(flexCount), _output ? output::PARAM_TYPE : input::PARAM_TYPE),
459 DEFINE_FLEXIBLE_METHODS(_Type, S)
460 DEFINE_CAST_OPERATORS(_Type)
469 : T(_Type::CalcSize(flexCount), input::PARAM_TYPE), m(flexCount, args...) { }
485 : T(_Type::CalcSize(flexCount), output::PARAM_TYPE), m(flexCount, args...) { }
522 typedef C2StreamParam<T, S, ParamIndex> _Type;
526 inline C2StreamParam() : T(sizeof(_Type), _Type::PARAM_TYPE) { }
531 : T(sizeof(_Type), _output ? output::PARAM_TYPE : input::PARAM_TYPE, stream),
538 DEFINE_CAST_OPERATORS(_Type)
547 inline input() : T(sizeof(_Type), input::PARAM_TYPE) { }
551 : T(sizeof(_Type), input::PARAM_TYPE, stream), S(args...) { }
565 inline output() : T(sizeof(_Type), output::PARAM_TYPE) { }
569 : T(sizeof(_Type), output::PARAM_TYPE, stream), S(args...) { }
604 typedef C2StreamParam<T, S, ParamIndex> _Type;
606 inline C2StreamParam(size_t flexCount) : T(_Type::CalcSize(flexCount), _Type::PARAM_TYPE, 0u) { }
611 : T(_Type::CalcSize(flexCount), _output ? output::PARAM_TYPE : input::PARAM_TYPE, stream),
622 DEFINE_FLEXIBLE_METHODS(_Type, S)
623 DEFINE_CAST_OPERATORS(_Type)
631 inline input(size_t flexCount) : T(_Type::CalcSize(flexCount), input::PARAM_TYPE) { }
635 : T(_Type::CalcSize(flexCount), input::PARAM_TYPE, stream), m(flexCount, args...) { }
653 inline output(size_t flexCount) : T(_Type::CalcSize(flexCount), output::PARAM_TYPE) { }
657 : T(_Type::CalcSize(flexCount), output::PARAM_TYPE, stream), m(flexCount, args...) { }