SHOGUN
6.0.0
|
shogun vector
Definition at line 28 of file base/Parameter.h.
Public Types | |
typedef Eigen::Matrix< T,-1, 1, 0,-1, 1 > | EigenVectorXt |
typedef Eigen::Matrix< T, 1,-1, 0x1, 1,-1 > | EigenRowVectorXt |
typedef Eigen::Map< EigenVectorXt, 0, Eigen::Stride< 0, 0 > > | EigenVectorXtMap |
typedef Eigen::Map< EigenRowVectorXt, 0, Eigen::Stride< 0, 0 > > | EigenRowVectorXtMap |
typedef T | Scalar |
Public Member Functions | |
SGVector () | |
SGVector (T *v, index_t len, bool ref_counting=true) | |
SGVector (T *m, index_t len, index_t offset) | |
SGVector (index_t len, bool ref_counting=true) | |
SGVector (GPUMemoryBase< T > *vector, index_t len) | |
SGVector (const SGVector &orig) | |
bool | on_gpu () const |
SGVector (EigenVectorXt &vec) | |
SGVector (EigenRowVectorXt &vec) | |
operator EigenVectorXtMap () const | |
operator EigenRowVectorXtMap () const | |
void | set_const (T const_elem) |
SGVector< T > | get () |
void | set (SGVector< T > orig) |
virtual | ~SGVector () |
int32_t | size () const |
T * | data () const |
SGVector< T > & | operator= (const SGVector< T > &) |
operator T* () | |
void | zero () |
void | range_fill (T start=0) |
void | random (T min_value, T max_value) |
index_t | find_position_to_insert (T element) |
SGVector< T > | clone () const |
const T & | get_element (index_t index) |
void | set_element (const T &el, index_t index) |
void | resize_vector (int32_t n) |
const T & | operator[] (uint64_t index) const |
const T & | operator[] (int64_t index) const |
const T & | operator[] (uint32_t index) const |
const T & | operator[] (int32_t index) const |
T & | operator[] (uint64_t index) |
T & | operator[] (int64_t index) |
T & | operator[] (uint32_t index) |
T & | operator[] (int32_t index) |
void | add (const SGVector< T > x) |
void | add (const SGSparseVector< T > &x) |
void | add (const T x) |
SGVector< T > | operator+ (SGVector< T > x) |
SGVector< T > | operator+= (SGVector< T > x) |
SGVector< T > | operator+= (SGSparseVector< T > &x) |
bool | equals (SGVector< T > &other) |
T | product () |
Return product(vec) More... | |
void | display_size () const |
void | display_vector (const char *name="vector", const char *prefix="") const |
SGVector< index_t > | find (T elem) |
template<typename Predicate > | |
SGVector< index_t > | find_if (Predicate p) |
void | scale (T alpha) |
Scale vector inplace. More... | |
void | load (CFile *loader) |
void | save (CFile *saver) |
SGVector< float64_t > | get_real () |
SGVector< float64_t > | get_imag () |
template<> | |
void | zero () |
template<> | |
index_t | find_position_to_insert (complex128_t element) |
template<> | |
void | range_fill_vector (complex128_t *vec, int32_t len, complex128_t start) |
template<> | |
void | display_vector (const bool *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const char *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const uint8_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const int8_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const uint16_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const int16_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const int32_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const uint32_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const int64_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const uint64_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const float32_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const float64_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const floatmax_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | display_vector (const complex128_t *vector, int32_t n, const char *name, const char *prefix) |
template<> | |
void | vec1_plus_scalar_times_vec2 (float64_t *vec1, float64_t scalar, const float64_t *vec2, int32_t n) |
template<> | |
void | vec1_plus_scalar_times_vec2 (float32_t *vec1, float32_t scalar, const float32_t *vec2, int32_t n) |
template<> | |
void | random_vector (complex128_t *vec, int32_t len, complex128_t min_value, complex128_t max_value) |
template<> | |
bool | twonorm (const bool *x, int32_t len) |
template<> | |
char | twonorm (const char *x, int32_t len) |
template<> | |
int8_t | twonorm (const int8_t *x, int32_t len) |
template<> | |
uint8_t | twonorm (const uint8_t *x, int32_t len) |
template<> | |
int16_t | twonorm (const int16_t *x, int32_t len) |
template<> | |
uint16_t | twonorm (const uint16_t *x, int32_t len) |
template<> | |
int32_t | twonorm (const int32_t *x, int32_t len) |
template<> | |
uint32_t | twonorm (const uint32_t *x, int32_t len) |
template<> | |
int64_t | twonorm (const int64_t *x, int32_t len) |
template<> | |
uint64_t | twonorm (const uint64_t *x, int32_t len) |
template<> | |
float32_t | twonorm (const float32_t *x, int32_t len) |
template<> | |
float64_t | twonorm (const float64_t *v, int32_t n) |
template<> | |
floatmax_t | twonorm (const floatmax_t *x, int32_t len) |
template<> | |
complex128_t | twonorm (const complex128_t *x, int32_t len) |
template<> | |
complex128_t | qsq (complex128_t *x, int32_t len, float64_t q) |
template<> | |
complex128_t | qnorm (complex128_t *x, int32_t len, float64_t q) |
template<> | |
float64_t | sum_abs (float64_t *vec, int32_t len) |
template<> | |
float32_t | sum_abs (float32_t *vec, int32_t len) |
template<> | |
int32_t | unique (complex128_t *output, int32_t size) |
template<> | |
void | scale_vector (float64_t alpha, float64_t *vec, int32_t len) |
template<> | |
void | scale_vector (float32_t alpha, float32_t *vec, int32_t len) |
template<> | |
void | load (CFile *loader) |
template<> | |
void | save (CFile *saver) |
int32_t | ref_count () |
Static Public Member Functions | |
static T * | clone_vector (const T *vec, int32_t len) |
static void | fill_vector (T *vec, int32_t len, T value) |
static void | range_fill_vector (T *vec, int32_t len, T start=0) |
static void | random_vector (T *vec, int32_t len, T min_value, T max_value) |
static T | twonorm (const T *x, int32_t len) |
|| x ||_2 More... | |
static float64_t | onenorm (T *x, int32_t len) |
|| x ||_1 More... | |
static T | qsq (T *x, int32_t len, float64_t q) |
|| x ||_q^q More... | |
static T | qnorm (T *x, int32_t len, float64_t q) |
|| x ||_q More... | |
static void | vec1_plus_scalar_times_vec2 (T *vec1, const T scalar, const T *vec2, int32_t n) |
x=x+alpha*y More... | |
static void | vector_multiply (T *target, const T *v1, const T *v2, int32_t len) |
Compute vector multiplication. More... | |
static void | add (T *target, T alpha, const T *v1, T beta, const T *v2, int32_t len) |
target=alpha*vec1 + beta*vec2 More... | |
static void | add_scalar (T alpha, T *vec, int32_t len) |
Add scalar to vector inplace. More... | |
static void | scale_vector (T alpha, T *vec, int32_t len) |
Scale vector inplace. More... | |
static T | sum (T *vec, int32_t len) |
Return sum(vec) More... | |
static T | sum (SGVector< T > vec) |
Return sum(vec) More... | |
static T | product (T *vec, int32_t len) |
Return the product of the vectors elements. More... | |
static T | sum_abs (T *vec, int32_t len) |
return sum(abs(vec)) More... | |
static int32_t | unique (T *output, int32_t size) |
static void | display_vector (const T *vector, int32_t n, const char *name="vector", const char *prefix="") |
Display vector (useful for debugging) More... | |
static void | display_vector (const SGVector< T >, const char *name="vector", const char *prefix="") |
Display vector (useful for debugging) More... | |
static SGMatrix< T > | convert_to_matrix (SGVector< T > vector, index_t nrows, index_t ncols, bool fortran_order) |
static void | convert_to_matrix (T *&matrix, index_t nrows, index_t ncols, const T *vector, int32_t vlen, bool fortran_order) |
Public Attributes | |
T * | vector |
index_t | vlen |
std::shared_ptr< GPUMemoryBase< T > > | gpu_ptr |
Protected Member Functions | |
virtual void | copy_data (const SGReferencedData &orig) |
virtual void | init_data () |
virtual void | free_data () |
void | copy_refcount (const SGReferencedData &orig) |
int32_t | ref () |
int32_t | unref () |
Friends | |
class | LinalgBackendEigen |
typedef Eigen::Matrix<T,1,-1,0x1,1,-1> EigenRowVectorXt |
Definition at line 48 of file SGVector.h.
typedef Eigen::Map<EigenRowVectorXt,0,Eigen::Stride<0,0> > EigenRowVectorXtMap |
Definition at line 51 of file SGVector.h.
typedef Eigen::Matrix<T,-1,1,0,-1,1> EigenVectorXt |
Definition at line 47 of file SGVector.h.
typedef Eigen::Map<EigenVectorXt,0,Eigen::Stride<0,0> > EigenVectorXtMap |
Definition at line 50 of file SGVector.h.
typedef T Scalar |
The scalar type of the vector
Definition at line 54 of file SGVector.h.
SGVector | ( | ) |
Default constructor
Definition at line 73 of file SGVector.cpp.
Constructor for setting params
Definition at line 79 of file SGVector.cpp.
Wraps a vector around an existing memory segment with an offset
Definition at line 86 of file SGVector.cpp.
Constructor to create new vector in memory
Definition at line 93 of file SGVector.cpp.
SGVector | ( | GPUMemoryBase< T > * | vector, |
index_t | len | ||
) |
Construct SGVector from GPU memory.
vector | GPUMemoryBase pointer |
len | length of the data in vector |
Definition at line 101 of file SGVector.cpp.
Copy constructor
Definition at line 109 of file SGVector.cpp.
SGVector | ( | EigenVectorXt & | vec | ) |
Wraps a matrix around the data of an Eigen3 column vector
Definition at line 140 of file SGVector.cpp.
SGVector | ( | EigenRowVectorXt & | vec | ) |
Wraps a matrix around the data of an Eigen3 row vector
Definition at line 147 of file SGVector.cpp.
|
virtual |
Empty destructor
Definition at line 134 of file SGVector.cpp.
void add | ( | const SGVector< T > | x | ) |
Add vector to current vector
x | add vector x to current vector |
Definition at line 310 of file SGVector.cpp.
void add | ( | const SGSparseVector< T > & | x | ) |
Add sparse vector to current vector
x | add sparse vector x to current vector |
Definition at line 330 of file SGVector.cpp.
void add | ( | const T | x | ) |
Add scalar to current vector
x | add vector x to current vector |
Definition at line 321 of file SGVector.cpp.
|
static |
target=alpha*vec1 + beta*vec2
Definition at line 373 of file SGVector.h.
|
static |
Add scalar to vector inplace.
Definition at line 382 of file SGVector.h.
SGVector< T > clone | ( | ) | const |
Clone vector
Definition at line 247 of file SGVector.cpp.
|
static |
Clone vector
Definition at line 256 of file SGVector.cpp.
|
static |
Create SGMatrix from linear vector
vector | source vector |
nrows | number of rows |
ncols | number of cols |
fortran_order | order of stroing matrix in linear vector true - column-major order (FORTRAN, MATLAB, R) false - row-major order (C, Python) |
Definition at line 945 of file SGVector.cpp.
|
static |
Create matrix from linear vector
matrix | destination memory |
nrows | number of rows |
ncols | number of cols |
vector | source vector |
vlen | lenght of source vector |
fortran_order | order of stroing matrix in linear vector true - column-major order (FORTRAN, MATLAB, R) false - row-major order (C, Python) |
Definition at line 959 of file SGVector.cpp.
|
protectedvirtual |
needs to be overridden to copy data
Implements SGReferencedData.
Definition at line 352 of file SGVector.cpp.
|
protectedinherited |
copy refcount
Definition at line 55 of file SGReferencedData.cpp.
T* data | ( | ) | const |
Data pointer
Definition at line 139 of file SGVector.h.
void display_size | ( | ) | const |
Display array size
Definition at line 345 of file SGVector.cpp.
void display_vector | ( | const bool * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 410 of file SGVector.cpp.
void display_vector | ( | const char * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 421 of file SGVector.cpp.
void display_vector | ( | const uint8_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 432 of file SGVector.cpp.
void display_vector | ( | const char * | name = "vector" , |
const char * | prefix = "" |
||
) | const |
Display vector
Definition at line 396 of file SGVector.cpp.
|
static |
Display vector (useful for debugging)
void display_vector | ( | const int8_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 443 of file SGVector.cpp.
|
static |
Display vector (useful for debugging)
Definition at line 403 of file SGVector.cpp.
void display_vector | ( | const uint16_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 454 of file SGVector.cpp.
void display_vector | ( | const int16_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 465 of file SGVector.cpp.
void display_vector | ( | const int32_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 476 of file SGVector.cpp.
void display_vector | ( | const uint32_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 487 of file SGVector.cpp.
void display_vector | ( | const int64_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 499 of file SGVector.cpp.
void display_vector | ( | const uint64_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 510 of file SGVector.cpp.
void display_vector | ( | const float32_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 521 of file SGVector.cpp.
void display_vector | ( | const float64_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 532 of file SGVector.cpp.
void display_vector | ( | const floatmax_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 543 of file SGVector.cpp.
void display_vector | ( | const complex128_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
Definition at line 557 of file SGVector.cpp.
bool equals | ( | SGVector< T > & | other | ) |
Equals method up to precision for vectors (element-wise)
other | vector to compare with |
Definition at line 380 of file SGVector.cpp.
|
static |
Fill vector
Definition at line 264 of file SGVector.cpp.
Find index for occurance of an element
elem | the element to find |
Definition at line 849 of file SGVector.cpp.
Find index for elements where the predicate returns true
p | the predicate, it should accept the value of the element and return a bool |
Definition at line 457 of file SGVector.h.
index_t find_position_to_insert | ( | T | element | ) |
For a sorted (ascending) vector, gets the index after the first element that is smaller than the given one
element | element to find index for |
Definition at line 226 of file SGVector.cpp.
index_t find_position_to_insert | ( | complex128_t | element | ) |
Definition at line 239 of file SGVector.cpp.
|
protectedvirtual |
needs to be overridden to free data
Implements SGReferencedData.
Definition at line 371 of file SGVector.cpp.
SGVector<T> get | ( | ) |
Get the vector (no copying is done here)
Definition at line 120 of file SGVector.h.
const T& get_element | ( | index_t | index | ) |
Get element at index
index | index |
Definition at line 195 of file SGVector.h.
Imag part of a complex128_t vector
Definition at line 935 of file SGVector.cpp.
Real part of a complex128_t vector
Definition at line 926 of file SGVector.cpp.
|
protectedvirtual |
needs to be overridden to initialize empty data
Implements SGReferencedData.
Definition at line 362 of file SGVector.cpp.
void load | ( | CFile * | loader | ) |
Load vector from file
loader | File object via which to load data |
Definition at line 889 of file SGVector.cpp.
void load | ( | CFile * | loader | ) |
Definition at line 905 of file SGVector.cpp.
bool on_gpu | ( | ) | const |
Check whether data is stored on GPU
Definition at line 83 of file SGVector.h.
|
static |
|| x ||_1
Definition at line 755 of file SGVector.cpp.
operator EigenRowVectorXtMap | ( | ) | const |
Wraps an Eigen3 row vector around the data of this matrix
Definition at line 161 of file SGVector.cpp.
operator EigenVectorXtMap | ( | ) | const |
Wraps an Eigen3 column vector around the data of this matrix
Definition at line 154 of file SGVector.cpp.
operator T* | ( | ) |
Cast to pointer
Definition at line 148 of file SGVector.h.
Inplace addition operator
Definition at line 327 of file SGVector.h.
SGVector<T> operator+= | ( | SGSparseVector< T > & | x | ) |
Inplace addition operator for sparse vector
Definition at line 334 of file SGVector.h.
Definition at line 115 of file SGVector.cpp.
const T& operator[] | ( | uint64_t | index | ) | const |
Operator overload for vector read only access
index | dimension to access |
Definition at line 222 of file SGVector.h.
const T& operator[] | ( | int64_t | index | ) | const |
Operator overload for vector read only access
index | dimension to access |
Definition at line 233 of file SGVector.h.
const T& operator[] | ( | uint32_t | index | ) | const |
Operator overload for vector read only access
index | dimension to access |
Definition at line 244 of file SGVector.h.
const T& operator[] | ( | int32_t | index | ) | const |
Operator overload for vector read only access
index | dimension to access |
Definition at line 255 of file SGVector.h.
T& operator[] | ( | uint64_t | index | ) |
Operator overload for vector r/w access
index | dimension to access |
Definition at line 266 of file SGVector.h.
T& operator[] | ( | int64_t | index | ) |
Operator overload for vector r/w access
index | dimension to access |
Definition at line 277 of file SGVector.h.
T& operator[] | ( | uint32_t | index | ) |
Operator overload for vector r/w access
index | dimension to access |
Definition at line 288 of file SGVector.h.
T& operator[] | ( | int32_t | index | ) |
Operator overload for vector r/w access
index | dimension to access |
Definition at line 299 of file SGVector.h.
|
static |
Return the product of the vectors elements.
Definition at line 408 of file SGVector.h.
T product | ( | ) |
Return product(vec)
Definition at line 418 of file SGVector.h.
|
static |
|| x ||_q
Definition at line 784 of file SGVector.cpp.
complex128_t qnorm | ( | complex128_t * | x, |
int32_t | len, | ||
float64_t | q | ||
) |
Definition at line 791 of file SGVector.cpp.
|
static |
|| x ||_q^q
Definition at line 766 of file SGVector.cpp.
complex128_t qsq | ( | complex128_t * | x, |
int32_t | len, | ||
float64_t | q | ||
) |
Definition at line 776 of file SGVector.cpp.
void random | ( | T | min_value, |
T | max_value | ||
) |
Create random vector
min_value | [min_value,max_value] |
max_value |
Definition at line 217 of file SGVector.cpp.
|
static |
Random vector
Definition at line 605 of file SGVector.cpp.
void random_vector | ( | complex128_t * | vec, |
int32_t | len, | ||
complex128_t | min_value, | ||
complex128_t | max_value | ||
) |
Definition at line 612 of file SGVector.cpp.
void range_fill | ( | T | start = 0 | ) |
Range fill a vector with start...start+len-1
start | - value to be assigned to first element of vector |
Definition at line 208 of file SGVector.cpp.
|
static |
Range fill vector
Definition at line 271 of file SGVector.cpp.
void range_fill_vector | ( | complex128_t * | vec, |
int32_t | len, | ||
complex128_t | start | ||
) |
Definition at line 278 of file SGVector.cpp.
|
protectedinherited |
increase reference counter
Definition at line 64 of file SGReferencedData.cpp.
|
inherited |
display reference counter
Definition at line 41 of file SGReferencedData.cpp.
void resize_vector | ( | int32_t | n | ) |
void save | ( | CFile * | saver | ) |
Save vector to file
saver | File object via which to save data |
Definition at line 910 of file SGVector.cpp.
void save | ( | CFile * | saver | ) |
Definition at line 921 of file SGVector.cpp.
void scale | ( | T | alpha | ) |
Scale vector inplace.
Definition at line 884 of file SGVector.cpp.
|
static |
Scale vector inplace.
Definition at line 863 of file SGVector.cpp.
Definition at line 871 of file SGVector.cpp.
Definition at line 877 of file SGVector.cpp.
void set | ( | SGVector< T > | orig | ) |
Wrapper for the copy constructor useful for SWIG interfaces
orig | vector to set |
Definition at line 128 of file SGVector.cpp.
void set_const | ( | T | const_elem | ) |
Set vector to a constant
const_elem | - value to set vector to |
Definition at line 184 of file SGVector.cpp.
void set_element | ( | const T & | el, |
index_t | index | ||
) |
Set element at index
el | element to set |
index | index |
Definition at line 205 of file SGVector.h.
int32_t size | ( | ) | const |
Size
Definition at line 136 of file SGVector.h.
|
static |
Return sum(vec)
Definition at line 392 of file SGVector.h.
|
static |
Return sum(vec)
Definition at line 402 of file SGVector.h.
|
static |
Definition at line 810 of file SGVector.cpp.
Definition at line 818 of file SGVector.cpp.
|
static |
|| x ||_2
bool twonorm | ( | const bool * | x, |
int32_t | len | ||
) |
Definition at line 619 of file SGVector.cpp.
char twonorm | ( | const char * | x, |
int32_t | len | ||
) |
Definition at line 626 of file SGVector.cpp.
int8_t twonorm | ( | const int8_t * | x, |
int32_t | len | ||
) |
Definition at line 633 of file SGVector.cpp.
uint8_t twonorm | ( | const uint8_t * | x, |
int32_t | len | ||
) |
Definition at line 643 of file SGVector.cpp.
int16_t twonorm | ( | const int16_t * | x, |
int32_t | len | ||
) |
Definition at line 653 of file SGVector.cpp.
uint16_t twonorm | ( | const uint16_t * | x, |
int32_t | len | ||
) |
Definition at line 663 of file SGVector.cpp.
int32_t twonorm | ( | const int32_t * | x, |
int32_t | len | ||
) |
Definition at line 673 of file SGVector.cpp.
uint32_t twonorm | ( | const uint32_t * | x, |
int32_t | len | ||
) |
Definition at line 683 of file SGVector.cpp.
int64_t twonorm | ( | const int64_t * | x, |
int32_t | len | ||
) |
Definition at line 693 of file SGVector.cpp.
uint64_t twonorm | ( | const uint64_t * | x, |
int32_t | len | ||
) |
Definition at line 703 of file SGVector.cpp.
Definition at line 713 of file SGVector.cpp.
Definition at line 723 of file SGVector.cpp.
floatmax_t twonorm | ( | const floatmax_t * | x, |
int32_t | len | ||
) |
Definition at line 735 of file SGVector.cpp.
complex128_t twonorm | ( | const complex128_t * | x, |
int32_t | len | ||
) |
Definition at line 745 of file SGVector.cpp.
|
static |
Performs a inplace unique of a vector of type T using quicksort returns the new number of elements
Definition at line 827 of file SGVector.cpp.
int32_t unique | ( | complex128_t * | output, |
int32_t | size | ||
) |
Definition at line 841 of file SGVector.cpp.
|
protectedinherited |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
Definition at line 84 of file SGReferencedData.cpp.
|
static |
x=x+alpha*y
Definition at line 571 of file SGVector.cpp.
void vec1_plus_scalar_times_vec2 | ( | float64_t * | vec1, |
float64_t | scalar, | ||
const float64_t * | vec2, | ||
int32_t | n | ||
) |
Definition at line 579 of file SGVector.cpp.
void vec1_plus_scalar_times_vec2 | ( | float32_t * | vec1, |
float32_t | scalar, | ||
const float32_t * | vec2, | ||
int32_t | n | ||
) |
Definition at line 592 of file SGVector.cpp.
|
static |
Compute vector multiplication.
Definition at line 364 of file SGVector.h.
void zero | ( | ) |
Fill vector with zeros
Definition at line 168 of file SGVector.cpp.
void zero | ( | ) |
Definition at line 176 of file SGVector.cpp.
|
friend |
Definition at line 44 of file SGVector.h.
std::shared_ptr<GPUMemoryBase<T> > gpu_ptr |
GPU Vector structure. Stores pointer to the data on GPU.
Definition at line 547 of file SGVector.h.
T* vector |
Pointer to memory where vector data is stored
Definition at line 543 of file SGVector.h.
index_t vlen |
Length of vector
Definition at line 545 of file SGVector.h.