337 using BaseClass::_toTrueType;
341 using BaseClass::m_extent;
347 _copyFrom(args.m_indexes, _toTrueType(args.m_source), _toTrueType(args.m_destination));
351 _copyTo(args.m_indexes, _toTrueType(args.m_source), _toTrueType(args.m_destination));
355 _fill(args.m_indexes, _toTrueType(args.m_source), _toTrueType(args.m_destination));
359 _copyFrom(args.m_indexes, args.m_multi_memory, _toTrueType(args.m_source_buffer));
363 _copyTo(args.m_indexes, args.m_const_multi_memory, _toTrueType(args.m_destination_buffer));
367 _fill(args.m_indexes, args.m_multi_memory, _toTrueType(args.m_source_buffer));
380 for (Int32 i = 0; i <
nb_index; ++i) {
381 Int64
z_index = (Int64)i * m_extent.v;
382 Int64
zci = (Int64)(indexes[i]) * m_extent.v;
383 for (Int32 z = 0, n = m_extent.v; z < n; ++z)
396 Int32
index0 = indexes[i * 2];
397 Int32
index1 = indexes[(i * 2) + 1];
403 Int64
zci = ((Int64)(
index1)) * m_extent.v;
404 Int64
z_index = (Int64)i * m_extent.v;
405 for (Int32 z = 0, n = m_extent.v; z < n; ++z)
424 Int64
nb_value = destination.size() / m_extent.v;
425 for (Int64 i = 0; i <
nb_value; ++i) {
426 Int64
zci = i * m_extent.v;
427 for (Int32 z = 0, n = m_extent.v; z < n; ++z)
428 destination[
zci + z] = source[z];
433 for (Int32 i = 0; i <
nb_index; ++i) {
434 Int64
zci = (Int64)(indexes[i]) * m_extent.v;
435 for (Int32 z = 0, n = m_extent.v; z < n; ++z)
436 destination[
zci + z] = source[z];
447 const Int32
nb_index = indexes.size() / 2;
456 for (Int64 i = 0; i <
nb_value; i += m_extent.v) {
459 for (Int32 z = 0, n = m_extent.v; z < n; ++z)
466 for (
Int32 i = 0; i < nb_index; ++i) {
467 Int32 index0 = indexes[i * 2];
468 Int32 index1 = indexes[(i * 2) + 1];
469 Span<std::byte> orig_view_bytes = multi_views[index0];
470 auto* orig_view_data =
reinterpret_cast<DataType*
>(orig_view_bytes.data());
473 Span<DataType> orig_view = { orig_view_data, orig_view_bytes.size() / (
Int64)
sizeof(DataType) };
475 for (
Int32 z = 0, n = m_extent.v; z < n; ++z)
476 orig_view[zci + z] = source[z];
481 void _copyTo(SmallSpan<const Int32> indexes, Span<const DataType> source,
482 Span<DataType> destination)
488 Int32 nb_index = indexes.size();
490 for (
Int32 i = 0; i < nb_index; ++i) {
493 for (
Int32 z = 0, n = m_extent.v; z < n; ++z)
494 destination[zci + z] = source[z_index + z];
498 void _copyTo(SmallSpan<const Int32> indexes, SmallSpan<
const Span<const std::byte>> multi_views,
499 Span<DataType> destination)
505 const Int32 value_size = indexes.size() / 2;
506 for (
Int32 i = 0; i < value_size; ++i) {
507 Int32 index0 = indexes[i * 2];
508 Int32 index1 = indexes[(i * 2) + 1];
509 Span<const std::byte> orig_view_bytes = multi_views[index0];
510 auto* orig_view_data =
reinterpret_cast<const DataType*
>(orig_view_bytes.data());
513 Span<const DataType> orig_view = { orig_view_data, orig_view_bytes.size() / (
Int64)
sizeof(DataType) };
516 for (
Int32 z = 0, n = m_extent.v; z < n; ++z)
517 destination[z_index + z] = orig_view[zci + z];