ExaTN
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
exatn::runtime::TalshNodeExecutor Class Reference
Inheritance diagram for exatn::runtime::TalshNodeExecutor:
exatn::runtime::TensorNodeExecutor exatn::Identifiable exatn::Cloneable< TensorNodeExecutor >

Public Member Functions

 TalshNodeExecutor (const TalshNodeExecutor &)=delete
 
TalshNodeExecutoroperator= (const TalshNodeExecutor &)=delete
 
 TalshNodeExecutor (TalshNodeExecutor &&) noexcept=delete
 
TalshNodeExecutoroperator= (TalshNodeExecutor &&) noexcept=delete
 
void initialize () override
 
int execute (numerics::TensorOpCreate &op, TensorOpExecHandle *exec_handle) override
 
int execute (numerics::TensorOpDestroy &op, TensorOpExecHandle *exec_handle) override
 
int execute (numerics::TensorOpTransform &op, TensorOpExecHandle *exec_handle) override
 
int execute (numerics::TensorOpAdd &op, TensorOpExecHandle *exec_handle) override
 
int execute (numerics::TensorOpContract &op, TensorOpExecHandle *exec_handle) override
 
bool sync (TensorOpExecHandle op_handle, int *error_code, bool wait=false) override
 
std::shared_ptr< talsh::Tensor > getLocalTensor (const numerics::Tensor &tensor, const std::vector< std::pair< DimOffset, DimExtent >> &slice_spec) override
 
const std::string name () const override
 
const std::string description () const override
 
std::shared_ptr< TensorNodeExecutorclone () override
 
- Public Member Functions inherited from exatn::Cloneable< TensorNodeExecutor >
virtual ~Cloneable ()
 

Protected Attributes

std::unordered_map< numerics::TensorHashType, std::shared_ptr< talsh::Tensor > > tensors_
 
std::unordered_map< TensorOpExecHandle, std::shared_ptr< talsh::TensorTask > > tasks_
 

Static Protected Attributes

static bool talsh_initialized_ = false
 
static int talsh_node_exec_count_ = 0
 

Member Function Documentation

◆ execute()

int exatn::runtime::TalshNodeExecutor::execute ( numerics::TensorOpCreate op,
TensorOpExecHandle *  exec_handle 
)
overridevirtual

Executes the tensor operation found in a DAG node asynchronously, returning the execution handle in exec_handle that can later be used for testing for completion of the operation execution. Returns an integer error code (0:Success).

Implements exatn::runtime::TensorNodeExecutor.

◆ getLocalTensor()

std::shared_ptr< talsh::Tensor > exatn::runtime::TalshNodeExecutor::getLocalTensor ( const numerics::Tensor tensor,
const std::vector< std::pair< DimOffset, DimExtent >> &  slice_spec 
)
overridevirtual

Returns a local copy of a given tensor slice.

Implements exatn::runtime::TensorNodeExecutor.

◆ initialize()

void exatn::runtime::TalshNodeExecutor::initialize ( )
overridevirtual

Explicitly initializes the underlying numerical service, if needed

Implements exatn::runtime::TensorNodeExecutor.

◆ sync()

bool exatn::runtime::TalshNodeExecutor::sync ( TensorOpExecHandle  op_handle,
int *  error_code,
bool  wait = false 
)
overridevirtual

Synchronizes the execution of a previously submitted tensor operation.

Implements exatn::runtime::TensorNodeExecutor.

Member Data Documentation

◆ talsh_initialized_

bool exatn::runtime::TalshNodeExecutor::talsh_initialized_ = false
staticprotected

TAL-SH initialization status

◆ talsh_node_exec_count_

int exatn::runtime::TalshNodeExecutor::talsh_node_exec_count_ = 0
staticprotected

Number of instances of TAL-SH node executors

◆ tasks_

std::unordered_map<TensorOpExecHandle,std::shared_ptr<talsh::TensorTask> > exatn::runtime::TalshNodeExecutor::tasks_
protected

Active execution handles associated with tensor operations currently executed by TAL-SH

◆ tensors_

std::unordered_map<numerics::TensorHashType,std::shared_ptr<talsh::Tensor> > exatn::runtime::TalshNodeExecutor::tensors_
protected

Maps generic exatn::numerics::Tensor to its TAL-SH implementation talsh::Tensor


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