monolish
0.17.3-dev.16
MONOlithic LInear equation Solvers for Highly-parallel architecture
|
Dense view class. More...
#include <monolish_view_dense.hpp>
Public Member Functions | |
Float | at (const size_t i) |
get element A[i/col][icol] (only CPU) More... | |
Float | at (const size_t i) const |
get element A[i/col][jcol] More... | |
Float | at (const size_t i, const size_t j) |
get element A[i][j] (only CPU) More... | |
Float | at (const size_t i, const size_t j) const |
get element A[i][j] More... | |
Float * | begin () |
returns begin iterator (include offset) More... | |
Float * | begin () const |
returns begin iterator (include offset) More... | |
Float * | data () |
returns a direct pointer to the vector (dont include offset) More... | |
Float * | data () const |
returns a direct pointer to the original vector (dont include offset) More... | |
void | diag_add (const Float alpha) |
Scalar and diag. vector of Dense format matrix add. More... | |
void | diag_add (const vector< Float > &vec) |
Vector and diag. vector of Dense format matrix add. More... | |
void | diag_add (const view1D< matrix::Dense< Float >, Float > &vec) |
void | diag_add (const view1D< tensor::tensor_Dense< Float >, Float > &vec) |
void | diag_add (const view1D< vector< Float >, Float > &vec) |
void | diag_div (const Float alpha) |
Scalar and diag. vector of Dense format matrix div. More... | |
void | diag_div (const vector< Float > &vec) |
Vector and diag. vector of Dense format matrix div. More... | |
void | diag_div (const view1D< matrix::Dense< Float >, Float > &vec) |
void | diag_div (const view1D< tensor::tensor_Dense< Float >, Float > &vec) |
void | diag_div (const view1D< vector< Float >, Float > &vec) |
void | diag_mul (const Float alpha) |
Scalar and diag. vector of Dense format matrix mul. More... | |
void | diag_mul (const vector< Float > &vec) |
Vector and diag. vector of Dense format matrix mul. More... | |
void | diag_mul (const view1D< matrix::Dense< Float >, Float > &vec) |
void | diag_mul (const view1D< tensor::tensor_Dense< Float >, Float > &vec) |
void | diag_mul (const view1D< vector< Float >, Float > &vec) |
void | diag_sub (const Float alpha) |
Scalar and diag. vector of Dense format matrix sub. More... | |
void | diag_sub (const vector< Float > &vec) |
Vector and diag. vector of Dense format matrix sub. More... | |
void | diag_sub (const view1D< matrix::Dense< Float >, Float > &vec) |
void | diag_sub (const view1D< tensor::tensor_Dense< Float >, Float > &vec) |
void | diag_sub (const view1D< vector< Float >, Float > &vec) |
Float * | end () |
returns a end iterator More... | |
Float * | end () const |
returns a end iterator More... | |
void | fill (Float value) |
fill vector elements with a scalar value More... | |
size_t | get_alloc_nnz () const |
get # of alloced non-zeros More... | |
size_t | get_col () const |
get # of col More... | |
size_t | get_device_mem_stat () const |
true: sended, false: not send More... | |
size_t | get_first () const |
get first position More... | |
size_t | get_last () const |
get end position More... | |
size_t | get_nnz () const |
get view_Dense size (same as size()) More... | |
size_t | get_offset () const |
get first position (same as get_first()) More... | |
size_t | get_row () const |
get # of row More... | |
TYPE & | get_target () |
returns a reference of the target More... | |
TYPE & | get_target () const |
returns a reference of the target More... | |
std::shared_ptr< Float > | get_val () const |
void | insert (const size_t i, const Float Val) |
set element A[i/col][jcol] More... | |
void | insert (const size_t i, const size_t j, const Float Val) |
set element A[i][j] More... | |
void | move (const view_tensor_Dense< TYPE, Float > &view_tensor_dense) |
void | move (const view_tensor_Dense< TYPE, Float > &view_tensor_dense, int rowN, int colN) |
void | operator= (const matrix::Dense< Float > &mat) |
matrix copy More... | |
void | operator= (const view_Dense< matrix::Dense< Float >, Float > &mat) |
matrix copy More... | |
void | operator= (const view_Dense< tensor::tensor_Dense< Float >, Float > &mat) |
matrix copy More... | |
void | operator= (const view_Dense< vector< Float >, Float > &mat) |
matrix copy More... | |
Float & | operator[] (const size_t i) |
reference to the element at position More... | |
void | print_all (bool force_cpu=false) const |
print all elements to standart I/O More... | |
void | recv () |
recv data from GPU, and free data on GPU More... | |
void | resize (size_t row, size_t col) |
change last postion More... | |
void | send () const |
send data to GPU More... | |
void | set_first (size_t i) |
change first position More... | |
void | set_last (size_t i) |
change last position More... | |
size_t | size () const |
get view_Dense size (range) More... | |
std::string | type () const |
get format name "view_Dense" More... | |
view_Dense (matrix::Dense< Float > &A, const size_t start, const size_t row, const size_t col) | |
create view_Dense from Dense matrix(start:start+range) More... | |
view_Dense (tensor::tensor_Dense< Float > &A, const size_t start, const size_t row, const size_t col) | |
create view_Dense from Dense tensor(start:start+range) More... | |
view_Dense (vector< Float > &x, const size_t start, const size_t row, const size_t col) | |
create view_Dense from vector(start:start+range) More... | |
view_Dense (view_Dense< matrix::Dense< Float >, Float > &x, const size_t start, const size_t row, const size_t col) | |
create view_Dense from monolish::matrix::Dense(start:start+range) More... | |
view_Dense (view_Dense< tensor::tensor_Dense< Float >, Float > &x, const size_t start, const size_t row, const size_t col) | |
create view_Dense from monolish::tensor::tensor_Dense(start:start+range) More... | |
view_Dense (view_Dense< vector< Float >, Float > &x, const size_t start, const size_t row, const size_t col) | |
create view_Dense from monolish::vector(start:start+range) More... | |
Private Attributes | |
size_t | colN |
size_t | first |
size_t | last |
size_t | range |
size_t | rowN |
TYPE & | target |
Float * | target_data |
Dense view class.
Definition at line 50 of file monolish_view_dense.hpp.
|
inline |
create view_Dense from vector(start:start+range)
x | vector |
start | start position |
row | # of row |
col | # of col |
Definition at line 73 of file monolish_view_dense.hpp.
|
inline |
create view_Dense from Dense matrix(start:start+range)
A | Dense matrix |
start | start position |
row | # of row |
col | # of col |
Definition at line 95 of file monolish_view_dense.hpp.
|
inline |
create view_Dense from Dense tensor(start:start+range)
A | Dense matrix |
start | start position |
row | # of row |
col | # of col |
Definition at line 117 of file monolish_view_dense.hpp.
|
inline |
create view_Dense from monolish::vector(start:start+range)
x | view_Dense create from monolish::vector |
start | start position (x.first + start) |
row | # of row |
col | # of col |
Definition at line 139 of file monolish_view_dense.hpp.
|
inline |
create view_Dense from monolish::matrix::Dense(start:start+range)
x | view_Dense create from monolish::matrix::Dense |
start | start position (x.first + start) |
row | # of row |
col | # of col |
Definition at line 161 of file monolish_view_dense.hpp.
|
inline |
create view_Dense from monolish::tensor::tensor_Dense(start:start+range)
x | view_Dense create from monolish::tensor::tensor_Dense |
start | start position (x.first + start) |
row | # of row |
col | # of col |
Definition at line 184 of file monolish_view_dense.hpp.
|
inline |
get element A[i/col][icol] (only CPU)
i | index |
Definition at line 346 of file monolish_view_dense.hpp.
|
inline |
get element A[i/col][jcol]
i | index |
Definition at line 321 of file monolish_view_dense.hpp.
|
inline |
get element A[i][j] (only CPU)
i | row |
j | col |
Definition at line 360 of file monolish_view_dense.hpp.
|
inline |
get element A[i][j]
i | row |
j | col |
Definition at line 333 of file monolish_view_dense.hpp.
|
inline |
returns begin iterator (include offset)
Definition at line 452 of file monolish_view_dense.hpp.
|
inline |
returns begin iterator (include offset)
Definition at line 444 of file monolish_view_dense.hpp.
|
inline |
returns a direct pointer to the vector (dont include offset)
Definition at line 420 of file monolish_view_dense.hpp.
|
inline |
returns a direct pointer to the original vector (dont include offset)
Definition at line 412 of file monolish_view_dense.hpp.
void monolish::view_Dense< TYPE, Float >::diag_add | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix add.
alpha | scalar |
void monolish::view_Dense< TYPE, Float >::diag_add | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix add.
vec | vector |
void monolish::view_Dense< TYPE, Float >::diag_add | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_add | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_add | ( | const view1D< vector< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_div | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix div.
alpha | scalar |
void monolish::view_Dense< TYPE, Float >::diag_div | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix div.
vec | vector |
void monolish::view_Dense< TYPE, Float >::diag_div | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_div | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_div | ( | const view1D< vector< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_mul | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix mul.
alpha | scalar |
void monolish::view_Dense< TYPE, Float >::diag_mul | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix mul.
vec | vector |
void monolish::view_Dense< TYPE, Float >::diag_mul | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_mul | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_mul | ( | const view1D< vector< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_sub | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix sub.
alpha | scalar |
void monolish::view_Dense< TYPE, Float >::diag_sub | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix sub.
vec | vector |
void monolish::view_Dense< TYPE, Float >::diag_sub | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_sub | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::view_Dense< TYPE, Float >::diag_sub | ( | const view1D< vector< Float >, Float > & | vec | ) |
|
inline |
returns a end iterator
Definition at line 468 of file monolish_view_dense.hpp.
|
inline |
returns a end iterator
Definition at line 460 of file monolish_view_dense.hpp.
void monolish::view_Dense< TYPE, Float >::fill | ( | Float | value | ) |
fill vector elements with a scalar value
value | scalar value |
|
inline |
get # of alloced non-zeros
Definition at line 256 of file monolish_view_dense.hpp.
|
inline |
get # of col
Definition at line 231 of file monolish_view_dense.hpp.
|
inline |
true: sended, false: not send
Definition at line 401 of file monolish_view_dense.hpp.
|
inline |
get first position
Definition at line 264 of file monolish_view_dense.hpp.
|
inline |
get end position
Definition at line 272 of file monolish_view_dense.hpp.
|
inline |
get view_Dense size (same as size())
Definition at line 247 of file monolish_view_dense.hpp.
|
inline |
get first position (same as get_first())
Definition at line 280 of file monolish_view_dense.hpp.
|
inline |
get # of row
Definition at line 222 of file monolish_view_dense.hpp.
|
inline |
returns a reference of the target
Definition at line 436 of file monolish_view_dense.hpp.
|
inline |
returns a reference of the target
Definition at line 428 of file monolish_view_dense.hpp.
|
inline |
Definition at line 282 of file monolish_view_dense.hpp.
|
inline |
set element A[i/col][jcol]
i | index |
Val | scalar value |
Definition at line 373 of file monolish_view_dense.hpp.
|
inline |
set element A[i][j]
i | row |
j | col |
Val | scalar value |
Definition at line 388 of file monolish_view_dense.hpp.
void monolish::view_Dense< TYPE, Float >::move | ( | const view_tensor_Dense< TYPE, Float > & | view_tensor_dense | ) |
void monolish::view_Dense< TYPE, Float >::move | ( | const view_tensor_Dense< TYPE, Float > & | view_tensor_dense, |
int | rowN, | ||
int | colN | ||
) |
void monolish::view_Dense< TYPE, Float >::operator= | ( | const matrix::Dense< Float > & | mat | ) |
matrix copy
mat | Dense matrix |
gpu_statius == true
; coping data on CPUvoid monolish::view_Dense< TYPE, Float >::operator= | ( | const view_Dense< matrix::Dense< Float >, Float > & | mat | ) |
matrix copy
mat | Dense matrix |
gpu_statius == true
; coping data on CPUvoid monolish::view_Dense< TYPE, Float >::operator= | ( | const view_Dense< tensor::tensor_Dense< Float >, Float > & | mat | ) |
matrix copy
mat | Dense matrix |
gpu_statius == true
; coping data on CPUvoid monolish::view_Dense< TYPE, Float >::operator= | ( | const view_Dense< vector< Float >, Float > & | mat | ) |
matrix copy
mat | Dense matrix |
gpu_statius == true
; coping data on CPU
|
inline |
reference to the element at position
i | Position of an element in the vector |
Definition at line 578 of file monolish_view_dense.hpp.
void monolish::view_Dense< TYPE, Float >::print_all | ( | bool | force_cpu = false | ) | const |
print all elements to standart I/O
force_cpu | Ignore device status and output CPU data |
|
inline |
recv data from GPU, and free data on GPU
Definition at line 213 of file monolish_view_dense.hpp.
|
inline |
change last postion
N | vector length |
Definition at line 490 of file monolish_view_dense.hpp.
|
inline |
send data to GPU
Definition at line 204 of file monolish_view_dense.hpp.
|
inline |
change first position
Definition at line 289 of file monolish_view_dense.hpp.
|
inline |
change last position
Definition at line 296 of file monolish_view_dense.hpp.
|
inline |
get view_Dense size (range)
Definition at line 239 of file monolish_view_dense.hpp.
|
inline |
get format name "view_Dense"
Definition at line 308 of file monolish_view_dense.hpp.
|
private |
Definition at line 59 of file monolish_view_dense.hpp.
|
private |
Definition at line 54 of file monolish_view_dense.hpp.
|
private |
Definition at line 55 of file monolish_view_dense.hpp.
|
private |
Definition at line 56 of file monolish_view_dense.hpp.
|
private |
Definition at line 58 of file monolish_view_dense.hpp.
|
private |
Definition at line 52 of file monolish_view_dense.hpp.
|
private |
Definition at line 53 of file monolish_view_dense.hpp.