Skip to content

Commit 2c3875e

Browse files
committed
WIP
1 parent 33dcdfc commit 2c3875e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/xsimd/types/xsimd_api.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,17 @@ namespace xsimd
14351435
return batch<T, A>::load(ptr, mask, aligned_mode {});
14361436
}
14371437

1438+
/**
1439+
* @ingroup batch_data_transfer
1440+
*
1441+
* Creates a batch from the buffer \c ptr using a mask. Elements
1442+
* corresponding to \c false in the mask are not accessed in memory and are
1443+
* zero-initialized in the resulting batch.
1444+
* @param ptr the memory buffer to read. The buffer does not need to be
1445+
* aligned.
1446+
* @param mask selection mask for the elements to load
1447+
* @return a new batch instance
1448+
*/
14381449
template <class T, class A = default_arch, bool... Values, class From>
14391450
XSIMD_INLINE batch<T, A> load(From const* ptr,
14401451
batch_bool_constant<T, A, Values...> const& mask,
@@ -2461,6 +2472,16 @@ namespace xsimd
24612472
val.store(mem, mask, aligned_mode {});
24622473
}
24632474

2475+
/**
2476+
* @ingroup batch_data_transfer
2477+
*
2478+
* Copy selected elements of batch \c val to the buffer \c mem using a mask.
2479+
* Elements corresponding to \c false in the mask are not written to memory.
2480+
* @param mem the memory buffer to write to. The buffer does not need to be
2481+
* aligned.
2482+
* @param val the batch to copy from
2483+
* @param mask selection mask for the elements to store
2484+
*/
24642485
template <class T, class A = default_arch, bool... Values>
24652486
XSIMD_INLINE void store(T* mem,
24662487
batch<T, A> const& val,

0 commit comments

Comments
 (0)