blob: bcbd3d35f57210a3de9edab6035114b2b8206f08 [file] [log] [blame]
Georgios Pinitas7cd26d42019-01-09 18:35:17 +00001/*
Georgios Pinitas1d480652019-01-23 11:24:50 +00002 * Copyright (c) 2019 Arm Limited.
Georgios Pinitas7cd26d42019-01-09 18:35:17 +00003 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#pragma once
25
26#ifdef __ARM_FEATURE_SVE
27
28#include <cstdint>
29
30
31namespace arm_gemm
32{
33
34// Actual kernel implementations
35void sve_native_u8u32_dot_4VLx4(const uint8_t *, int, const uint8_t *, int ldb, uint32_t *, int, uint32_t, int, int, int);
36
37class native_u8u32_dot_4VLx4
38{
39public:
40 typedef uint8_t operand_type;
41 typedef uint32_t result_type;
42
43 typedef void (*kern_type)(const uint8_t *, int, const uint8_t *, int ldb, uint32_t *, int, uint32_t, int, int, int);
44
45 /* Kernel blocking parameters */
Georgios Pinitas1d480652019-01-23 11:24:50 +000046 static unsigned int out_height()
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000047 {
48 return 4;
49 }
50
Georgios Pinitas1d480652019-01-23 11:24:50 +000051 static unsigned int out_width()
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000052 {
53 return get_vector_length<uint32_t>() * 4;
54 }
55
Georgios Pinitas1d480652019-01-23 11:24:50 +000056 static unsigned int k_unroll()
Georgios Pinitas7cd26d42019-01-09 18:35:17 +000057 {
58 return 4;
59 }
60
61
62
63 // Default to the generic kernel
64 kern_type kernel=sve_native_u8u32_dot_4VLx4;
65
66 native_u8u32_dot_4VLx4(const CPUInfo *ci)
67 {
68
69 }
70};
71
72} // namespace arm_gemm
73
74#endif // __ARM_FEATURE_SVE