monolish
0.17.3-dev.16
MONOlithic LInear equation Solvers for Highly-parallel architecture
|
#include <monolish_tensor_dense.hpp>
Public Member Functions | |
template<typename... Args> | |
Float | at (const size_t dim, const Args... args) |
get element A[pos[0]][pos[1]]... (onlu CPU) More... | |
template<typename... Args> | |
Float | at (const size_t dim, const Args... args) const |
get element A[pos[0]][pos[1]]... More... | |
Float | at (const size_t pos) |
get element A[index]... (onlu CPU) More... | |
Float | at (const size_t pos) const |
get element A[index]... More... | |
Float | at (const std::vector< size_t > &pos) |
get element A[pos[0]][pos[1]]... (onlu CPU) More... | |
Float | at (const std::vector< size_t > &pos) const |
get element A[pos[0]][pos[1]]... More... | |
template<typename... Args> | |
Float | at (const std::vector< size_t > &pos, const Args... args) |
get element A[pos[0]][pos[1]]... (onlu CPU) More... | |
template<typename... Args> | |
Float | at (const std::vector< size_t > &pos, const size_t dim, const Args... args) const |
get element A[pos[0]][pos[1]]... More... | |
Float * | begin () |
returns a begin iterator More... | |
const Float * | begin () const |
returns a begin iterator More... | |
void | convert (const matrix::Dense< Float > &dense) |
create tensor_Dense tensor from Dense matrix More... | |
void | convert (const tensor::tensor_COO< Float > &tens) |
Create tensor_Dense tensor from tensor_COO tensor. More... | |
void | convert (const tensor::tensor_Dense< Float > &tens) |
Create tensor_Dense tensor from tensor_Dense tensor. More... | |
void | convert (const vector< Float > &vec) |
create tensor_Dense tensor from vector More... | |
Float * | data () |
returns a direct pointer to the tensor More... | |
const Float * | data () const |
returns a direct pointer to the tensor More... | |
void | device_free () const |
free data on GPU 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... | |
const Float * | end () const |
returns a end iterator More... | |
bool | equal (const tensor_Dense< Float > &tens, bool compare_cpu_and_device=false) const |
Comparing tensors (A == tens) More... | |
void | fill (Float value) |
fill tensor elements with a scalar value More... | |
size_t | get_alloc_nnz () const |
get # of alloced non-zeros More... | |
double | get_data_size () const |
Memory data space required by the matrix. 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... | |
std::vector< size_t > | get_index (const size_t pos) const |
get vector index from aligned index (A[pos[0]][pos[1]]... = A[ind]) More... | |
size_t | get_index (const std::vector< size_t > &pos) const |
get aligned index from vector index (A[pos] = A[ind[0]][ind[1]]...) More... | |
size_t | get_nnz () const |
get # of non-zeros More... | |
size_t | get_offset () const |
get first position (same as get_first()) More... | |
std::vector< size_t > | get_shape () const |
get shape More... | |
void | insert (const size_t pos, const Float Val) |
set element A[index]... More... | |
void | insert (const std::vector< size_t > &pos, const Float Val) |
set element A[pos[0]][pos[1]]... More... | |
void | move (const matrix::Dense< Float > &dense) |
move tensor_Dense tensor from Dense matrix More... | |
void | move (const vector< Float > &vec) |
move tensor_Dense tensor from vector More... | |
void | nonfree_recv () |
recv. data to GPU (w/o free) More... | |
bool | operator!= (const tensor_Dense< Float > &tens) const |
Comparing tensors (A != tens) More... | |
void | operator= (const tensor_Dense< Float > &tens) |
tensor copy More... | |
void | operator= (const view_tensor_Dense< matrix::Dense< Float >, Float > &tens) |
tensor copy More... | |
void | operator= (const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > &tens) |
tensor copy More... | |
void | operator= (const view_tensor_Dense< vector< Float >, Float > &tens) |
tensor copy More... | |
bool | operator== (const tensor_Dense< Float > &tens) const |
Comparing tensors (A == tens) 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 standard I/O More... | |
void | recv () |
recv. data to GPU, and free data on GPU More... | |
template<typename... Args> | |
void | reshape (const int dim, const Args... args) |
Reshape tensor. More... | |
void | reshape (const std::vector< int > &shape) |
Reshape tensor. More... | |
template<typename... Args> | |
void | reshape (const std::vector< int > &shape, const size_t dim, const Args... args) |
Reshape tensor. More... | |
void | resize (const size_t N, Float Val=0) |
resize tensor value More... | |
void | resize (const std::vector< size_t > &shape, Float val=0) |
resize tensor value More... | |
void | send () const |
send data to GPU More... | |
void | set_first (size_t i) |
Set # of non-zero elements. More... | |
void | set_ptr (const std::vector< size_t > &shape, const Float *value) |
Set tensor_Dense array from array. More... | |
void | set_ptr (const std::vector< size_t > &shape, const Float value) |
Set tensor_Dense array from array. More... | |
void | set_ptr (const std::vector< size_t > &shape, const std::vector< Float > &value) |
Set tensor_Dense array from std::vector. More... | |
void | set_shape (const std::vector< size_t > &shape) |
Set shape. More... | |
tensor_Dense () | |
tensor_Dense (const matrix::Dense< Float > &dense) | |
Create tensor_Dense tensor from Dense matrix. More... | |
tensor_Dense (const std::initializer_list< size_t > &shape) | |
Allocate dense tensor. More... | |
tensor_Dense (const std::vector< size_t > &shape) | |
Allocate dense tensor. More... | |
tensor_Dense (const std::vector< size_t > &shape, const Float *value) | |
Allocate dense tensor. More... | |
tensor_Dense (const std::vector< size_t > &shape, const Float min, const Float max) | |
Allocate tensor_Dense tensor. More... | |
tensor_Dense (const std::vector< size_t > &shape, const Float min, const Float max, const std::uint32_t seed) | |
Allocate tensor_Dense tensor. More... | |
tensor_Dense (const std::vector< size_t > &shape, const std::vector< Float > &value) | |
Allocate tensor_Dense tensor. More... | |
tensor_Dense (const tensor::tensor_COO< Float > &tens) | |
Create tensor_Dense tensor from tensor_COO tensor. More... | |
tensor_Dense (const tensor::tensor_Dense< Float > &tens) | |
Create tensor_Dense tensor from tensor_Dense tensor. More... | |
tensor_Dense (const tensor_Dense< Float > &tens, Float value) | |
Create tensor_Dense tensor of the same size as input tensor. More... | |
tensor_Dense (const vector< Float > &vec) | |
create tensor_Dense tensor from vector More... | |
tensor_Dense (const view_tensor_Dense< matrix::Dense< Float >, Float > &tens) | |
Create Dense matrix from view Dense matrix. More... | |
tensor_Dense (const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > &tens) | |
Create Dense matrix from view Dense matrix. More... | |
tensor_Dense (const view_tensor_Dense< vector< Float >, Float > &tens) | |
Create Dense matrix from view Dense matrix. More... | |
std::string | type () const |
get format name "tensor_Dense" More... | |
~tensor_Dense () | |
destructor of dense tensor, free GPU memory More... | |
Public Attributes | |
size_t | alloc_nnz = 0 |
allocated tensor size More... | |
std::shared_ptr< Float > | val |
Dense tensor format value (pointer) More... | |
bool | val_create_flag = false |
tensor create flag More... | |
size_t | val_nnz = 0 |
# of non-zero element (M * N) 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... | |
std::vector< size_t > | shape |
shape More... | |
Definition at line 13 of file monolish_tensor_dense.hpp.
|
inline |
Definition at line 51 of file monolish_tensor_dense.hpp.
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const tensor::tensor_Dense< Float > & | tens | ) |
Create tensor_Dense tensor from tensor_Dense tensor.
tens | tensor_Dense format tensor |
dense.gpu_status == true
; coping data on CPU and GPU respectively
|
inline |
Create tensor_Dense tensor from tensor_COO tensor.
tens | input tensor_COO tensor |
Definition at line 95 of file monolish_tensor_dense.hpp.
|
inline |
Create tensor_Dense tensor from Dense matrix.
dense | input Dense matrix (size M x N)
|
Definition at line 116 of file monolish_tensor_dense.hpp.
|
inline |
create tensor_Dense tensor from vector
vec | input vector (size M)
|
Definition at line 137 of file monolish_tensor_dense.hpp.
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const std::vector< size_t > & | shape | ) |
Allocate dense tensor.
shape | shape of tensor |
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const std::initializer_list< size_t > & | shape | ) |
Allocate dense tensor.
shape | shape of tensor |
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const std::vector< size_t > & | shape, |
const Float * | value | ||
) |
Allocate dense tensor.
shape | shape of tensor |
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const std::vector< size_t > & | shape, |
const std::vector< Float > & | value | ||
) |
Allocate tensor_Dense tensor.
shape | shape of tensor |
value | value std::vector |
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const std::vector< size_t > & | shape, |
const Float | min, | ||
const Float | max | ||
) |
Allocate tensor_Dense tensor.
shape | shape of tensor |
min | rand min |
max | rand max |
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const std::vector< size_t > & | shape, |
const Float | min, | ||
const Float | max, | ||
const std::uint32_t | seed | ||
) |
Allocate tensor_Dense tensor.
shape | shape of tensor |
min | rand min |
max | rand max |
seed | random seed |
monolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const tensor_Dense< Float > & | tens, |
Float | value | ||
) |
Create tensor_Dense tensor of the same size as input tensor.
tens | input tensor_Dense tensor |
value | the value to initialize elements |
dense.gpu_status == true
; coping data on CPU and GPU respectivelymonolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const view_tensor_Dense< vector< Float >, Float > & | tens | ) |
Create Dense matrix from view Dense matrix.
dense | Dense format matrix |
dense.gpu_status == true
; coping data on CPU and GPU respectivelymonolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const view_tensor_Dense< matrix::Dense< Float >, Float > & | tens | ) |
Create Dense matrix from view Dense matrix.
dense | Dense format matrix |
dense.gpu_status == true
; coping data on CPU and GPU respectivelymonolish::tensor::tensor_Dense< Float >::tensor_Dense | ( | const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > & | tens | ) |
Create Dense matrix from view Dense matrix.
dense | Dense format matrix |
dense.gpu_status == true
; coping data on CPU and GPU respectively
|
inline |
destructor of dense tensor, free GPU memory
Definition at line 601 of file monolish_tensor_dense.hpp.
|
inline |
get element A[pos[0]][pos[1]]... (onlu CPU)
pos | std::vector position |
Definition at line 506 of file monolish_tensor_dense.hpp.
|
inline |
get element A[pos[0]][pos[1]]...
pos | std::vector position |
Definition at line 449 of file monolish_tensor_dense.hpp.
|
inline |
get element A[index]... (onlu CPU)
pos | aligned position index |
Definition at line 465 of file monolish_tensor_dense.hpp.
Float monolish::tensor::tensor_Dense< Float >::at | ( | const size_t | pos | ) | const |
get element A[index]...
pos | aligned position index |
|
inline |
get element A[pos[0]][pos[1]]... (onlu CPU)
pos | std::vector position |
Definition at line 478 of file monolish_tensor_dense.hpp.
Float monolish::tensor::tensor_Dense< Float >::at | ( | const std::vector< size_t > & | pos | ) | const |
get element A[pos[0]][pos[1]]...
pos | std::vector position |
|
inline |
get element A[pos[0]][pos[1]]... (onlu CPU)
pos | std::vector position |
Definition at line 492 of file monolish_tensor_dense.hpp.
|
inline |
get element A[pos[0]][pos[1]]...
pos | std::vector position |
Definition at line 424 of file monolish_tensor_dense.hpp.
|
inline |
returns a begin iterator
Definition at line 699 of file monolish_tensor_dense.hpp.
|
inline |
returns a begin iterator
Definition at line 691 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::convert | ( | const matrix::Dense< Float > & | dense | ) |
create tensor_Dense tensor from Dense matrix
dense | input Dense matrix (size M x N)
|
void monolish::tensor::tensor_Dense< Float >::convert | ( | const tensor::tensor_COO< Float > & | tens | ) |
Create tensor_Dense tensor from tensor_COO tensor.
tens | input tensor_Dense tensor |
void monolish::tensor::tensor_Dense< Float >::convert | ( | const tensor::tensor_Dense< Float > & | tens | ) |
Create tensor_Dense tensor from tensor_Dense tensor.
tens | input tensor_Dense tensor |
void monolish::tensor::tensor_Dense< Float >::convert | ( | const vector< Float > & | vec | ) |
create tensor_Dense tensor from vector
vec | input vector (size M)
|
|
inline |
returns a direct pointer to the tensor
Definition at line 623 of file monolish_tensor_dense.hpp.
|
inline |
returns a direct pointer to the tensor
Definition at line 615 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::device_free | ( | ) | const |
free data on GPU
void monolish::tensor::tensor_Dense< Float >::diag_add | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix add.
alpha | scalar |
void monolish::tensor::tensor_Dense< Float >::diag_add | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix add.
vec | vector |
void monolish::tensor::tensor_Dense< Float >::diag_add | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_add | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_add | ( | const view1D< vector< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_div | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix div.
alpha | scalar |
void monolish::tensor::tensor_Dense< Float >::diag_div | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix div.
vec | vector |
void monolish::tensor::tensor_Dense< Float >::diag_div | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_div | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_div | ( | const view1D< vector< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_mul | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix mul.
alpha | scalar |
void monolish::tensor::tensor_Dense< Float >::diag_mul | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix mul.
vec | vector |
void monolish::tensor::tensor_Dense< Float >::diag_mul | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_mul | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_mul | ( | const view1D< vector< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_sub | ( | const Float | alpha | ) |
Scalar and diag. vector of Dense format matrix sub.
alpha | scalar |
void monolish::tensor::tensor_Dense< Float >::diag_sub | ( | const vector< Float > & | vec | ) |
Vector and diag. vector of Dense format matrix sub.
vec | vector |
void monolish::tensor::tensor_Dense< Float >::diag_sub | ( | const view1D< matrix::Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_sub | ( | const view1D< tensor::tensor_Dense< Float >, Float > & | vec | ) |
void monolish::tensor::tensor_Dense< Float >::diag_sub | ( | const view1D< vector< Float >, Float > & | vec | ) |
|
inline |
returns a end iterator
Definition at line 717 of file monolish_tensor_dense.hpp.
|
inline |
returns a end iterator
Definition at line 707 of file monolish_tensor_dense.hpp.
bool monolish::tensor::tensor_Dense< Float >::equal | ( | const tensor_Dense< Float > & | tens, |
bool | compare_cpu_and_device = false |
||
) | const |
Comparing tensors (A == tens)
tens | tensor_Dense tensor |
compare_cpu_and_device | compare data on both CPU and GPU |
void monolish::tensor::tensor_Dense< Float >::fill | ( | Float | value | ) |
fill tensor elements with a scalar value
value | scalar value |
|
inline |
get # of alloced non-zeros
Definition at line 328 of file monolish_tensor_dense.hpp.
|
inline |
Memory data space required by the matrix.
Definition at line 388 of file monolish_tensor_dense.hpp.
|
inline |
true: sended, false: not send
Definition at line 584 of file monolish_tensor_dense.hpp.
|
inline |
get first position
Definition at line 336 of file monolish_tensor_dense.hpp.
|
inline |
gpu status shared pointer
Definition at line 590 of file monolish_tensor_dense.hpp.
|
inline |
get vector index from aligned index (A[pos[0]][pos[1]]... = A[ind])
pos | position (scalar) |
Definition at line 871 of file monolish_tensor_dense.hpp.
|
inline |
get aligned index from vector index (A[pos] = A[ind[0]][ind[1]]...)
pos | position (std::vector) |
Definition at line 850 of file monolish_tensor_dense.hpp.
|
inline |
get # of non-zeros
Definition at line 319 of file monolish_tensor_dense.hpp.
|
inline |
get first position (same as get_first())
Definition at line 344 of file monolish_tensor_dense.hpp.
|
inline |
get shape
Definition at line 310 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::insert | ( | const size_t | pos, |
const Float | Val | ||
) |
set element A[index]...
pos | aligned position index |
Val | scalar value |
void monolish::tensor::tensor_Dense< Float >::insert | ( | const std::vector< size_t > & | pos, |
const Float | Val | ||
) |
set element A[pos[0]][pos[1]]...
pos | std::vector position |
Val | scalar value |
void monolish::tensor::tensor_Dense< Float >::move | ( | const matrix::Dense< Float > & | dense | ) |
move tensor_Dense tensor from Dense matrix
dense | input Dense matrix (size M x N)
|
void monolish::tensor::tensor_Dense< Float >::move | ( | const vector< Float > & | vec | ) |
move tensor_Dense tensor from vector
vec | input vector (size M)
|
void monolish::tensor::tensor_Dense< Float >::nonfree_recv | ( | ) |
recv. data to GPU (w/o free)
bool monolish::tensor::tensor_Dense< Float >::operator!= | ( | const tensor_Dense< Float > & | tens | ) | const |
Comparing tensors (A != tens)
tens | tensor_Dense tensor |
gpu_status == true
; compare data on GPUvoid monolish::tensor::tensor_Dense< Float >::operator= | ( | const tensor_Dense< Float > & | tens | ) |
tensor copy
tens | Dense tensor |
gpu_statius == true
; coping data on CPUvoid monolish::tensor::tensor_Dense< Float >::operator= | ( | const view_tensor_Dense< matrix::Dense< Float >, Float > & | tens | ) |
tensor copy
tens | Dense tensor |
gpu_statius == true
; coping data on CPUvoid monolish::tensor::tensor_Dense< Float >::operator= | ( | const view_tensor_Dense< tensor::tensor_Dense< Float >, Float > & | tens | ) |
tensor copy
tens | Dense tensor |
gpu_statius == true
; coping data on CPUvoid monolish::tensor::tensor_Dense< Float >::operator= | ( | const view_tensor_Dense< vector< Float >, Float > & | tens | ) |
tensor copy
tens | Dense tensor |
gpu_statius == true
; coping data on CPUbool monolish::tensor::tensor_Dense< Float >::operator== | ( | const tensor_Dense< Float > & | tens | ) | const |
Comparing tensors (A == tens)
tens | tensor_Dense tensor |
gpu_status == true
; compare data on GPU
|
inline |
reference to the element at position (v[i])
i | Position of an element in the vector |
Definition at line 795 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::print_all | ( | bool | force_cpu = false | ) | const |
print all elements to standard I/O
force_cpu | Ignore device status and output CPU data |
void monolish::tensor::tensor_Dense< Float >::recv | ( | ) |
recv. data to GPU, and free data on GPU
|
inline |
Reshape tensor.
shape |
Definition at line 916 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::reshape | ( | const std::vector< int > & | shape | ) |
Reshape tensor.
shape |
|
inline |
Reshape tensor.
shape |
Definition at line 900 of file monolish_tensor_dense.hpp.
|
inline |
resize tensor value
N | tensor size |
Definition at line 633 of file monolish_tensor_dense.hpp.
|
inline |
resize tensor value
shape | tensor shape |
Definition at line 662 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::send | ( | ) | const |
send data to GPU
|
inline |
Set # of non-zero elements.
NZ | # of non-zero elements
|
change first position
Definition at line 369 of file monolish_tensor_dense.hpp.
void monolish::tensor::tensor_Dense< Float >::set_ptr | ( | const std::vector< size_t > & | shape, |
const Float * | value | ||
) |
Set tensor_Dense array from array.
shape | shape of tensor |
value | value (size nnz) |
void monolish::tensor::tensor_Dense< Float >::set_ptr | ( | const std::vector< size_t > & | shape, |
const Float | value | ||
) |
Set tensor_Dense array from array.
shape | shape of tensor |
value | value (size nnz) |
void monolish::tensor::tensor_Dense< Float >::set_ptr | ( | const std::vector< size_t > & | shape, |
const std::vector< Float > & | value | ||
) |
Set tensor_Dense array from std::vector.
shape | shape of tensor |
value | value (size nnz) |
|
inline |
Set shape.
shape | shape of tensor
|
Definition at line 353 of file monolish_tensor_dense.hpp.
|
inline |
get format name "tensor_Dense"
Definition at line 378 of file monolish_tensor_dense.hpp.
size_t monolish::tensor::tensor_Dense< Float >::alloc_nnz = 0 |
allocated tensor size
Definition at line 44 of file monolish_tensor_dense.hpp.
|
private |
first position of data array
Definition at line 28 of file monolish_tensor_dense.hpp.
|
mutableprivate |
true: sended, false: not send
Definition at line 23 of file monolish_tensor_dense.hpp.
|
private |
shape
Definition at line 18 of file monolish_tensor_dense.hpp.
std::shared_ptr<Float> monolish::tensor::tensor_Dense< Float >::val |
Dense tensor format value (pointer)
Definition at line 34 of file monolish_tensor_dense.hpp.
bool monolish::tensor::tensor_Dense< Float >::val_create_flag = false |
tensor create flag
Definition at line 49 of file monolish_tensor_dense.hpp.
size_t monolish::tensor::tensor_Dense< Float >::val_nnz = 0 |
# of non-zero element (M * N)
Definition at line 39 of file monolish_tensor_dense.hpp.