SHOGUN  6.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
Namespaces | Classes | Enumerations | Functions
shogun::linalg Namespace Reference

Namespaces

 implementation
 
 ocl
 
 operations
 
 special_purpose
 
 util
 

Classes

struct  Block
 Generic class Block which wraps a matrix class and contains block specific information, providing a uniform way to deal with matrix blocks for all supported backend matrices. More...
 
struct  linalg_traits
 General purpose linalg_traits for compile time information about backends set per module (see below). This uses the backend from the modules. To get the backend set globally, use linalg_traits<ModuleName>::backend. More...
 

Enumerations

enum  Backend { EIGEN3, NATIVE, DEFAULT = 0 }
 All currently supported linear algebra backend libraries, with a default backend, which will be used for all the tasks if any particular backend is not set explicitly via cmake options. A Native backend is also defined to accommodate Shogun's native implementation of some operations. More...
 

Functions

template<class Matrix >
Block< Matrix > block (Matrix matrix, index_t row_begin, index_t col_begin, index_t row_size, index_t col_size)
 
template<class Operand , class UnaryOp >
auto elementwise_compute (Operand operand, UnaryOp unary_op) -> typename Operand::template container_type< decltype(unary_op(operand.data()[0]))>
 
template<class Operand , class UnaryOp >
void elementwise_compute_inplace (Operand operand, UnaryOp unary_op)
 
template<Backend backend, class Operand >
Operand::template
container_type< typename
operations::sin< typename
Operand::Scalar >::return_type > 
elementwise_sin (Operand operand)
 
template<Backend backend, class Operand >
void elementwise_sin_inplace (Operand operand)
 
template<typename T , template< typename > class Container>
LinalgBackendBaseinfer_backend (const Container< T > &a)
 
template<typename T , template< typename > class Container>
LinalgBackendBaseinfer_backend (const Container< T > &a, const Container< T > &b)
 
template<typename T >
void to_gpu (SGVector< T > &a, SGVector< T > &b)
 
template<typename T >
void to_gpu (SGMatrix< T > &a, SGMatrix< T > &b)
 
template<typename T , template< typename > class Container>
void to_gpu (Container< T > &a)
 
template<typename T >
void from_gpu (SGVector< T > &a, SGVector< T > &b)
 
template<typename T >
void from_gpu (SGMatrix< T > &a, SGMatrix< T > &b)
 
template<typename T , template< typename > class Container>
void from_gpu (Container< T > &a)
 
template<typename T >
void add (SGVector< T > &a, SGVector< T > &b, SGVector< T > &result, T alpha=1, T beta=1)
 
template<typename T >
void add (SGMatrix< T > &a, SGMatrix< T > &b, SGMatrix< T > &result, T alpha=1, T beta=1)
 
template<typename T , template< typename > class Container>
Container< T > add (Container< T > &a, Container< T > &b, T alpha=1, T beta=1)
 
template<typename T >
SGMatrix< T > cholesky_factor (const SGMatrix< T > &A, const bool lower=true)
 
template<typename T >
SGVector< T > cholesky_solver (const SGMatrix< T > &L, const SGVector< T > &b, const bool lower=true)
 
template<typename T >
dot (const SGVector< T > &a, const SGVector< T > &b)
 
template<typename T >
void element_prod (Block< SGMatrix< T >> &a, Block< SGMatrix< T >> &b, SGMatrix< T > &result)
 
template<typename T >
SGMatrix< T > element_prod (Block< SGMatrix< T >> &a, Block< SGMatrix< T >> &b)
 
template<typename T >
void element_prod (SGMatrix< T > &a, SGMatrix< T > &b, SGMatrix< T > &result)
 
template<typename T >
SGMatrix< T > element_prod (SGMatrix< T > &a, SGMatrix< T > &b)
 
template<typename T >
void matrix_prod (SGMatrix< T > &A, SGVector< T > &b, SGVector< T > &result, bool transpose=false)
 
template<typename T >
SGVector< T > matrix_prod (SGMatrix< T > &A, SGVector< T > &b, bool transpose=false)
 
template<typename T >
void matrix_prod (SGMatrix< T > &A, SGMatrix< T > &B, SGMatrix< T > &result, bool transpose_A=false, bool transpose_B=false)
 
template<typename T >
SGMatrix< T > matrix_prod (SGMatrix< T > &A, SGMatrix< T > &B, bool transpose_A=false, bool transpose_B=false)
 
template<typename T , template< typename > class Container>
max (const Container< T > &a)
 
template<typename T , template< typename > class Container>
std::enable_if<!std::is_same
< T, complex128_t >::value,
float64_t >::type 
mean (const Container< T > &a)
 
template<template< typename > class Container>
complex128_t mean (const Container< complex128_t > &a)
 
template<typename T , template< typename > class Container>
void range_fill (Container< T > &a, const T start=0)
 
template<typename T >
void scale (SGVector< T > &a, SGVector< T > &result, T alpha=1)
 
template<typename T >
void scale (SGMatrix< T > &A, SGMatrix< T > &result, T alpha=1)
 
template<typename T , template< typename > class Container>
Container< T > scale (Container< T > &a, T alpha=1)
 
template<typename T , template< typename > class Container>
void set_const (Container< T > &a, T value)
 
template<typename T , template< typename > class Container>
sum (const Container< T > &a, bool no_diag=false)
 
template<typename T >
sum (const Block< SGMatrix< T >> &a, bool no_diag=false)
 
template<typename T >
sum_symmetric (const SGMatrix< T > &a, bool no_diag=false)
 
template<typename T >
sum_symmetric (const Block< SGMatrix< T >> &a, bool no_diag=false)
 
template<typename T >
SGVector< T > colwise_sum (const SGMatrix< T > &mat, bool no_diag=false)
 
template<typename T >
SGVector< T > colwise_sum (const Block< SGMatrix< T >> &a, bool no_diag=false)
 
template<typename T >
SGVector< T > rowwise_sum (const SGMatrix< T > &mat, bool no_diag=false)
 
template<typename T >
SGVector< T > rowwise_sum (const Block< SGMatrix< T >> &a, bool no_diag=false)
 
template<typename T >
void logistic (SGMatrix< T > &a, SGMatrix< T > &result)
 

Detailed Description

This namespace contains all linear algebra specific modules and operations for which we (may) rely on multiple implementation, either native or making use of some supported third party external linear algebra libraries.

Enumeration Type Documentation

enum Backend
strong

All currently supported linear algebra backend libraries, with a default backend, which will be used for all the tasks if any particular backend is not set explicitly via cmake options. A Native backend is also defined to accommodate Shogun's native implementation of some operations.

Developer's Note :

  • Changing the default backend would just require to change it in the Backend enum
  • Please refer to the developer's wiki (link) for the design and structure of internal linalg module The enum defines these backends in order of priority as default backend, as in, first defined one will be used as default.

Note - Currently EIGEN3 is the default (if it is available).

Enumerator
EIGEN3 
NATIVE 
DEFAULT 

Definition at line 74 of file linalg.h.

Function Documentation

void shogun::linalg::add ( SGVector< T > &  a,
SGVector< T > &  b,
SGVector< T > &  result,
alpha = 1,
beta = 1 
)

Performs the operation result = alpha * a + beta * b on vectors. This version returns the result in-place. User should pass an appropriately pre-allocated memory matrix Or pass one of the operands arguments (A or B) as a result

Parameters
aFirst vector
bSecond vector
resultThe vector that saves the result
alphaConstant to be multiplied by the first vector
betaConstant to be multiplied by the second vector

Definition at line 284 of file LinalgNamespace.h.

void shogun::linalg::add ( SGMatrix< T > &  a,
SGMatrix< T > &  b,
SGMatrix< T > &  result,
alpha = 1,
beta = 1 
)

Performs the operation result = alpha * a + beta * b on matrices. This version returns the result in-place. User should pass an appropriately pre-allocated memory matrix Or pass one of the operands arguments (A or B) as a result

Parameters
aFirst matrix
bSecond matrix
resultThe matrix that saves the result
alphaConstant to be multiplied by the first matrix
betaConstant to be multiplied by the second matrix

Definition at line 315 of file LinalgNamespace.h.

Container<T> shogun::linalg::add ( Container< T > &  a,
Container< T > &  b,
alpha = 1,
beta = 1 
)

Performs the operation C = alpha * A + beta * B. This version returns the result in a newly created vector or matrix.

Parameters
AFirst vector or matrix
BSecond vector or matrix
alphaConstant to be multiplied by the first vector or matrix
betaConstant to be multiplied by the second vector or matrix
Returns
The result vector or matrix

Definition at line 345 of file LinalgNamespace.h.

Block<Matrix> shogun::linalg::block ( Matrix  matrix,
index_t  row_begin,
index_t  col_begin,
index_t  row_size,
index_t  col_size 
)

Method that returns a block object. Suited for Eigen3/SGMatrix

Parameters
matrixthe matrix on which the block is defined
row_beginthe row index at which the block starts
col_beginthe col index at which the block starts
row_sizethe number of rows in the block
col_sizethe number of cols in the block
Returns
a block object on this matrix

Definition at line 105 of file mathematics/linalg/internal/Block.h.

SGMatrix<T> shogun::linalg::cholesky_factor ( const SGMatrix< T > &  A,
const bool  lower = true 
)

Compute the cholesky decomposition \(A = L L^{*}\) or \(A = U^{*} U\) of a Hermitian positive definite matrix

Parameters
AThe matrix whose cholesky decomposition is to be computed
lowerWhether to compute the upper or lower triangular Cholesky factorization (default: lower)
Returns
The upper or lower triangular Cholesky factorization

Definition at line 362 of file LinalgNamespace.h.

SGVector<T> shogun::linalg::cholesky_solver ( const SGMatrix< T > &  L,
const SGVector< T > &  b,
const bool  lower = true 
)

Solve the linear equations \(Ax=b\), given the Cholesky factorization of A, where \(A\) is a Hermitian positive definite matrix

Parameters
LTriangular matrix, Cholesky factorization of A
bRight-hand side array
lowerWhether to use L as the upper or lower triangular Cholesky factorization (default:lower)
Returns
\(\x\)

Definition at line 378 of file LinalgNamespace.h.

SGVector<T> shogun::linalg::colwise_sum ( const SGMatrix< T > &  mat,
bool  no_diag = false 
)

Method that computes colwise sum of co-efficients of a dense matrix

Parameters
Mata matrix whose colwise sum has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
The colwise sum of co-efficients computed as \(s_j=\sum_{i}b_{i,j}\)

Definition at line 873 of file LinalgNamespace.h.

SGVector<T> shogun::linalg::colwise_sum ( const Block< SGMatrix< T >> &  a,
bool  no_diag = false 
)

Method that computes the colwise sum of matrix blocks This operation works with CPU backends only.

Parameters
athe matrix-block whose colwise sum of co-efficients has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
the colwise sum of co-efficients computed as \(s_j=\sum_{i}b_{i,j}\)

Definition at line 887 of file LinalgNamespace.h.

T shogun::linalg::dot ( const SGVector< T > &  a,
const SGVector< T > &  b 
)

Vector dot-product that works with generic vectors.

Parameters
aFirst vector
bSecond vector
Returns
The dot product of \(\mathbf{a}\) and \(\mathbf{b}\), represented as \(\sum_i a_i b_i\)

Definition at line 393 of file LinalgNamespace.h.

void shogun::linalg::element_prod ( Block< SGMatrix< T >> &  a,
Block< SGMatrix< T >> &  b,
SGMatrix< T > &  result 
)

Performs the operation C = A .* B where ".*" denotes elementwise multiplication on matrix blocks.

This version returns the result in-place. User should pass an appropriately pre-allocated memory matrix.

This operation works with CPU backends only.

Parameters
aFirst matrix block
bSecond matrix block
cResult matrix

Definition at line 413 of file LinalgNamespace.h.

SGMatrix<T> shogun::linalg::element_prod ( Block< SGMatrix< T >> &  a,
Block< SGMatrix< T >> &  b 
)

Performs the operation C = A .* B where ".*" denotes elementwise multiplication on matrix blocks.

This version returns the result in a newly created matrix.

Parameters
AFirst matrix block
BSecond matrix block
Returns
The result of the operation

Definition at line 438 of file LinalgNamespace.h.

void shogun::linalg::element_prod ( SGMatrix< T > &  a,
SGMatrix< T > &  b,
SGMatrix< T > &  result 
)

Performs the operation C = A .* B where ".*" denotes elementwise multiplication.

This version returns the result in-place. User should pass an appropriately pre-allocated memory matrix Or pass one of the operands arguments (A or B) as a result

Parameters
aFirst matrix
bSecond matrix
resultResult matrix

Definition at line 463 of file LinalgNamespace.h.

SGMatrix<T> shogun::linalg::element_prod ( SGMatrix< T > &  a,
SGMatrix< T > &  b 
)

Performs the operation C = A .* B where ".*" denotes elementwise multiplication.

This version returns the result in a newly created matrix.

Parameters
AFirst matrix
BSecond matrix
Returns
The result of the operation

Definition at line 491 of file LinalgNamespace.h.

auto shogun::linalg::elementwise_compute ( Operand  operand,
UnaryOp  unary_op 
) -> typename Operand::template container_type<decltype(unary_op(operand.data()[0]))>

Template method for computing custom unary operations element-wise for matrices and vectors using NATIVE backend. Works for SGMatrix/SGVector.

This method returns the result in a newly allocated matrix/vector.

Parameters
operandThe operand on which the element-wise operation has to be performed
unary_opThe custom unary operator
Returns
The result of the unary operator applied element-wise on the operand

Definition at line 56 of file ElementwiseOperations.h.

void shogun::linalg::elementwise_compute_inplace ( Operand  operand,
UnaryOp  unary_op 
)

Template method for computing custom unary operations element-wise for matrices and vectors using NATIVE backend. Works for SGMatrix/SGVector.

This method computes the result in-place.

Parameters
operandThe operand on which the element-wise operation has to be performed
unary_opThe custom unary operator

Definition at line 80 of file ElementwiseOperations.h.

Operand::template container_type<typename operations::sin<typename Operand::Scalar>::return_type> shogun::linalg::elementwise_sin ( Operand  operand)

Template method for computing element-wise sin for matrices and vectors.

This method returns the result in a newly allocated matrix/vector.

Parameters
operandThe operand on which the element-wise operation has to be performed
Returns
The result of the unary operator applied element-wise on the operand

Definition at line 141 of file ElementwiseOperations.h.

void shogun::linalg::elementwise_sin_inplace ( Operand  operand)

Template method for computing element-wise sin for matrices and vectors.

This method computes the result in-place.

Parameters
operandThe operand on which the element-wise operation has to be performed
Returns
The result of the unary operator applied element-wise on the operand

Definition at line 165 of file ElementwiseOperations.h.

void shogun::linalg::from_gpu ( SGVector< T > &  a,
SGVector< T > &  b 
)

Fetches data from GPU memory. Transfer vectors to CPU if GPU backend is still available.

Parameters
aSGVector to be transferred
bSGVector to be set

Definition at line 193 of file LinalgNamespace.h.

void shogun::linalg::from_gpu ( SGMatrix< T > &  a,
SGMatrix< T > &  b 
)

Fetches data from GPU memory. Transfer matrices to CPU if GPU backend is still available.

Parameters
aSGMatrix to be transferred
bSGMatrix to be set

Definition at line 230 of file LinalgNamespace.h.

void shogun::linalg::from_gpu ( Container< T > &  a)

Fetches data from GPU memory. Transfer vector or matrix to CPU if GPU backend is still available.

Parameters
aSGVector or SGMatrix to be transferred

Definition at line 266 of file LinalgNamespace.h.

LinalgBackendBase* shogun::linalg::infer_backend ( const Container< T > &  a)

Infer the appropriate backend for linalg operations from the input SGVector or SGMatrix (Container).

Parameters
aSGVector or SGMatrix
Returns
See also
LinalgBackendBase pointer

Definition at line 52 of file LinalgNamespace.h.

LinalgBackendBase* shogun::linalg::infer_backend ( const Container< T > &  a,
const Container< T > &  b 
)

Infer the appropriate backend for linalg operations from the input SGVector or SGMatrix (Container). Raise error if the backends of the two Containers conflict.

Parameters
aThe first SGVector/SGMatrix
bThe second SGVector/SGMatrix
Returns
See also
LinalgBackendBase pointer

Definition at line 79 of file LinalgNamespace.h.

void shogun::linalg::logistic ( SGMatrix< T > &  a,
SGMatrix< T > &  result 
)

Applies the elementwise logistic function f(x) = 1/(1+exp(-x)) to a matrix This method returns the result in-place.

Parameters
aThe input matrix
resultThe output matrix

Definition at line 51 of file LinalgSpecialPurposes.h.

void shogun::linalg::matrix_prod ( SGMatrix< T > &  A,
SGVector< T > &  b,
SGVector< T > &  result,
bool  transpose = false 
)

Performs the operation of a matrix multiplies a vector \(x = Ab\).

This version returns the result in-place. User should pass an appropriately allocated memory matrix.

Parameters
AThe matrix
bThe vector
transposeWhether to transpose the matrix. Default false
resultResult vector

Definition at line 516 of file LinalgNamespace.h.

SGVector<T> shogun::linalg::matrix_prod ( SGMatrix< T > &  A,
SGVector< T > &  b,
bool  transpose = false 
)

Performs the operation of matrix multiply a vector \(x = Ab\). This version returns the result in a newly created vector.

Parameters
AThe matrix
bThe vector
transposeWhether to transpose a matrix. Default:false
Returns
result Result vector

Definition at line 552 of file LinalgNamespace.h.

void shogun::linalg::matrix_prod ( SGMatrix< T > &  A,
SGMatrix< T > &  B,
SGMatrix< T > &  result,
bool  transpose_A = false,
bool  transpose_B = false 
)

Performs the operation C = A * B where "*" denotes matrix multiplication.

This version returns the result in-place. User should pass an appropriately allocated memory matrix

Parameters
AFirst matrix
BSecond matrix
resultResult matrix
transpose_Awhether to transpose matrix A
transpose_Bwhether to transpose matrix B

Definition at line 587 of file LinalgNamespace.h.

SGMatrix<T> shogun::linalg::matrix_prod ( SGMatrix< T > &  A,
SGMatrix< T > &  B,
bool  transpose_A = false,
bool  transpose_B = false 
)

Performs the operation C = A * B where "*" denotes matrix multiplication.

This version returns the result in a newly created matrix.

Parameters
AFirst matrix
BSecond matrix
transpose_Awhether to transpose matrix A
transpose_Bwhether to transpose matrix B
Returns
The result of the operation

Definition at line 655 of file LinalgNamespace.h.

T shogun::linalg::max ( const Container< T > &  a)

Returns the largest element in a vector or matrix

Parameters
aInput vector or matrix
Returns
The largest value in the vector or matrix

Definition at line 700 of file LinalgNamespace.h.

std::enable_if<!std::is_same<T, complex128_t>::value, float64_t>::type shogun::linalg::mean ( const Container< T > &  a)

Method that computes the mean of vectors or matrices composed of real numbers.

Parameters
aSGVector or SGMatrix
Returns
The vector mean \(\bar{a}_i\) or matrix mean \(\bar{m}_{i,j}\)

Definition at line 713 of file LinalgNamespace.h.

complex128_t shogun::linalg::mean ( const Container< complex128_t > &  a)

Method that computes the mean of vectors or matrices composed of complex numbers.

Parameters
aSGVector or SGMatrix
Returns
The vector mean \(\bar{a}_i\) or matrix mean \(\bar{m}_{i,j}\)

Definition at line 726 of file LinalgNamespace.h.

void shogun::linalg::range_fill ( Container< T > &  a,
const T  start = 0 
)

Range fill a vector or matrix with start...start+len-1

Parameters
aThe vector or matrix to be filled
startValue to be assigned to the first element of vector or matrix

Definition at line 739 of file LinalgNamespace.h.

SGVector<T> shogun::linalg::rowwise_sum ( const SGMatrix< T > &  mat,
bool  no_diag = false 
)

Method that computes rowwise sum of co-efficients of a dense matrix

Parameters
mata matrix whose rowwise sum has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
the rowwise sum of co-efficients computed as \(s_i=\sum_{j}m_{i,j}\)

Definition at line 900 of file LinalgNamespace.h.

SGVector<T> shogun::linalg::rowwise_sum ( const Block< SGMatrix< T >> &  a,
bool  no_diag = false 
)

Method that computes the rowwise sum of matrix blocks This operation works with CPU backends only.

Parameters
athe matrix-block whose rowwise sum of co-efficients has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
the rowwise sum of co-efficients computed as \(s_i=\sum_{j}m_{i,j}\)

Definition at line 914 of file LinalgNamespace.h.

void shogun::linalg::scale ( SGVector< T > &  a,
SGVector< T > &  result,
alpha = 1 
)

Performs the operation result = alpha * a on vectors This version returns the result in-place. User should pass an appropriately pre-allocated memory matrix Or pass the operands argument a as a result

Parameters
aFirst vector
alphaScale factor
resultThe vector of alpha * a

Definition at line 755 of file LinalgNamespace.h.

void shogun::linalg::scale ( SGMatrix< T > &  A,
SGMatrix< T > &  result,
alpha = 1 
)

Performs the operation result = alpha * A on matrices This version returns the result in-place. User should pass an appropriately pre-allocated memory matrix Or pass the operands argument A as a result

Parameters
AFirst matrix
alphaScale factor
resultThe matrix of alpha * A

Definition at line 772 of file LinalgNamespace.h.

Container<T> shogun::linalg::scale ( Container< T > &  a,
alpha = 1 
)

Performs the operation B = alpha * A on vectors or matrices This version returns the result in a newly created vector or matrix.

Parameters
aFirst vector/matrix
alphaScale factor
Returns
Vector or matrix of alpha * A

Definition at line 790 of file LinalgNamespace.h.

void shogun::linalg::set_const ( Container< T > &  a,
value 
)

Set const value to vectors or matrices

Parameters
aVector or matrix to be set
valueThe value to set the vector or matrix

Definition at line 804 of file LinalgNamespace.h.

T shogun::linalg::sum ( const Container< T > &  a,
bool  no_diag = false 
)

Method that computes the sum of vectors or matrices

Parameters
aThe vector or matrix whose sum has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
The vector sum \(\sum_i a_i\) or matrix sum \(\sum_{i,j}b_{i,j}\)

Definition at line 817 of file LinalgNamespace.h.

T shogun::linalg::sum ( const Block< SGMatrix< T >> &  a,
bool  no_diag = false 
)

Method that computes the sum of matrix blocks This operation works with CPU backends only.

Parameters
aThe matrix-block whose sum of co-efficients has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
Matrix-block sum \(\sum_{i,j}b_{i,j}\)

Definition at line 831 of file LinalgNamespace.h.

T shogun::linalg::sum_symmetric ( const SGMatrix< T > &  a,
bool  no_diag = false 
)

Method that computes the sum of symmetric matrices

Parameters
aThe symmetric matrix whose sum has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
The matrix sum \(\sum_{i,j}b_{i,j}\)

Definition at line 844 of file LinalgNamespace.h.

T shogun::linalg::sum_symmetric ( const Block< SGMatrix< T >> &  a,
bool  no_diag = false 
)

Method that computes the sum of symmetric matrix blocks This operation works with CPU backends only.

Parameters
aThe symmetric matrix-block whose sum has to be computed
no_diagIf true, diagonal entries are excluded from the sum. Default: false
Returns
Symmetric matrix-block sum \(\sum_{i,j}b_{i,j}\)

Definition at line 859 of file LinalgNamespace.h.

void shogun::linalg::to_gpu ( SGVector< T > &  a,
SGVector< T > &  b 
)

Transfers data to GPU memory. Shallow-copy of SGVector with vector on CPU if GPU backend not available

Parameters
aSGVector to be transferred
bSGVector to be set

Definition at line 112 of file LinalgNamespace.h.

void shogun::linalg::to_gpu ( SGMatrix< T > &  a,
SGMatrix< T > &  b 
)

Transfers data to GPU memory. Does nothing if no GPU backend registered. Shallow-copy SGMatrix on CPU if GPU backend not available

Parameters
aSGMatrix to be transferred
bSGMatrix to be set

Definition at line 147 of file LinalgNamespace.h.

void shogun::linalg::to_gpu ( Container< T > &  a)

Transfers data to GPU memory in-place.

Parameters
aSGVector or SGMatrix to be transferred

Definition at line 180 of file LinalgNamespace.h.


SHOGUN Machine Learning Toolbox - Documentation