|
|
| Tensor (std::string filename, const Ref< MemoryGrp > &mem) |
| |
|
std::string | filename () const |
| | returns filename_
|
| |
|
std::fstream * | file () |
| | returns MemoryGrpRegion for this tensor
|
| |
|
void | set_filesize (long i) |
| | set/get the filesize of the tensor
|
| |
|
long | get_filesize () const |
| |
|
void | createfile () |
| | create/delete the distributed file for the tensor
|
| |
|
void | deletefile () |
| |
|
void | input_offset (long tag, long offset) |
| | input for the hash table
|
| |
|
void | get_block (long tag, double *data) |
| | get a block from the distributed file (non-blocking)
|
| |
|
void | add_block (long tag, double *data) |
| | add a block to the distributed file (non-blocking); double* data will be destroyed
|
| |
|
void | put_block (long tag, double *data) |
| | put a block to the distributed file (non-blocking)
|
| |
|
bool | exists (long tag) const |
| | does this block exist?
|
| |
|
bool | is_this_local (long tag) |
| | returns if a block associated with long tag resides in a local memory or not
|
| |
|
void | zero () |
| | initialize/clear tensors to zero
|
| |
|
void | assign (double a) |
| | assigns all values to a
|
| |
|
double | norm () const |
| | obtain the norm of a tensor
|
| |
|
double | ddot (Ref< Tensor > &) const |
| | obtain the ddot of two tensors
|
| |
|
Ref< Tensor > | copy () const |
| | return a copy of self
|
| |
|
Ref< Tensor > | clone () const |
| | return a tensor that have the same hashtable, and is intilaized to zero
|
| |
|
void | daxpy (const Ref< Tensor > &, double) |
| | perform daxpy of tensors (self+=a*other)
|
| |
|
void | scale (double a) |
| | scale self by a
|
| |
|
void | sync () const |
| | sync
|
| |
|
void | print (const std::string &label, std::ostream &os=ExEnv::out0()) const |
| | print
|
| |
| size_t | identifier () const |
| | Return the unique identifier for this object that can be compared for different objects of different types. More...
|
| |
|
int | lock_ptr () const |
| | Lock this object.
|
| |
|
int | unlock_ptr () const |
| | Unlock this object.
|
| |
|
void | use_locks (bool inVal) |
| | start and stop using locks on this object
|
| |
|
refcount_t | nreference () const |
| | Return the reference count.
|
| |
|
refcount_t | reference () |
| | Increment the reference count and return the new count.
|
| |
|
refcount_t | dereference () |
| | Decrement the reference count and return the new count.
|
| |
|
int | managed () const |
| |
| void | unmanage () |
| | Turn off the reference counting mechanism for this object. More...
|
| |