GCC Code Coverage Report
Directory: . Exec Total Coverage
File: package/x86_64/haswell/gsks.cpp Lines: 0 11 0.0 %
Date: 2019-01-14 Branches: 0 4 0.0 %

Line Exec Source
1
/**
2
 *  HMLP (High-Performance Machine Learning Primitives)
3
 *
4
 *  Copyright (C) 2014-2017, The University of Texas at Austin
5
 *
6
 *  This program is free software: you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation, either version 3 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program. If not, see the LICENSE file.
18
 *
19
 **/
20
21
22
23
24
/** GSKS templates */
25
#include <primitives/gsks.hpp>
26
27
/** reference kernels */
28
#include <gsks_ref_mrxnr.hpp>
29
30
/** Haswell kernels */
31
#include <rank_k_d8x6.hpp>
32
//#include <gsks_d8x6.hpp>
33
34
35
using namespace hmlp;
36
37
38
void gsks
39
(
40
  kernel_s<float, float> *kernel,
41
  int m, int n, int k,
42
  float *u,            int *umap,
43
  float *A, float *A2, int *amap,
44
  float *B, float *B2, int *bmap,
45
  float *w,            int *wmap
46
)
47
{
48
  printf( "gsks() in single precision is not implemented yet\n" );
49
  exit( 1 );
50
};
51
52
53
54
void gsks
55
(
56
  kernel_s<double, double> *kernel,
57
  int m, int n, int k,
58
  double *u,             int *umap,
59
  double *A, double *A2, int *amap,
60
  double *B, double *B2, int *bmap,
61
  double *w,             int *wmap
62
)
63
{
64
  switch ( kernel->type )
65
  {
66
    case GAUSSIAN:
67
    {
68
      /** kernel instances */
69
//      rank_k_asm_d8x6 semiringkernel;
70
//      gsks_gaussian_int_d8x6 microkernel;
71
//
72
//      gsks::gsks<
73
//        /** MC, NC, KC, MR, NR */
74
//        72, 960, 256, 8, 6,
75
//        /** PACK_MC, PACK_NC, PACK_MR, PACK_NR, SIMD_SIZE */
76
//        72, 960,      8, 6, 32,
77
//        /** USE_L2NORM, USE_VAR_BANDWIDTH, USE_STRASSEN */
78
//        true, false, false,
79
//        rank_k_asm_d8x6, gsks_gaussian_int_d8x6,
80
//        double, double, double, double>
81
//      (
82
//        kernel,
83
//        m, n, k,
84
//        u,     umap,
85
//        A, A2, amap,
86
//        B, B2, bmap,
87
//        w,     wmap,
88
//        semiringkernel, microkernel
89
//      );
90
      break;
91
    }
92
    case GAUSSIAN_VAR_BANDWIDTH:
93
    {
94
      break;
95
    }
96
    case POLYNOMIAL:
97
    {
98
//      rank_k_asm_d8x6 semiringkernel;
99
//      gsks_polynomial_int_d8x6 microkernel;
100
//
101
//      gsks::gsks<
102
//        72, 960, 256, 8, 6,
103
//        72, 960,      8, 6, 32,
104
//        true, false, false,
105
//        rank_k_asm_d8x6, gsks_polynomial_int_d8x6,
106
//        double, double, double, double>
107
//      (
108
//        kernel,
109
//        m, n, k,
110
//        u,     umap,
111
//        A, A2, amap,
112
//        B, B2, bmap,
113
//        w,     wmap,
114
//        semiringkernel, microkernel
115
//      );
116
      break;
117
    }
118
    case LAPLACE:
119
      break;
120
    case TANH:
121
      break;
122
    case QUARTIC:
123
      break;
124
    case MULTIQUADRATIC:
125
      break;
126
    case EPANECHNIKOV:
127
      break;
128
    default:
129
      exit( 1 );
130
  }
131
};
132
133
134
135
136
137
138
139
void dgsks_ref
140
(
141
  kernel_s<double, double> *kernel,
142
  int m, int n, int k,
143
  double *u,             int *umap,
144
  double *A, double *A2, int *amap,
145
  double *B, double *B2, int *bmap,
146
  double *w,             int *wmap
147
)
148
{
149
  gsks::gsks_ref<double>
150
  (
151
    kernel,
152
    m, n, k,
153
    u,     umap,
154
    A, A2, amap,
155
    B, B2, bmap,
156
    w,     wmap
157
  );
158
}