monolish  0.17.3-dev.16
MONOlithic LInear equation Solvers for Highly-parallel architecture
Public Member Functions | Public Attributes | Private Attributes | List of all members
monolish::vector< Float > Class Template Reference

vector class More...

#include <monolish_vector.hpp>

Collaboration diagram for monolish::vector< Float >:
Collaboration graph

Public Member Functions

Float * begin ()
 returns a begin iterator More...
 
const Float * begin () const
 returns a begin iterator More...
 
Float * data ()
 returns a direct pointer to the vector More...
 
const Float * data () const
 returns a direct pointer to the vector More...
 
void device_free () const
 free data on GPU More...
 
Float * end ()
 returns a end iterator More...
 
const Float * end () const
 returns a end iterator More...
 
bool equal (const vector< Float > &vec, bool compare_cpu_and_device=false) const
 Comparing matrices (A == mat) More...
 
bool equal (const view1D< matrix::Dense< Float >, Float > &vec, bool compare_cpu_and_device=false) const
 Comparing matrices (A == mat) More...
 
bool equal (const view1D< tensor::tensor_Dense< Float >, Float > &vec, bool compare_cpu_and_device=false) const
 Comparing matrices (A == mat) More...
 
bool equal (const view1D< vector< Float >, Float > &vec, bool compare_cpu_and_device=false) const
 Comparing matrices (A == mat) 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...
 
bool get_device_mem_stat () const
 true: sended, false: not send More...
 
size_t get_first () const
 get first position More...
 
std::shared_ptr< bool > get_gpu_status () const
 gpu status shared pointer More...
 
size_t get_nnz () const
 get vector size More...
 
size_t get_offset () const
 get first position (same as get_first()) More...
 
void move (const tensor::tensor_Dense< Float > &tensor_dense)
 
void move (const tensor::tensor_Dense< Float > &tensor_dense, int N)
 
void move (const view_tensor_Dense< matrix::Dense< Float >, Float > &tensor_dense)
 
void move (const view_tensor_Dense< matrix::Dense< Float >, Float > &tensor_dense, int N)
 
void move (const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > &tensor_dense)
 
void move (const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > &tensor_dense, int N)
 
void move (const view_tensor_Dense< vector< Float >, Float > &tensor_dense)
 
void move (const view_tensor_Dense< vector< Float >, Float > &tensor_dense, int N)
 
void nonfree_recv ()
 recv data from GPU (w/o free) More...
 
bool operator!= (const vector< Float > &vec) const
 Comparing vectors (v != vec) More...
 
bool operator!= (const view1D< matrix::Dense< Float >, Float > &vec) const
 Comparing vectors (v != vec) More...
 
bool operator!= (const view1D< tensor::tensor_Dense< Float >, Float > &vec) const
 Comparing vectors (v != vec) More...
 
bool operator!= (const view1D< vector< Float >, Float > &vec) const
 Comparing vectors (v != vec) More...
 
vector< Float > operator- ()
 Sign inversion. More...
 
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...
 
bool operator== (const vector< Float > &vec) const
 Comparing vectors (v == vec) More...
 
bool operator== (const view1D< matrix::Dense< Float >, Float > &vec) const
 Comparing vectors (v == vec) More...
 
bool operator== (const view1D< tensor::tensor_Dense< Float >, Float > &vec) const
 Comparing vectors (v == vec) More...
 
bool operator== (const view1D< vector< Float >, Float > &vec) const
 Comparing vectors (v == vec) More...
 
Float & operator[] (size_t i)
 reference to the element at position (v[i]) More...
 
void print_all (bool force_cpu=false) const
 print all elements to standart I/O More...
 
void print_all (std::string filename) const
 print all elements to file More...
 
void push_back (Float Val)
 Add a new element at the end of the vector (only CPU) More...
 
void recv ()
 recv data from GPU, and free data on GPU More...
 
void resize (size_t N, Float Val=0)
 resize vector (only CPU) More...
 
void send () const
 send data to GPU More...
 
void set_first (size_t i)
 change first position More...
 
size_t size () const
 get vector size More...
 
std::string type () const
 get format name "vector" More...
 
 vector ()
 
 vector (const Float *start, const Float *end)
 copy from pointer More...
 
 vector (const size_t N)
 allocate size N vector More...
 
 vector (const size_t N, const Float min, const Float max)
 create N length rand(min~max) vector More...
 
 vector (const size_t N, const Float min, const Float max, const std::uint32_t seed)
 create N length rand(min~max) vector with random seed More...
 
 vector (const size_t N, const Float value)
 initialize size N vector, value to fill the container More...
 
 vector (const std::initializer_list< Float > &list)
 copy from initializer_list More...
 
 vector (const std::vector< Float > &vec)
 copy from std::vector More...
 
 vector (const vector< Float > &vec)
 copy from monolish::vector More...
 
 vector (const view1D< matrix::Dense< Float >, Float > &vec)
 copy from monolish::view1D from monolish::matrix::Dense More...
 
 vector (const view1D< tensor::tensor_Dense< Float >, Float > &vec)
 copy from monolish::view1D from monolish::tensor::tensor_Dense More...
 
 vector (const view1D< vector< Float >, Float > &vec)
 copy from monolish::view1D from vector More...
 
 ~vector ()
 destructor of vector, free GPU memory More...
 

Public Attributes

std::size_t alloc_nnz = 0
 alloced vector size More...
 
std::shared_ptr< Float > val
 vector data (pointer) More...
 
bool val_create_flag = false
 vector create flag; More...
 
std::size_t val_nnz = 0
 vector size More...
 

Private Attributes

size_t first = 0
 first position of data array More...
 
std::shared_ptr< bool > gpu_status = std::make_shared<bool>(false)
 true: sended, false: not send More...
 

Detailed Description

template<typename Float>
class monolish::vector< Float >

vector class

Note
  • Multi-threading: true
  • GPU acceleration: false

Definition at line 47 of file monolish_vector.hpp.

Constructor & Destructor Documentation

◆ vector() [1/12]

template<typename Float >
monolish::vector< Float >::vector ( )
inline

Definition at line 80 of file monolish_vector.hpp.

◆ vector() [2/12]

template<typename Float >
monolish::vector< Float >::vector ( const size_t  N)

allocate size N vector

Parameters
Nvector length
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ vector() [3/12]

template<typename Float >
monolish::vector< Float >::vector ( const size_t  N,
const Float  value 
)

initialize size N vector, value to fill the container

Parameters
Nvector length
valuefill Float type value to all elements
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ vector() [4/12]

template<typename Float >
monolish::vector< Float >::vector ( const std::vector< Float > &  vec)

copy from std::vector

Parameters
vecinput std::vector
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ vector() [5/12]

template<typename Float >
monolish::vector< Float >::vector ( const std::initializer_list< Float > &  list)

copy from initializer_list

Parameters
listinput initializer_list
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ vector() [6/12]

template<typename Float >
monolish::vector< Float >::vector ( const vector< Float > &  vec)

copy from monolish::vector

Parameters
vecinput monolish::vector
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • # of data transfer: N (only allocation)
      • if gpu_status == true; coping data on CPU and GPU respectively
      • else; coping data only on CPU

◆ vector() [7/12]

template<typename Float >
monolish::vector< Float >::vector ( const view1D< vector< Float >, Float > &  vec)

copy from monolish::view1D from vector

Parameters
vecinput monolish::view1D from vector
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • # of data transfer: N (only allocation)
      • if gpu_status == true; coping data on CPU and GPU respectively
      • else; coping data only on CPU

◆ vector() [8/12]

template<typename Float >
monolish::vector< Float >::vector ( const view1D< matrix::Dense< Float >, Float > &  vec)

copy from monolish::view1D from monolish::matrix::Dense

Parameters
vecinput monolish::view1D from monolish::matrix::Dense
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • # of data transfer: N (only allocation)
      • if gpu_status == true; coping data on CPU and GPU respectively
      • else; coping data only on CPU

◆ vector() [9/12]

template<typename Float >
monolish::vector< Float >::vector ( const view1D< tensor::tensor_Dense< Float >, Float > &  vec)

copy from monolish::view1D from monolish::tensor::tensor_Dense

Parameters
vecinput monolish::view1D from monolish::tensor::tensor_Dense
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • # of data transfer: N (only allocation)
      • if gpu_status == true; coping data on CPU and GPU respectively
      • else; coping data only on CPU

◆ vector() [10/12]

template<typename Float >
monolish::vector< Float >::vector ( const Float *  start,
const Float *  end 
)

copy from pointer

Parameters
startstart pointer
endend pointer
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ vector() [11/12]

template<typename Float >
monolish::vector< Float >::vector ( const size_t  N,
const Float  min,
const Float  max 
)

create N length rand(min~max) vector

Parameters
Nvector length
minrand min
maxrand max
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ vector() [12/12]

template<typename Float >
monolish::vector< Float >::vector ( const size_t  N,
const Float  min,
const Float  max,
const std::uint32_t  seed 
)

create N length rand(min~max) vector with random seed

Parameters
Nvector length
minrand min
maxrand max
seedrandom seed
Note
The ramdom number generator is random generator is mt19937
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ ~vector()

template<typename Float >
monolish::vector< Float >::~vector ( )
inline

destructor of vector, free GPU memory

Note
  • # of data transfer: 0
  • Multi-threading: false
  • GPU acceleration: true

Definition at line 290 of file monolish_vector.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

template<typename Float >
Float* monolish::vector< Float >::begin ( )
inline

returns a begin iterator

Returns
begin iterator
Note
  • # of computation: 1

Definition at line 331 of file monolish_vector.hpp.

Here is the call graph for this function:

◆ begin() [2/2]

template<typename Float >
const Float* monolish::vector< Float >::begin ( ) const
inline

returns a begin iterator

Returns
begin iterator
Note
  • # of computation: 1

Definition at line 323 of file monolish_vector.hpp.

Here is the call graph for this function:

◆ data() [1/2]

template<typename Float >
Float* monolish::vector< Float >::data ( )
inline

returns a direct pointer to the vector

Returns
A pointer to the first element
Note
  • # of computation: 1

Definition at line 315 of file monolish_vector.hpp.

◆ data() [2/2]

template<typename Float >
const Float* monolish::vector< Float >::data ( ) const
inline

returns a direct pointer to the vector

Returns
A const pointer to the first element
Note
  • # of computation: 1

Definition at line 307 of file monolish_vector.hpp.

Here is the caller graph for this function:

◆ device_free()

template<typename Float >
void monolish::vector< Float >::device_free ( ) const

free data on GPU

Note
  • # of data transfer: 0
  • Multi-threading: false
  • GPU acceleration: true
Here is the caller graph for this function:

◆ end() [1/2]

template<typename Float >
Float* monolish::vector< Float >::end ( )
inline

returns a end iterator

Returns
end iterator
Note
  • # of computation: 1

Definition at line 349 of file monolish_vector.hpp.

Here is the call graph for this function:

◆ end() [2/2]

template<typename Float >
const Float* monolish::vector< Float >::end ( ) const
inline

returns a end iterator

Returns
end iterator
Note
  • # of computation: 1

Definition at line 339 of file monolish_vector.hpp.

Here is the call graph for this function:

◆ equal() [1/4]

template<typename Float >
bool monolish::vector< Float >::equal ( const vector< Float > &  vec,
bool  compare_cpu_and_device = false 
) const

Comparing matrices (A == mat)

Parameters
vecvector
compare_cpu_and_devicecompare data on both CPU and GPU
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true

◆ equal() [2/4]

template<typename Float >
bool monolish::vector< Float >::equal ( const view1D< matrix::Dense< Float >, Float > &  vec,
bool  compare_cpu_and_device = false 
) const

Comparing matrices (A == mat)

Parameters
vecview1D from monolish::matrix::Dense
compare_cpu_and_devicecompare data on both CPU and GPU
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true

◆ equal() [3/4]

template<typename Float >
bool monolish::vector< Float >::equal ( const view1D< tensor::tensor_Dense< Float >, Float > &  vec,
bool  compare_cpu_and_device = false 
) const

Comparing matrices (A == mat)

Parameters
vecview1D from monolish::tensor::tensor_Dense
compare_cpu_and_devicecompare data on both CPU and GPU
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true

◆ equal() [4/4]

template<typename Float >
bool monolish::vector< Float >::equal ( const view1D< vector< Float >, Float > &  vec,
bool  compare_cpu_and_device = false 
) const

Comparing matrices (A == mat)

Parameters
vecview1D from monolish::vector
compare_cpu_and_devicecompare data on both CPU and GPU
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true

◆ fill()

template<typename Float >
void monolish::vector< Float >::fill ( Float  value)

fill vector elements with a scalar value

Parameters
valuescalar value
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true

◆ get_alloc_nnz()

template<typename Float >
size_t monolish::vector< Float >::get_alloc_nnz ( ) const
inline

get # of alloced non-zeros

Note
  • # of computation: 1
  • Multi-threading: false
  • GPU acceleration: false

Definition at line 374 of file monolish_vector.hpp.

◆ get_device_mem_stat()

template<typename Float >
bool monolish::vector< Float >::get_device_mem_stat ( ) const
inline

true: sended, false: not send

Returns
gpu status
Note
  • # of data transfer: 0
  • Multi-threading: false
  • GPU acceleration: true

Definition at line 273 of file monolish_vector.hpp.

Here is the caller graph for this function:

◆ get_first()

template<typename Float >
size_t monolish::vector< Float >::get_first ( ) const
inline

get first position

Returns
first position
Note
  • # of computation: 1

Definition at line 382 of file monolish_vector.hpp.

Here is the caller graph for this function:

◆ get_gpu_status()

template<typename Float >
std::shared_ptr<bool> monolish::vector< Float >::get_gpu_status ( ) const
inline

gpu status shared pointer

Returns
gpu status shared pointer

Definition at line 279 of file monolish_vector.hpp.

◆ get_nnz()

template<typename Float >
size_t monolish::vector< Float >::get_nnz ( ) const
inline

get vector size

Returns
vector size
Note
  • # of computation: 1

Definition at line 365 of file monolish_vector.hpp.

Here is the caller graph for this function:

◆ get_offset()

template<typename Float >
size_t monolish::vector< Float >::get_offset ( ) const
inline

get first position (same as get_first())

Returns
first position
Note
  • # of computation: 1

Definition at line 390 of file monolish_vector.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ move() [1/8]

template<typename Float >
void monolish::vector< Float >::move ( const tensor::tensor_Dense< Float > &  tensor_dense)

◆ move() [2/8]

template<typename Float >
void monolish::vector< Float >::move ( const tensor::tensor_Dense< Float > &  tensor_dense,
int  N 
)

◆ move() [3/8]

template<typename Float >
void monolish::vector< Float >::move ( const view_tensor_Dense< matrix::Dense< Float >, Float > &  tensor_dense)

◆ move() [4/8]

template<typename Float >
void monolish::vector< Float >::move ( const view_tensor_Dense< matrix::Dense< Float >, Float > &  tensor_dense,
int  N 
)

◆ move() [5/8]

template<typename Float >
void monolish::vector< Float >::move ( const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > &  tensor_dense)

◆ move() [6/8]

template<typename Float >
void monolish::vector< Float >::move ( const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > &  tensor_dense,
int  N 
)

◆ move() [7/8]

template<typename Float >
void monolish::vector< Float >::move ( const view_tensor_Dense< vector< Float >, Float > &  tensor_dense)

◆ move() [8/8]

template<typename Float >
void monolish::vector< Float >::move ( const view_tensor_Dense< vector< Float >, Float > &  tensor_dense,
int  N 
)

◆ nonfree_recv()

template<typename Float >
void monolish::vector< Float >::nonfree_recv ( )

recv data from GPU (w/o free)

Note
  • # of data transfer: N
  • Multi-threading: false
  • GPU acceleration: true

◆ operator!=() [1/4]

template<typename Float >
bool monolish::vector< Float >::operator!= ( const vector< Float > &  vec) const

Comparing vectors (v != vec)

Parameters
vecvector (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator!=() [2/4]

template<typename Float >
bool monolish::vector< Float >::operator!= ( const view1D< matrix::Dense< Float >, Float > &  vec) const

Comparing vectors (v != vec)

Parameters
vecvector (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator!=() [3/4]

template<typename Float >
bool monolish::vector< Float >::operator!= ( const view1D< tensor::tensor_Dense< Float >, Float > &  vec) const

Comparing vectors (v != vec)

Parameters
vecvector (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator!=() [4/4]

template<typename Float >
bool monolish::vector< Float >::operator!= ( const view1D< vector< Float >, Float > &  vec) const

Comparing vectors (v != vec)

Parameters
vecvector (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator-()

template<typename Float >
vector<Float> monolish::vector< Float >::operator- ( )

Sign inversion.

Returns
output vector
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true

◆ operator=() [1/5]

template<typename Float >
void monolish::vector< Float >::operator= ( const std::vector< Float > &  vec)

copy vector from std::vector

Parameters
vecsource std::vector
Returns
output vector
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: false

◆ operator=() [2/5]

template<typename Float >
void monolish::vector< Float >::operator= ( const vector< Float > &  vec)

copy vector, It is same as copy ( Copy the memory on CPU and GPU )

Parameters
vecsource vector
Returns
output vector
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: true
    • # of data transfer: 0
      • if gpu_statius == true; coping data on GPU
      • else; coping data on CPU

◆ operator=() [3/5]

template<typename Float >
void monolish::vector< Float >::operator= ( const view1D< matrix::Dense< Float >, Float > &  vec)

copy vector, It is same as copy ( Copy the memory on CPU and GPU )

Parameters
vecsource view1D from monolish::matrix::Dense
Returns
output vector
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: true
    • # of data transfer: 0
      • if gpu_statius == true; coping data on GPU
      • else; coping data on CPU

◆ operator=() [4/5]

template<typename Float >
void monolish::vector< Float >::operator= ( const view1D< tensor::tensor_Dense< Float >, Float > &  vec)

copy vector, It is same as copy ( Copy the memory on CPU and GPU )

Parameters
vecsource view1D from monolish::tensor::tensor_Dense
Returns
output vector
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: true
    • # of data transfer: 0
      • if gpu_statius == true; coping data on GPU
      • else; coping data on CPU

◆ operator=() [5/5]

template<typename Float >
void monolish::vector< Float >::operator= ( const view1D< vector< Float >, Float > &  vec)

copy vector, It is same as copy ( Copy the memory on CPU and GPU )

Parameters
vecsource view1D from monolish::vector
Returns
output vector
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: true
    • # of data transfer: 0
      • if gpu_statius == true; coping data on GPU
      • else; coping data on CPU

◆ operator==() [1/4]

template<typename Float >
bool monolish::vector< Float >::operator== ( const vector< Float > &  vec) const

Comparing vectors (v == vec)

Parameters
vecvector (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator==() [2/4]

template<typename Float >
bool monolish::vector< Float >::operator== ( const view1D< matrix::Dense< Float >, Float > &  vec) const

Comparing vectors (v == vec)

Parameters
vecview1D from monolish::matrix::Dense (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator==() [3/4]

template<typename Float >
bool monolish::vector< Float >::operator== ( const view1D< tensor::tensor_Dense< Float >, Float > &  vec) const

Comparing vectors (v == vec)

Parameters
vecview1D from monolish::tensor::tensor_Dense (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator==() [4/4]

template<typename Float >
bool monolish::vector< Float >::operator== ( const view1D< vector< Float >, Float > &  vec) const

Comparing vectors (v == vec)

Parameters
vecview1D from monolish::vector (size N)
Returns
true or false
Note
  • # of computation: N
  • Multi-threading: true
  • GPU acceleration: true
    • if gpu_status == true; compare data on GPU
    • else; compare data on CPU

◆ operator[]()

template<typename Float >
Float& monolish::vector< Float >::operator[] ( size_t  i)
inline

reference to the element at position (v[i])

Parameters
iPosition of an element in the vector
Returns
vector element (v[i])
Note
  • # of computation: 1
  • Multi-threading: false
  • GPU acceleration: false

Definition at line 591 of file monolish_vector.hpp.

Here is the call graph for this function:

◆ print_all() [1/2]

template<typename Float >
void monolish::vector< Float >::print_all ( bool  force_cpu = false) const

print all elements to standart I/O

Parameters
force_cpuIgnore device status and output CPU data
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: true (doesn't work in parallel)

◆ print_all() [2/2]

template<typename Float >
void monolish::vector< Float >::print_all ( std::string  filename) const

print all elements to file

Parameters
filenameoutput filename
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

◆ push_back()

template<typename Float >
void monolish::vector< Float >::push_back ( Float  Val)
inline

Add a new element at the end of the vector (only CPU)

Parameters
valnew element
Note
  • # of computation: 1

Definition at line 464 of file monolish_vector.hpp.

Here is the call graph for this function:

◆ recv()

template<typename Float >
void monolish::vector< Float >::recv ( )

recv data from GPU, and free data on GPU

Note
  • # of data transfer: N
  • Multi-threading: false
  • GPU acceleration: true

◆ resize()

template<typename Float >
void monolish::vector< Float >::resize ( size_t  N,
Float  Val = 0 
)
inline

resize vector (only CPU)

Parameters
Nvector length
Note
  • # of computation: N
  • Multi-threading: false
  • GPU acceleration: false

Definition at line 437 of file monolish_vector.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send()

template<typename Float >
void monolish::vector< Float >::send ( ) const

send data to GPU

Note
  • # of data transfer: N
  • Multi-threading: false
  • GPU acceleration: true

◆ set_first()

template<typename Float >
void monolish::vector< Float >::set_first ( size_t  i)
inline

change first position

Note
  • # of computation: 1

Definition at line 397 of file monolish_vector.hpp.

◆ size()

template<typename Float >
size_t monolish::vector< Float >::size ( ) const
inline

get vector size

Returns
vector size
Note
  • # of computation: 1

Definition at line 357 of file monolish_vector.hpp.

Here is the caller graph for this function:

◆ type()

template<typename Float >
std::string monolish::vector< Float >::type ( ) const
inline

get format name "vector"

Note
  • # of computation: 1
  • Multi-threading: false
  • GPU acceleration: false

Definition at line 225 of file monolish_vector.hpp.

Member Data Documentation

◆ alloc_nnz

template<typename Float >
std::size_t monolish::vector< Float >::alloc_nnz = 0

alloced vector size

Definition at line 73 of file monolish_vector.hpp.

◆ first

template<typename Float >
size_t monolish::vector< Float >::first = 0
private

first position of data array

Definition at line 57 of file monolish_vector.hpp.

◆ gpu_status

template<typename Float >
std::shared_ptr<bool> monolish::vector< Float >::gpu_status = std::make_shared<bool>(false)
mutableprivate

true: sended, false: not send

Definition at line 52 of file monolish_vector.hpp.

◆ val

template<typename Float >
std::shared_ptr<Float> monolish::vector< Float >::val

vector data (pointer)

Definition at line 63 of file monolish_vector.hpp.

◆ val_create_flag

template<typename Float >
bool monolish::vector< Float >::val_create_flag = false

vector create flag;

Definition at line 78 of file monolish_vector.hpp.

◆ val_nnz

template<typename Float >
std::size_t monolish::vector< Float >::val_nnz = 0

vector size

Definition at line 68 of file monolish_vector.hpp.


The documentation for this class was generated from the following files: