XeTLA v0.3.6
IntelĀ® Xe Templates for Linear Algebra - API Definition Document
 
Loading...
Searching...
No Matches
raw_send.hpp
Go to the documentation of this file.
1/*******************************************************************************
2* Copyright (c) 2022-2023 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*******************************************************************************/
16
19
20#pragma once
21
25
26namespace gpu::xetla {
27
30
50template <typename T1, uint32_t n1, typename T2, uint32_t n2, uint8_t execSize,
51 uint8_t sfid, uint8_t numSrc0, uint8_t numDst, uint8_t isEOT = 0,
52 uint8_t isSendc = 0, int N = 16>
54 xetla_vector<T2, n2> msgSrc0, uint32_t exDesc, uint32_t msgDesc,
55 xetla_mask<N> mask = 1) {
56 msgDst.xetla_format<uint_type_t<T1>>()
57 = __ESIMD_ENS::raw_send<uint_type_t<T1>, n1>(
58 msgDst.xetla_format<uint_type_t<T1>>(), msgSrc0, exDesc,
59 msgDesc, execSize, sfid, numSrc0, numDst, isEOT, isSendc,
60 mask);
61}
62
86template <typename T1, uint32_t n1, typename T2, uint32_t n2, typename T3,
87 uint32_t n3, uint8_t execSize, uint8_t sfid, uint8_t numSrc0,
88 uint8_t numSrc1, uint8_t numDst, uint8_t isEOT = 0, uint8_t isSendc = 0,
89 int N = 16>
92 uint32_t exDesc, uint32_t msgDesc, xetla_mask<N> mask = 1) {
93 msgDst.xetla_format<uint_type_t<T1>>()
94 = __ESIMD_ENS::raw_sends<uint_type_t<T1>, n1>(
95 msgDst.xetla_format<uint_type_t<T1>>(), msgSrc0, msgSrc1,
96 exDesc, msgDesc, execSize, sfid, numSrc0, numSrc1, numDst,
97 isEOT, isSendc, mask);
98}
99
115template <typename T1, uint32_t n1, uint8_t execSize, uint8_t sfid,
116 uint8_t numSrc0, uint8_t isEOT = 0, uint8_t isSendc = 0, int N = 16>
117__XETLA_API void xetla_raw_send(xetla_vector<T1, n1> msgSrc0, uint32_t exDesc,
118 uint32_t msgDesc, xetla_mask<N> mask = 1) {
119 __ESIMD_ENS::raw_send(msgSrc0, exDesc, msgDesc, execSize, sfid, numSrc0,
120 isEOT, isSendc, mask);
121}
122
142template <typename T1, uint32_t n1, typename T2, uint32_t n2, uint8_t execSize,
143 uint8_t sfid, uint8_t numSrc0, uint8_t numSrc1, uint8_t isEOT = 0,
144 uint8_t isSendc = 0, int N = 16>
146 xetla_vector<T2, n2> msgSrc1, uint32_t exDesc, uint32_t msgDesc,
147 xetla_mask<N> mask = 1) {
148 __ESIMD_ENS::raw_sends<T1, n1, uint_type_t<T2>, n2>(msgSrc0,
149 msgSrc1.xetla_format<uint_type_t<T2>>(), exDesc, msgDesc, execSize,
150 sfid, numSrc0, numSrc1, isEOT, isSendc, mask);
151}
152
154
155} // namespace gpu::xetla
C++ API.
C++ API.
#define __XETLA_API
Definition common.hpp:43
Workaround for ESIMD vector(1D) ref type.
Definition base_types.hpp:187
#define __REF__
Workaround for ESIMD reference usage.
Definition base_types.hpp:177
__ESIMD_NS::simd< native_type_t< Ty >, N > xetla_vector
wrapper for xetla_vector.
Definition base_types.hpp:149
typename uint_type< T >::type uint_type_t
Return the uint representation of type T.
Definition base_types.hpp:137
__ESIMD_NS::simd_mask< N > xetla_mask
wrapper for xetla_mask.
Definition base_types.hpp:165
__XETLA_API void xetla_raw_send(xetla_vector_ref< T1, n1 > __REF__ msgDst, xetla_vector< T2, n2 > msgSrc0, uint32_t exDesc, uint32_t msgDesc, xetla_mask< N > mask=1)
Raw send with one source operand and one destination operand.
Definition raw_send.hpp:53
Definition arch_config.hpp:24