Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF_int::PairIterator Class Reference

#include <algstrct.h>

Collaboration diagram for CTF_int::PairIterator:

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
 

Detailed Description

Definition at line 434 of file algstrct.h.

Constructor & Destructor Documentation

CTF_int::PairIterator::PairIterator ( algstrct const *  sr_,
char *  ptr_ 
)

constructor for iterator of buffer of pairs

Definition at line 780 of file algstrct.cxx.

Member Function Documentation

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::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

indexing moves by

Parameters
[in]npairs

Definition at line 785 of file algstrct.cxx.

void CTF_int::PairIterator::read ( char *  buf,
int64_t  n = 1 
) const

sets external data to what this operator points to

Parameters
[in,out]bufdata to set
[in]nnumber 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

Parameters
[in,out]bufpair 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)
void CTF_int::PairIterator::write ( char const *  buf,
int64_t  n = 1 
)

sets internal pairs to provided data

Parameters
[in]bufprovided data to copy from
[in]nnumber 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

Parameters
[in]iterto copy from
[in]nnumber 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

Parameters
[in]iterto copy from
[in]nnumber 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)
void CTF_int::PairIterator::write_val ( char const *  buf)

Field Documentation

char* CTF_int::PairIterator::ptr
algstrct const* CTF_int::PairIterator::sr

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