ExaTN
|
Public Member Functions | |
NumServer (const NumServer &)=delete | |
NumServer & | operator= (const NumServer &)=delete |
NumServer (NumServer &&) noexcept=delete | |
NumServer & | operator= (NumServer &&) noexcept=delete |
void | reconfigureTensorRuntime (const std::string &dag_executor_name, const std::string &node_executor_name) |
void | resetRuntimeLoggingLevel (int level=0) |
void | registerTensorMethod (const std::string &tag, std::shared_ptr< TensorMethod > method) |
std::shared_ptr< TensorMethod > | getTensorMethod (const std::string &tag) |
void | registerExternalData (const std::string &tag, std::shared_ptr< BytePacket > packet) |
std::shared_ptr< BytePacket > | getExternalData (const std::string &tag) |
ScopeId | openScope (const std::string &scope_name) |
ScopeId | closeScope () |
SpaceId | createVectorSpace (const std::string &space_name, DimExtent space_dim, const VectorSpace **space_ptr=nullptr) |
void | destroyVectorSpace (const std::string &space_name) |
void | destroyVectorSpace (SpaceId space_id) |
const VectorSpace * | getVectorSpace (const std::string &space_name) const |
SubspaceId | createSubspace (const std::string &subspace_name, const std::string &space_name, std::pair< DimOffset, DimOffset > bounds, const Subspace **subspace_ptr=nullptr) |
void | destroySubspace (const std::string &subspace_name) |
void | destroySubspace (SubspaceId subspace_id) |
const Subspace * | getSubspace (const std::string &subspace_name) const |
void | submit (std::shared_ptr< TensorOperation > operation) |
void | submit (TensorNetwork &network) |
void | submit (std::shared_ptr< TensorNetwork > network) |
bool | sync (const Tensor &tensor, bool wait=true) |
bool | sync (TensorOperation &operation, bool wait=true) |
bool | sync (TensorNetwork &network, bool wait=true) |
bool | sync (const std::string &name, bool wait=true) |
Tensor & | getTensorRef (const std::string &name) |
TensorElementType | getTensorElementType (const std::string &name) const |
template<typename... Args> | |
bool | createTensor (const std::string &name, TensorElementType element_type, Args &&... args) |
template<typename... Args> | |
bool | createTensorSync (const std::string &name, TensorElementType element_type, Args &&... args) |
bool | destroyTensor (const std::string &name) |
bool | destroyTensorSync (const std::string &name) |
template<typename NumericType > | |
bool | initTensor (const std::string &name, NumericType value) |
template<typename NumericType > | |
bool | initTensorSync (const std::string &name, NumericType value) |
bool | transformTensor (const std::string &name, std::shared_ptr< TensorMethod > functor) |
bool | transformTensorSync (const std::string &name, std::shared_ptr< TensorMethod > functor) |
template<typename NumericType > | |
bool | addTensors (const std::string &addition, NumericType alpha) |
template<typename NumericType > | |
bool | addTensorsSync (const std::string &addition, NumericType alpha) |
template<typename NumericType > | |
bool | contractTensors (const std::string &contraction, NumericType alpha) |
template<typename NumericType > | |
bool | contractTensorsSync (const std::string &contraction, NumericType alpha) |
bool | evaluateTensorNetwork (const std::string &name, const std::string &network) |
bool | evaluateTensorNetworkSync (const std::string &name, const std::string &network) |
std::shared_ptr< talsh::Tensor > | getLocalTensor (std::shared_ptr< Tensor > tensor, const std::vector< std::pair< DimOffset, DimExtent >> &slice_spec) |
std::shared_ptr< talsh::Tensor > | getLocalTensor (std::shared_ptr< Tensor > tensor) |
std::shared_ptr< talsh::Tensor > | getLocalTensor (const std::string &name, const std::vector< std::pair< DimOffset, DimExtent >> &slice_spec) |
std::shared_ptr< talsh::Tensor > | getLocalTensor (const std::string &name) |
bool exatn::NumServer::addTensors | ( | const std::string & | addition, |
NumericType | alpha | ||
) |
Performs tensor addition: tensor0 += tensor1 * alpha
ScopeId exatn::NumServer::closeScope | ( | ) |
Closes the currently open TAProL scope and returns its parental scope id.
bool exatn::NumServer::contractTensors | ( | const std::string & | contraction, |
NumericType | alpha | ||
) |
Performs tensor contraction: tensor0 += tensor1 * tensor2 * alpha
SubspaceId exatn::NumServer::createSubspace | ( | const std::string & | subspace_name, |
const std::string & | space_name, | ||
std::pair< DimOffset, DimOffset > | bounds, | ||
const Subspace ** | subspace_ptr = nullptr |
||
) |
Creates a named subspace of a named vector space, returns its registered id, and, optionally, a non-owning pointer to it.
bool exatn::NumServer::createTensor | ( | const std::string & | name, |
TensorElementType | element_type, | ||
Args &&... | args | ||
) |
Declares, registers and actually creates a tensor via processing backend. See numerics::Tensor constructors for different creation options.
SpaceId exatn::NumServer::createVectorSpace | ( | const std::string & | space_name, |
DimExtent | space_dim, | ||
const VectorSpace ** | space_ptr = nullptr |
||
) |
Creates a named vector space, returns its registered id, and, optionally, a non-owning pointer to it.
void exatn::NumServer::destroySubspace | ( | const std::string & | subspace_name | ) |
Destroys a previously created named subspace of a named vector space.
bool exatn::NumServer::destroyTensor | ( | const std::string & | name | ) |
Destroys a tensor, including its backend representation.
void exatn::NumServer::destroyVectorSpace | ( | const std::string & | space_name | ) |
Destroys a previously created named vector space.
bool exatn::NumServer::evaluateTensorNetwork | ( | const std::string & | name, |
const std::string & | network | ||
) |
Performs a full evaluation of a tensor network.
std::shared_ptr< BytePacket > exatn::NumServer::getExternalData | ( | const std::string & | tag | ) |
Retrieves a registered external data packet.
std::shared_ptr< talsh::Tensor > exatn::NumServer::getLocalTensor | ( | const std::string & | name | ) |
This overload returns a copy of the full tensor while referencing it by its registered name.
std::shared_ptr< talsh::Tensor > exatn::NumServer::getLocalTensor | ( | const std::string & | name, |
const std::vector< std::pair< DimOffset, DimExtent >> & | slice_spec | ||
) |
This overload references the ExaTN tensor by its registered name.
std::shared_ptr< talsh::Tensor > exatn::NumServer::getLocalTensor | ( | std::shared_ptr< Tensor > | tensor | ) |
This overload will return a copy of the full tensor.
std::shared_ptr< talsh::Tensor > exatn::NumServer::getLocalTensor | ( | std::shared_ptr< Tensor > | tensor, |
const std::vector< std::pair< DimOffset, DimExtent >> & | slice_spec | ||
) |
Returns a locally stored tensor slice (talsh::Tensor) providing access to tensor elements. This slice will be extracted from the exatn::numerics::Tensor implementation as a copy. The returned future becomes ready once the execution thread has retrieved the slice copy.
const Subspace * exatn::NumServer::getSubspace | ( | const std::string & | subspace_name | ) | const |
Returns a non-owning pointer to a previosuly registered named subspace of a previously registered named vector space.
TensorElementType exatn::NumServer::getTensorElementType | ( | const std::string & | name | ) | const |
Returns the tensor element type.
std::shared_ptr< TensorMethod > exatn::NumServer::getTensorMethod | ( | const std::string & | tag | ) |
Retrieves a registered external tensor method.
Tensor & exatn::NumServer::getTensorRef | ( | const std::string & | name | ) |
Returns the reference to the actual tensor object.
const VectorSpace * exatn::NumServer::getVectorSpace | ( | const std::string & | space_name | ) | const |
Returns a non-owning pointer to a previosuly registered vector space, including the anonymous vector space.
bool exatn::NumServer::initTensor | ( | const std::string & | name, |
NumericType | value | ||
) |
Initializes a tensor to some scalar value.
ScopeId exatn::NumServer::openScope | ( | const std::string & | scope_name | ) |
Opens a new (child) TAProL scope and returns its id.
void exatn::NumServer::reconfigureTensorRuntime | ( | const std::string & | dag_executor_name, |
const std::string & | node_executor_name | ||
) |
Reconfigures tensor runtime implementation.
void exatn::NumServer::registerExternalData | ( | const std::string & | tag, |
std::shared_ptr< BytePacket > | packet | ||
) |
Registers an external data packet.
void exatn::NumServer::registerTensorMethod | ( | const std::string & | tag, |
std::shared_ptr< TensorMethod > | method | ||
) |
Registers an external tensor method.
void exatn::NumServer::resetRuntimeLoggingLevel | ( | int | level = 0 | ) |
Resets the runtime logging level (0:none).
void exatn::NumServer::submit | ( | std::shared_ptr< TensorOperation > | operation | ) |
Submits an individual tensor operation for processing.
void exatn::NumServer::submit | ( | TensorNetwork & | network | ) |
Submits a tensor network for processing (evaluating the tensor-result).
bool exatn::NumServer::sync | ( | const std::string & | name, |
bool | wait = true |
||
) |
HIGHER-LEVEL WRAPPERS Synchronizes all outstanding update operations on a given tensor.
bool exatn::NumServer::sync | ( | const Tensor & | tensor, |
bool | wait = true |
||
) |
Synchronizes all update operations on a given tensor.
bool exatn::NumServer::sync | ( | TensorNetwork & | network, |
bool | wait = true |
||
) |
Synchronizes execution of a specific tensor network.
bool exatn::NumServer::sync | ( | TensorOperation & | operation, |
bool | wait = true |
||
) |
Synchronizes execution of a specific tensor operation.
bool exatn::NumServer::transformTensor | ( | const std::string & | name, |
std::shared_ptr< TensorMethod > | functor | ||
) |
Transforms (updates) a tensor according to a user-defined tensor functor.