@@ -517,7 +517,8 @@ __ESIMD_API void scalar_store(AccessorTy acc, uint32_t offset, T val) {
517
517
// / undefined.
518
518
// / @return Read data - up to N*4 values of type \c Tx.
519
519
// /
520
- template <rgba_channel_mask RGBAMask, typename T, int N>
520
+ template <rgba_channel_mask RGBAMask = rgba_channel_mask::ABGR, typename T,
521
+ int N>
521
522
__ESIMD_API std::enable_if_t <(N == 8 || N == 16 || N == 32 ) && sizeof (T) == 4 ,
522
523
simd<T, N * get_num_channels_enabled (RGBAMask)>>
523
524
gather_rgba(const T *p, simd<uint32_t , N> offsets, simd_mask<N> mask = 1 ) {
@@ -568,7 +569,8 @@ template <rgba_channel_mask M> static void validate_rgba_write_channel_mask() {
568
569
// / predicate are not accessed. Their values in the resulting vector are
569
570
// / undefined.
570
571
// /
571
- template <rgba_channel_mask RGBAMask, typename T, int N>
572
+ template <rgba_channel_mask RGBAMask = rgba_channel_mask::ABGR, typename T,
573
+ int N>
572
574
__ESIMD_API std::enable_if_t <(N == 8 || N == 16 || N == 32 ) && sizeof (T) == 4 >
573
575
scatter_rgba (T *p, simd<uint32_t , N> offsets,
574
576
simd<T, N * get_num_channels_enabled (RGBAMask)> vals,
@@ -613,7 +615,8 @@ __ESIMD_API std::
613
615
// / undefined.
614
616
// / @return Read data - up to N*4 values of type \c Tx.
615
617
// /
616
- template <rgba_channel_mask RGBAMask, typename AccessorT, int N,
618
+ template <rgba_channel_mask RGBAMask = rgba_channel_mask::ABGR,
619
+ typename AccessorT, int N,
617
620
typename T = typename AccessorT::value_type>
618
621
__ESIMD_API std::enable_if_t <((N == 8 || N == 16 || N == 32 ) &&
619
622
sizeof(T) == 4 && !std::is_pointer_v<AccessorT>),
@@ -642,7 +645,8 @@ gather_rgba(AccessorT acc, simd<uint32_t, N> offsets,
642
645
// / @param global_offset Byte offset of the pixels relative to the base pointer.
643
646
// / @param mask Operation mask. All-1 by default.
644
647
// /
645
- template <rgba_channel_mask RGBAMask, typename AccessorT, int N,
648
+ template <rgba_channel_mask RGBAMask = rgba_channel_mask::ABGR,
649
+ typename AccessorT, int N,
646
650
typename T = typename AccessorT::value_type>
647
651
__ESIMD_API std::enable_if_t <(N == 8 || N == 16 || N == 32 ) && sizeof(T) == 4 &&
648
652
!std::is_pointer_v<AccessorT>>
0 commit comments