monolish
0.15.1
MONOlithic LInear equation Solvers for Highly-parallel architecture
|
Go to the documentation of this file.
27 template <
typename Float>
class vector;
30 template <
typename Float>
class Dense;
31 template <
typename Float>
class CRS;
32 template <
typename Float>
class LinearOperator;
41 template <
typename TYPE,
typename Float>
class view1D {
97 first = x.get_first() + start;
116 first = x.get_first() + start;
188 return target.get_device_mem_stat();
248 void print_all(
bool force_cpu =
false)
const;
275 if (
target.get_device_mem_stat()) {
276 throw std::runtime_error(
"Error, GPU vector cant use operator[]");
289 void fill(Float value);
size_t size() const
get view1D size (end-start)
view1D(matrix::Dense< Float > &A, const size_t start, const size_t end)
create view1D(start:end) from Dense matrix
Float * end() const
returns a end iterator
size_t get_device_mem_stat() const
true: sended, false: not send
std::vector< Float > val
Dense format value(size M x N)
view1D(view1D< vector< Float >, Float > &x, const size_t start, const size_t end)
create view1D(start:end) from monolish::vector
const Float * data() const
returns a direct pointer to the vector
void resize(size_t N)
change last postion
size_t get_first() const
get first position
size_t get_offset() const
get first position (same as get_first())
Float * data() const
returns a direct pointer to the original vector (dont include offset)
void set_first(size_t i)
change first position
view1D(view1D< matrix::Dense< Float >, Float > &x, const size_t start, const size_t end)
create view1D(start:end) from monolish::matrix::Dense
Float * begin() const
returns begin iterator (include offset)
view1D(vector< Float > &x, const size_t start, const size_t end)
create view1D(start:end) from vector
void print_all(bool force_cpu=false) const
print all elements to standart I/O
size_t get_last() const
get end position
size_t get_nnz() const
get view1D size (same as size())
void fill(Float value)
fill vector elements with a scalar value
Float * data()
returns a direct pointer to the vector (dont include offset)
void set_last(size_t i)
change last position
Float * begin()
returns begin iterator (include offset)
Float & operator[](const size_t i)
reference to the element at position
Float * end()
returns a end iterator