XeTLA v0.3.6
IntelĀ® Xe Templates for Linear Algebra - API Definition Document
 
Loading...
Searching...
No Matches
barrier.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
23
24namespace gpu::xetla {
25
28
33template <uint8_t NbarCount>
35 if constexpr (NbarCount != 0) {
36 __ESIMD_ENS::named_barrier_init<NbarCount>();
37 }
38}
39
52__XETLA_API void named_barrier_signal(uint8_t barrier_id,
53 uint8_t producer_consumer_mode, uint32_t num_producers,
54 uint32_t num_consumers) {
55 __ESIMD_ENS::named_barrier_signal(
56 barrier_id, producer_consumer_mode, num_producers, num_consumers);
57}
58
64__XETLA_API void named_barrier_wait(uint8_t barrier_id) {
65 __ESIMD_ENS::named_barrier_wait(barrier_id);
66}
67
69
70} // namespace gpu::xetla
C++ API.
#define __XETLA_API
Definition common.hpp:43
__XETLA_API void named_barrier_wait(uint8_t barrier_id)
Wait on a named barrier.
Definition barrier.hpp:64
__XETLA_API void xetla_nbarrier_init()
Initialize the number of named barrier index for a kernel.
Definition barrier.hpp:34
__XETLA_API void named_barrier_signal(uint8_t barrier_id, uint8_t producer_consumer_mode, uint32_t num_producers, uint32_t num_consumers)
Perform signal operation for the given named barrier id.
Definition barrier.hpp:52
Definition arch_config.hpp:24