Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
#include <algstrct.h>
Public Member Functions | |
PairIterator (algstrct const *sr_, char *ptr_) | |
constructor for iterator of buffer of pairs More... | |
PairIterator | operator[] (int n) const |
indexing moves by More... | |
int64_t | k () const |
returns key of pair at head of ptr More... | |
char * | d () const |
returns value of pair at head of ptr More... | |
void | read (char *buf, int64_t n=1) const |
sets external data to what this operator points to More... | |
void | read_val (char *buf) const |
sets external value to the value pointed by the iterator More... | |
void | write (char const *buf, int64_t n=1) |
sets internal pairs to provided data More... | |
void | write (PairIterator const iter, int64_t n=1) |
sets internal pairs to data from another iterator More... | |
void | write (ConstPairIterator const iter, int64_t n=1) |
sets internal pairs to data from another iterator More... | |
void | write_val (char const *buf) |
sets value of head pair to what is in buf More... | |
void | write_key (int64_t key) |
sets key of head pair to key More... | |
void | sort (int64_t n) |
sorts set of pairs using std::sort More... | |
int64_t | lower_bound (int64_t n, ConstPairIterator op) |
searches for pair op via std::lower_bound More... | |
Data Fields | |
algstrct const * | sr |
char * | ptr |
Definition at line 434 of file algstrct.h.
CTF_int::PairIterator::PairIterator | ( | algstrct const * | sr_, |
char * | ptr_ | ||
) |
constructor for iterator of buffer of pairs
Definition at line 780 of file algstrct.cxx.
char * CTF_int::PairIterator::d | ( | ) | const |
returns value of pair at head of ptr
Definition at line 793 of file algstrct.cxx.
Referenced by CTF_int::readwrite().
int64_t CTF_int::PairIterator::k | ( | ) | const |
returns key of pair at head of ptr
Definition at line 789 of file algstrct.cxx.
Referenced by CTF_int::depermute_keys(), CTF_int::depin(), CTF_int::tensor::extract_diag(), CTF::Tensor< dtype >::get_local_data(), CTF_int::pad_key(), CTF_int::permute_keys(), CTF_int::summation::print(), CTF::Tensor< dtype >::read_local(), CTF_int::scaling::sp_scl(), and CTF_int::wr_pairs_layout().
int64_t CTF_int::PairIterator::lower_bound | ( | int64_t | n, |
ConstPairIterator | op | ||
) |
searches for pair op via std::lower_bound
Definition at line 991 of file algstrct.cxx.
References CTF_int::ConstPairIterator::k(), and CTF_int::ConstPairIterator::ptr.
Referenced by CTF_int::wr_pairs_layout().
PairIterator CTF_int::PairIterator::operator[] | ( | int | n | ) | const |
void CTF_int::PairIterator::read | ( | char * | buf, |
int64_t | n = 1 |
||
) | const |
sets external data to what this operator points to
[in,out] | buf | data to set |
[in] | n | number of pairs to set |
Definition at line 797 of file algstrct.cxx.
Referenced by ctf.core.tensor::__getitem__(), and CTF_int::wr_pairs_layout().
void CTF_int::PairIterator::read_val | ( | char * | buf | ) | const |
sets external value to the value pointed by the iterator
[in,out] | buf | pair to set |
Definition at line 801 of file algstrct.cxx.
Referenced by CTF_int::tensor::allread(), CTF::Tensor< dtype >::get_local_data(), CTF_int::tensor::read(), CTF::Tensor< dtype >::read_local(), CTF_int::readwrite(), CTF_int::sp_read(), and CTF_int::tensor::write_dense_to_file().
void CTF_int::PairIterator::sort | ( | int64_t | n | ) |
sorts set of pairs using std::sort
Definition at line 825 of file algstrct.cxx.
Referenced by CTF_int::bucket_by_virt(), CTF_int::tensor::compare(), CTF_int::COO_Matrix::get_data(), CTF_int::summation::print(), CTF_int::tensor::read_all_pairs(), CTF_int::tspsum_permute::run(), and CTF_int::wr_pairs_layout().
void CTF_int::PairIterator::write | ( | char const * | buf, |
int64_t | n = 1 |
||
) |
sets internal pairs to provided data
[in] | buf | provided data to copy from |
[in] | n | number of pairs to set |
Definition at line 805 of file algstrct.cxx.
Referenced by ctf.core.tensor::__setitem__(), CTF_int::bucket_by_pe(), CTF_int::bucket_by_virt(), CTF_int::depad_tsr(), ctf.core.tensor::from_nparray(), CTF_int::permute_keys(), CTF_int::sp_write(), and CTF_int::tensor::sparsify().
void CTF_int::PairIterator::write | ( | PairIterator const | iter, |
int64_t | n = 1 |
||
) |
sets internal pairs to data from another iterator
[in] | iter | to copy from |
[in] | n | number of pairs to set |
Definition at line 809 of file algstrct.cxx.
References ptr.
Referenced by ctf.core.tensor::__setitem__(), and ctf.core.tensor::from_nparray().
void CTF_int::PairIterator::write | ( | ConstPairIterator const | iter, |
int64_t | n = 1 |
||
) |
sets internal pairs to data from another iterator
[in] | iter | to copy from |
[in] | n | number of pairs to set |
Definition at line 813 of file algstrct.cxx.
References CTF_int::ConstPairIterator::ptr.
Referenced by ctf.core.tensor::__setitem__(), and ctf.core.tensor::from_nparray().
void CTF_int::PairIterator::write_key | ( | int64_t | key | ) |
sets key of head pair to key
[in] | key | to set |
Definition at line 821 of file algstrct.cxx.
Referenced by CTF_int::depermute_keys(), CTF_int::COO_Matrix::get_data(), CTF_int::pad_key(), CTF_int::tensor::read(), CTF_int::wr_pairs_layout(), CTF_int::tensor::write(), and CTF_int::tensor::write_dense_to_file().
void CTF_int::PairIterator::write_val | ( | char const * | buf | ) |
sets value of head pair to what is in buf
[in] | buf | value to read into iterator head |
Definition at line 817 of file algstrct.cxx.
Referenced by CTF_int::tensor::extract_diag(), CTF_int::COO_Matrix::get_data(), CTF_int::ConstPairIterator::permute(), CTF_int::tensor::read(), CTF_int::readwrite(), CTF_int::algstrct::sort(), CTF_int::sp_read(), CTF_int::sp_write(), CTF_int::spspsum(), CTF_int::wr_pairs_layout(), and CTF_int::tensor::write().
char* CTF_int::PairIterator::ptr |
Definition at line 437 of file algstrct.h.
Referenced by CTF_int::tensor::allread(), CTF_int::ConstPairIterator::ConstPairIterator(), CTF_int::wr_pairs_layout(), and write().
algstrct const* CTF_int::PairIterator::sr |
Definition at line 436 of file algstrct.h.
Referenced by CTF_int::ConstPairIterator::ConstPairIterator(), and CTF_int::summation::print().