Defines the kernel functions for the C-SVM using the CUDA backend.
More...
|
__kernel void | device_kernel_linear (__global const real_type *q, __global real_type *ret, __global const real_type *d, __global const real_type *data_d, const real_type QA_cost, const real_type cost, const kernel_index_type num_rows, const kernel_index_type feature_range, const real_type add, const kernel_index_type id) |
| Calculates the C-SVM kernel using the linear kernel function. More...
|
|
__kernel void | device_kernel_polynomial (__global const real_type *q, __global real_type *ret, __global const real_type *d, __global const real_type *data_d, const real_type QA_cost, const real_type cost, const kernel_index_type num_rows, const kernel_index_type num_cols, const real_type add, const int degree, const real_type gamma, const real_type coef0) |
| Calculates the C-SVM kernel using the polynomial kernel function. More...
|
|
__kernel void | device_kernel_rbf (__global const real_type *q, __global real_type *ret, __global const real_type *d, __global const real_type *data_d, const real_type QA_cost, const real_type cost, const kernel_index_type num_rows, const kernel_index_type num_cols, const real_type add, const real_type gamma) |
| Calculates the C-SVM kernel using the radial basis function kernel function. More...
|
|
Defines the kernel functions for the C-SVM using the CUDA backend.
- Author
- Alexander Van Craen
-
Marcel Breyer
- Copyright
- 2018-today The PLSSVM project - All Rights Reserved
- License
- This file is part of the PLSSVM project which is released under the MIT license. See the LICENSE.md file in the project root for full license information.
◆ device_kernel_linear()
__kernel void device_kernel_linear |
( |
__global const real_type * |
q, |
|
|
__global real_type * |
ret, |
|
|
__global const real_type * |
d, |
|
|
__global const real_type * |
data_d, |
|
|
const real_type |
QA_cost, |
|
|
const real_type |
cost, |
|
|
const kernel_index_type |
num_rows, |
|
|
const kernel_index_type |
feature_range, |
|
|
const real_type |
add, |
|
|
const kernel_index_type |
id |
|
) |
| |
Calculates the C-SVM kernel using the linear kernel function.
Supports multi-GPU execution.
- Template Parameters
-
real_type | the type of the data |
- Parameters
-
[in] | q | the q vector |
[out] | ret | the result vector |
[in] | d | the right-hand side of the equation |
[in] | data_d | the one-dimension data matrix |
[in] | QA_cost | the bottom right matrix entry multiplied by cost |
[in] | cost | 1 / the cost parameter in the C-SVM |
[in] | num_rows | the number of columns in the data matrix |
[in] | feature_range | number of features used for the calculation on the device id |
[in] | add | denotes whether the values are added or subtracted from the result vector |
[in] | id | the id of the current device |
◆ device_kernel_polynomial()
__kernel void device_kernel_polynomial |
( |
__global const real_type * |
q, |
|
|
__global real_type * |
ret, |
|
|
__global const real_type * |
d, |
|
|
__global const real_type * |
data_d, |
|
|
const real_type |
QA_cost, |
|
|
const real_type |
cost, |
|
|
const kernel_index_type |
num_rows, |
|
|
const kernel_index_type |
num_cols, |
|
|
const real_type |
add, |
|
|
const int |
degree, |
|
|
const real_type |
gamma, |
|
|
const real_type |
coef0 |
|
) |
| |
Calculates the C-SVM kernel using the polynomial kernel function.
Currently only single GPU execution is supported.
- Template Parameters
-
real_type | the type of the data |
- Parameters
-
[in] | q | the q vector |
[out] | ret | the result vector |
[in] | d | the right-hand side of the equation |
[in] | data_d | the one-dimension data matrix |
[in] | QA_cost | he bottom right matrix entry multiplied by cost |
[in] | cost | 1 / the cost parameter in the C-SVM |
[in] | num_rows | the number of columns in the data matrix |
[in] | num_cols | the number of rows in the data matrix |
[in] | add | denotes whether the values are added or subtracted from the result vector |
[in] | degree | the degree parameter used in the polynomial kernel function |
[in] | gamma | the gamma parameter used in the polynomial kernel function |
[in] | coef0 | the coef0 parameter used in the polynomial kernel function |
◆ device_kernel_rbf()
__kernel void device_kernel_rbf |
( |
__global const real_type * |
q, |
|
|
__global real_type * |
ret, |
|
|
__global const real_type * |
d, |
|
|
__global const real_type * |
data_d, |
|
|
const real_type |
QA_cost, |
|
|
const real_type |
cost, |
|
|
const kernel_index_type |
num_rows, |
|
|
const kernel_index_type |
num_cols, |
|
|
const real_type |
add, |
|
|
const real_type |
gamma |
|
) |
| |
Calculates the C-SVM kernel using the radial basis function kernel function.
Currently only single GPU execution is supported.
- Template Parameters
-
real_type | the type of the data |
- Parameters
-
[in] | q | the q vector |
[out] | ret | the result vector |
[in] | d | the right-hand side of the equation |
[in] | data_d | the one-dimension data matrix |
[in] | QA_cost | he bottom right matrix entry multiplied by cost |
[in] | cost | 1 / the cost parameter in the C-SVM |
[in] | num_rows | the number of columns in the data matrix |
[in] | num_cols | the number of rows in the data matrix |
[in] | add | denotes whether the values are added or subtracted from the result vector |
[in] | gamma | the gamma parameter used in the rbf kernel function |