PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
Functions
svm_kernel.cl File Reference

Defines the kernel functions for the C-SVM using the CUDA backend. More...

Functions

__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...
 

Detailed Description

Defines the kernel functions for the C-SVM using the CUDA backend.

Author
Alexander Van Craen
Marcel Breyer
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.

Function Documentation

◆ 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_typethe type of the data
Parameters
[in]qthe q vector
[out]retthe result vector
[in]dthe right-hand side of the equation
[in]data_dthe one-dimension data matrix
[in]QA_costthe bottom right matrix entry multiplied by cost
[in]cost1 / the cost parameter in the C-SVM
[in]num_rowsthe number of columns in the data matrix
[in]feature_rangenumber of features used for the calculation on the device id
[in]adddenotes whether the values are added or subtracted from the result vector
[in]idthe 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_typethe type of the data
Parameters
[in]qthe q vector
[out]retthe result vector
[in]dthe right-hand side of the equation
[in]data_dthe one-dimension data matrix
[in]QA_costhe bottom right matrix entry multiplied by cost
[in]cost1 / the cost parameter in the C-SVM
[in]num_rowsthe number of columns in the data matrix
[in]num_colsthe number of rows in the data matrix
[in]adddenotes whether the values are added or subtracted from the result vector
[in]degreethe degree parameter used in the polynomial kernel function
[in]gammathe gamma parameter used in the polynomial kernel function
[in]coef0the 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_typethe type of the data
Parameters
[in]qthe q vector
[out]retthe result vector
[in]dthe right-hand side of the equation
[in]data_dthe one-dimension data matrix
[in]QA_costhe bottom right matrix entry multiplied by cost
[in]cost1 / the cost parameter in the C-SVM
[in]num_rowsthe number of columns in the data matrix
[in]num_colsthe number of rows in the data matrix
[in]adddenotes whether the values are added or subtracted from the result vector
[in]gammathe gamma parameter used in the rbf kernel function