| 92 | } |
| 93 | |
| 94 | void poly_kernel(SyncArray<kernel_type> &dot_product, kernel_type gamma, kernel_type coef0, int degree, int mn) { |
| 95 | kernel_type *dot_product_data = dot_product.host_data(); |
| 96 | #pragma omp parallel for schedule(guided) |
| 97 | for (int idx = 0; idx < mn; idx++) { |
| 98 | dot_product_data[idx] = powf(gamma * dot_product_data[idx] + coef0, degree); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void sigmoid_kernel(SyncArray<kernel_type> &dot_product, kernel_type gamma, kernel_type coef0, int mn) { |
| 103 | kernel_type *dot_product_data = dot_product.host_data(); |
no test coverage detected