1 /******************************************************************************
2 * Copyright (c) Intel Corporation - All rights reserved.                      *
3 * This file is part of the LIBXSMM library.                                   *
4 *                                                                             *
5 * For information on the license, see the LICENSE file.                       *
6 * Further information: https://github.com/hfp/libxsmm/                        *
7 * SPDX-License-Identifier: BSD-3-Clause                                       *
8 ******************************************************************************/
9 /* Hans Pabst (Intel Corp.)
10 ******************************************************************************/
11 #ifndef LIBXSMM_BLOCKED_GEMM_TYPES_H
12 #define LIBXSMM_BLOCKED_GEMM_TYPES_H
13 
14 #include "libxsmm_gemm.h"
15 
16 #if !defined(LIBXSMM_BLOCKED_GEMM_CHECKS) && !defined(NDEBUG)
17 # define LIBXSMM_BLOCKED_GEMM_CHECKS
18 #endif
19 
20 
21 LIBXSMM_EXTERN_C typedef union LIBXSMM_RETARGETABLE libxsmm_blocked_gemm_lock {
22   char pad[LIBXSMM_CACHELINE];
23   volatile LIBXSMM_ATOMIC_LOCKTYPE state;
24 } libxsmm_blocked_gemm_lock;
25 
26 
27 LIBXSMM_EXTERN_C struct LIBXSMM_RETARGETABLE libxsmm_blocked_gemm_handle {
28   union { double d; float s; int w; } alpha, beta;
29   libxsmm_gemm_precision iprec, oprec;
30   libxsmm_xmmfunction kernel_pf;
31   libxsmm_xmmfunction kernel;
32   libxsmm_barrier* barrier;
33   libxsmm_blocked_gemm_lock* locks;
34   libxsmm_blocked_gemm_order order;
35   libxsmm_blasint m, n, k, bm, bn, bk;
36   libxsmm_blasint b_m1, b_n1, b_k1, b_k2;
37   libxsmm_blasint mb, nb, kb;
38   void* buffer;
39   int nthreads;
40 };
41 
42 #endif /*LIBXSMM_BLOCKED_GEMM_TYPES_H*/
43 
44