monolish
0.17.3-dev.16
MONOlithic LInear equation Solvers for Highly-parallel architecture
|
1D view class More...
#include <monolish_view1D.hpp>
Public Member Functions | |
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... | |
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 |
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 view1D size (same as size()) More... | |
size_t | get_offset () const |
get first position (same as get_first()) More... | |
std::shared_ptr< Float > | get_val () const |
void | operator= (const std::vector< Float > &vec) |
copy vector from std::vector More... | |
void | operator= (const vector< Float > &vec) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU ) More... | |
void | operator= (const view1D< matrix::Dense< Float >, Float > &vec) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU ) More... | |
void | operator= (const view1D< tensor::tensor_Dense< Float >, Float > &vec) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU ) More... | |
void | operator= (const view1D< vector< Float >, Float > &vec) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU ) 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 N) |
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 view1D size (range) More... | |
std::string | type () const |
get format name "view1D" More... | |
view1D (matrix::Dense< Float > &A, const size_t start, const size_t size) | |
create view1D(start:start+range) from Dense matrix More... | |
view1D (tensor::tensor_Dense< Float > &A, const size_t start, const size_t size) | |
create view1D(start:start+range) from Dense tensor More... | |
view1D (vector< Float > &x, const size_t start, const size_t size) | |
create view1D(start:start+range) from vector More... | |
view1D (view1D< matrix::Dense< Float >, Float > &x, const size_t start, const size_t size) | |
create view1D(start:start+range) from monolish::matrix::Dense More... | |
view1D (view1D< tensor::tensor_Dense< Float >, Float > &x, const size_t start, const size_t size) | |
create view1D(start:start+range) from monolish::tensor::tensor_Dense More... | |
view1D (view1D< vector< Float >, Float > &x, const size_t start, const size_t size) | |
create view1D(start:start+range) from monolish::vector More... | |
Private Attributes | |
size_t | first |
size_t | last |
size_t | range |
TYPE & | target |
Float * | target_data |
1D view class
Definition at line 50 of file monolish_view1D.hpp.
|
inline |
create view1D(start:start+range) from vector
x | vector |
start | start position |
size | size |
Definition at line 69 of file monolish_view1D.hpp.
|
inline |
create view1D(start:start+range) from Dense matrix
A | Dense matrix |
start | start position |
size | size |
Definition at line 86 of file monolish_view1D.hpp.
|
inline |
create view1D(start:start+range) from Dense tensor
A | Dense matrix |
start | start position |
size | size |
Definition at line 104 of file monolish_view1D.hpp.
|
inline |
create view1D(start:start+range) from monolish::vector
x | view1D create from monolish::vector |
start | start position (x.first + start) |
size | size |
Definition at line 122 of file monolish_view1D.hpp.
|
inline |
create view1D(start:start+range) from monolish::matrix::Dense
x | view1D create from monolish::matrix::Dense |
start | start position (x.first + start) |
size | size |
Definition at line 140 of file monolish_view1D.hpp.
|
inline |
create view1D(start:start+range) from monolish::tensor::tensor_Dense
x | view1D create from monolish::tensor::tensor_Dense |
start | start position (x.first + start) |
size | size |
Definition at line 159 of file monolish_view1D.hpp.
|
inline |
returns begin iterator (include offset)
Definition at line 303 of file monolish_view1D.hpp.
|
inline |
returns begin iterator (include offset)
Definition at line 295 of file monolish_view1D.hpp.
|
inline |
returns a direct pointer to the vector (dont include offset)
Definition at line 287 of file monolish_view1D.hpp.
|
inline |
returns a direct pointer to the original vector (dont include offset)
Definition at line 279 of file monolish_view1D.hpp.
|
inline |
returns a end iterator
Definition at line 319 of file monolish_view1D.hpp.
|
inline |
returns a end iterator
Definition at line 311 of file monolish_view1D.hpp.
void monolish::view1D< TYPE, Float >::fill | ( | Float | value | ) |
fill vector elements with a scalar value
value | scalar value |
|
inline |
Definition at line 241 of file monolish_view1D.hpp.
|
inline |
true: sended, false: not send
Definition at line 268 of file monolish_view1D.hpp.
|
inline |
get first position
Definition at line 221 of file monolish_view1D.hpp.
|
inline |
get end position
Definition at line 229 of file monolish_view1D.hpp.
|
inline |
get view1D size (same as size())
Definition at line 213 of file monolish_view1D.hpp.
|
inline |
get first position (same as get_first())
Definition at line 237 of file monolish_view1D.hpp.
|
inline |
Definition at line 239 of file monolish_view1D.hpp.
void monolish::view1D< TYPE, Float >::operator= | ( | const std::vector< Float > & | vec | ) |
copy vector from std::vector
vec | source std::vector |
void monolish::view1D< TYPE, Float >::operator= | ( | const vector< Float > & | vec | ) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU )
vec | source vector |
gpu_statius == true
; coping data on GPUvoid monolish::view1D< TYPE, Float >::operator= | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU )
vec | source view1D from monolish::matrix::Dense |
gpu_statius == true
; coping data on GPUvoid monolish::view1D< TYPE, Float >::operator= | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU )
vec | source view1D from monolish::tensor::tensor_Dense |
gpu_statius == true
; coping data on GPUvoid monolish::view1D< TYPE, Float >::operator= | ( | const view1D< vector< Float >, Float > & | vec | ) |
copy vector, It is same as copy ( Copy the memory on CPU and GPU )
vec | source view1D from monolish::vector |
gpu_statius == true
; coping data on GPU
|
inline |
reference to the element at position
i | Position of an element in the vector |
Definition at line 436 of file monolish_view1D.hpp.
void monolish::view1D< 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 197 of file monolish_view1D.hpp.
|
inline |
change last postion
N | vector length |
Definition at line 351 of file monolish_view1D.hpp.
|
inline |
send data to GPU
Definition at line 188 of file monolish_view1D.hpp.
|
inline |
|
inline |
|
inline |
get view1D size (range)
Definition at line 205 of file monolish_view1D.hpp.
|
inline |
get format name "view1D"
Definition at line 175 of file monolish_view1D.hpp.
|
private |
Definition at line 54 of file monolish_view1D.hpp.
|
private |
Definition at line 55 of file monolish_view1D.hpp.
|
private |
Definition at line 56 of file monolish_view1D.hpp.
|
private |
Definition at line 52 of file monolish_view1D.hpp.
|
private |
Definition at line 53 of file monolish_view1D.hpp.