ThunderSVM
ThunderSVM: An Open-Source SVM Library on GPUs and CPUs
kernelmatrix_kernel.h
1 //
2 // Created by jiashuai on 17-9-20.
3 //
4 
5 #ifndef THUNDERSVM_KERNELMATRIX_KERNEL_H
6 #define THUNDERSVM_KERNELMATRIX_KERNEL_H
7 
8 #include "thundersvm/thundersvm.h"
9 #include <thundersvm/clion_cuda.h>
10 #include <thundersvm/syncarray.h>
11 
12 namespace svm_kernel {
13  void
14  get_working_set_ins(const SyncArray<float_type> &val, const SyncArray<int> &col_ind, const SyncArray<int> &row_ptr,
15  const SyncArray<int> &data_row_idx, SyncArray<float_type> &data_rows, int m);
16 
17  void
18  RBF_kernel(const SyncArray<float_type> &self_dot0, const SyncArray<float_type> &self_dot1,
19  SyncArray<float_type> &dot_product, int m,
20  int n,
21  float_type gamma);
22 
23  void
24  RBF_kernel(const SyncArray<int> &self_dot0_idx, const SyncArray<float_type> &self_dot1,
25  SyncArray<float_type> &dot_product, int m,
26  int n, float_type gamma);
27 
28  void poly_kernel(SyncArray<float_type> &dot_product, float_type gamma, float_type coef0, int degree, int mn);
29 
30  void sigmoid_kernel(SyncArray<float_type> &dot_product, float_type gamma, float_type coef0, int mn);
31 
32  void sum_kernel_values(const SyncArray<float_type> &coef, int total_sv, const SyncArray<int> &sv_start,
33  const SyncArray<int> &sv_count, const SyncArray<float_type> &rho,
34  const SyncArray<float_type> &k_mat,
35  SyncArray<float_type> &dec_values, int n_classes, int n_instances);
36 
37  void dns_csr_mul(int m, int n, int k, const SyncArray<float_type> &dense_mat, const SyncArray<float_type> &csr_val,
38  const SyncArray<int> &csr_row_ptr, const SyncArray<int> &csr_col_ind, int nnz,
39  SyncArray<float_type> &result);
40 }
41 #endif //THUNDERSVM_KERNELMATRIX_KERNEL_H
42 
Definition: kernelmatrix_kernel.h:12