monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
|
Go to the documentation of this file.
28 template <
typename Float>
class vector;
31 template <
typename Float>
class Dense;
32 template <
typename Float>
class CRS;
33 template <
typename Float>
class LinearOperator;
42 template <
typename TYPE,
typename Float>
class view1D {
98 first = x.get_first() + start;
117 first = x.get_first() + start;
247 void print_all(
bool force_cpu =
false)
const;
274 if (
target.get_device_mem_stat()) {
275 throw std::runtime_error(
"Error, GPU vector cant use operator[]");
288 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 fill(Float value)
fill vector elements with a scalar value
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())
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)
refetrence to the element at position
Float * end()
returns a end iterator