本文整理汇总了C++中type::get_arrmeta_size方法的典型用法代码示例。如果您正苦于以下问题:C++ type::get_arrmeta_size方法的具体用法?C++ type::get_arrmeta_size怎么用?C++ type::get_arrmeta_size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类type
的用法示例。
在下文中一共展示了type::get_arrmeta_size方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
ndt::pointer_type::pointer_type(const type &target_tp)
: base_type(pointer_id, sizeof(char *), alignof(char *),
target_tp.get_flags() | type_flag_zeroinit | type_flag_blockref,
target_tp.get_arrmeta_size() + sizeof(pointer_type_arrmeta), 0, 0),
m_target_tp(target_tp)
{
}
示例2: sizeof
ndt::array_type::array_type(const type &value_tp)
: base_expr_type(array_type_id, expr_kind, sizeof(nd::array), sizeof(nd::array),
inherited_flags(value_tp.get_flags(), type_flag_construct | type_flag_destructor),
value_tp.get_arrmeta_size(), value_tp.get_ndim()),
m_value_tp(value_tp)
{
}
示例3: type_error
ndt::option_type::option_type(const type &value_tp)
: base_type(option_id, value_tp.get_data_size(), value_tp.get_data_alignment(),
value_tp.get_flags() & (type_flags_value_inherited | type_flags_operand_inherited),
value_tp.get_arrmeta_size(), value_tp.get_ndim(), 0),
m_value_tp(value_tp)
{
if (value_tp.get_id() == option_id) {
stringstream ss;
ss << "Cannot construct an option type out of " << value_tp << ", it is already an option type";
throw type_error(ss.str());
}
}
示例4: type_error
ndt::pointer_type::pointer_type(const type &target_tp)
: base_expr_type(pointer_type_id, expr_kind, sizeof(void *), sizeof(void *),
inherited_flags(target_tp.get_flags(), type_flag_zeroinit | type_flag_blockref),
sizeof(pointer_type_arrmeta) + target_tp.get_arrmeta_size(), target_tp.get_ndim()),
m_target_tp(target_tp)
{
// I'm not 100% sure how blockref pointer types should interact with
// the computational subsystem, the details will have to shake out
// when we want to actually do something with them.
if (target_tp.get_kind() == expr_kind && target_tp.get_type_id() != pointer_type_id) {
stringstream ss;
ss << "A dynd pointer type's target cannot be the expression type ";
ss << target_tp;
throw dynd::type_error(ss.str());
}
}
示例5: invalid_argument
base_dim_type(type_id_t type_id, type_kind_t tp_kind,
const type &element_tp, size_t data_size, size_t alignment,
size_t element_arrmeta_offset, flags_type flags, bool strided)
: base_type(type_id, tp_kind, data_size, alignment,
flags | type_flag_dim,
element_arrmeta_offset + element_tp.get_arrmeta_size(),
1 + element_tp.get_ndim(),
strided ? (1 + element_tp.get_strided_ndim()) : 0),
m_element_tp(element_tp),
m_element_arrmeta_offset(element_arrmeta_offset)
{
if (m_element_tp.get_kind() == memory_kind) {
throw std::invalid_argument(
"a memory_type cannot be an element of a dim_type");
}
}