3MUDA_INLINE
void SubFieldImpl<FieldEntryLayout::AoS>::build_impl()
5 auto min_alignment = build_options().min_alignment;
6 auto max_alignment = build_options().max_alignment;
14 uint32_t struct_stride = 0;
15 for(
auto& e : m_entries)
18 auto elem_byte_size = e->elem_byte_size();
20 auto total_elem_count_in_a_struct_member = e->shape().x * e->shape().y;
21 struct_stride = align(struct_stride, elem_byte_size, min_alignment, max_alignment);
23 e->m_core.m_info.offset_in_struct = struct_stride;
24 struct_stride += elem_byte_size * total_elem_count_in_a_struct_member;
27 m_struct_stride = align(struct_stride, struct_stride, min_alignment, max_alignment);
29 for(
auto& e : m_entries)
30 e->m_core.m_info.struct_stride = m_struct_stride;
40MUDA_INLINE
size_t SubFieldImpl<FieldEntryLayout::AoS>::require_total_buffer_byte_size(
size_t num_element)
42 return m_struct_stride * num_element;