XeTLA v0.3.6
IntelĀ® Xe Templates for Linear Algebra - API Definition Document
 
Loading...
Searching...
No Matches
base_types.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
22#include "common/common.hpp"
23
24namespace gpu::xetla {
25
28struct int4x2 {
29 uint8_t data;
30
31 operator uint8_t() const { return data; }
32 int4x2(uint8_t val) { data = val; }
33};
34
36template <>
38 static constexpr bool value = true;
39};
40
42template <>
44 using type = uint8_t;
45};
46
47} // namespace gpu::xetla
Definition arch_config.hpp:24
xetla 4bits data packed as 8bits data type.
Definition base_types.hpp:28
uint8_t data
Definition base_types.hpp:29
int4x2(uint8_t val)
Definition base_types.hpp:32
Used to check if the type is xetla internal data type.
Definition base_types.hpp:67
static constexpr bool value
Definition base_types.hpp:68
uint8_t type
Definition base_types.hpp:44
Set the native data type of T.
Definition base_types.hpp:100