FAST
3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
|
#include <Tensor.hpp>
Public Member Functions | |
virtual void | create (std::unique_ptr< float[]> data, TensorShape shape) |
virtual void | create (const float *const data, TensorShape shape) |
virtual void | create (TensorShape shape) |
virtual void | create (std::initializer_list< float > data) |
virtual void | expandDims (int position=0) |
virtual TensorShape | getShape () const |
virtual TensorAccess::pointer | getAccess (accessType type) |
virtual std::unique_ptr< OpenCLBufferAccess > | getOpenCLBufferAccess (accessType type, OpenCLDevice::pointer) |
virtual void | freeAll () override |
virtual void | free (ExecutionDevice::pointer device) override |
virtual void | setSpacing (VectorXf spacing) |
virtual VectorXf | getSpacing () const |
virtual void | deleteDimension (int dimension) |
virtual DataBoundingBox | getTransformedBoundingBox () const override |
virtual DataBoundingBox | getBoundingBox () const override |
virtual | ~Tensor () |
![]() | |
SpatialDataObject () | |
SceneGraphNode::pointer | getSceneGraphNode () const |
![]() | |
DataObject () | |
void | setMetadata (std::string name, std::string value) |
void | setMetadata (std::unordered_map< std::string, std::string > metadata) |
std::string | getMetadata (std::string name) const |
std::unordered_map< std::string, std::string > | getMetadata () const |
void | deleteMetadata (std::string name) |
uint64_t | getTimestamp () const |
void | updateModifiedTimestamp () |
virtual | ~DataObject () |
virtual std::string | getNameOfClass () const =0 |
uint64_t | getCreationTimestamp () const |
void | setCreationTimestamp (uint64_t timestamp) |
void | setLastFrame (std::string streamer) |
bool | isLastFrame () |
bool | isLastFrame (std::string streamer) |
std::unordered_set< std::string > | getLastFrame () |
void | setFrameData (std::string name, std::string value) |
std::string | getFrameData (std::string name) |
std::unordered_map< std::string, std::string > | getFrameData () |
void | accessFinished () |
![]() | |
Object () | |
virtual | ~Object () |
Reporter & | getReporter () |
Protected Member Functions | |
Tensor ()=default | |
virtual bool | isInitialized () |
virtual void | transferCLBufferFromHost (OpenCLDevice::pointer device) |
void | transferCLBufferToHost (OpenCLDevice::pointer device) |
void | updateOpenCLBufferData (OpenCLDevice::pointer device) |
void | setAllDataToOutOfDate () |
virtual bool | hasAnyData () |
void | updateHostData () |
virtual float * | getHostDataPointer () |
![]() | |
void | blockIfBeingWrittenTo () |
void | blockIfBeingAccessed () |
![]() | |
Reporter & | reportError () |
Reporter & | reportWarning () |
Reporter & | reportInfo () |
ReporterEnd | reportEnd () const |
Protected Attributes | |
std::unique_ptr< float[]> | m_data |
std::unordered_map< std::shared_ptr< OpenCLDevice >, cl::Buffer * > | mCLBuffers |
std::unordered_map< std::shared_ptr< OpenCLDevice >, bool > | mCLBuffersIsUpToDate |
TensorShape | m_shape |
bool | mHostDataIsUpToDate |
VectorXf | m_spacing |
friend | TensorAccess |
friend | OpenCLBufferAccess |
![]() | |
DataBoundingBox | mBoundingBox |
![]() | |
std::mutex | mDataIsBeingWrittenToMutex |
std::condition_variable | mDataIsBeingWrittenToCondition |
bool | mDataIsBeingWrittenTo |
std::mutex | mDataIsBeingAccessedMutex |
std::condition_variable | mDataIsBeingAccessedCondition |
bool | mDataIsBeingAccessed |
![]() | |
std::weak_ptr< Object > | mPtr |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< SpatialDataObject > | pointer |
![]() | |
typedef std::shared_ptr< DataObject > | pointer |
![]() | |
typedef std::shared_ptr< Object > | pointer |
![]() | |
static std::string | getStaticNameOfClass () |
![]() | |
static std::string | getStaticNameOfClass () |
![]() | |
static std::string | getStaticNameOfClass () |
|
virtual |
|
protecteddefault |
|
virtual |
Create a tensor using the provided data and shape. This method will COPY the data.
data | |
shape |
|
virtual |
Create a 1D tensor with the provided data. Its shape will be equal to its length
data |
|
virtual |
Create a tensor using the provided data and shape.
data | |
shape |
|
virtual |
Create an unitialized tensor with the provided shape
shape |
|
virtual |
|
virtual |
Add a dimension of size 1 at provided position. -1 is last position.
position |
|
overridevirtual |
Implements fast::DataObject.
|
overridevirtual |
Implements fast::DataObject.
|
virtual |
|
overridevirtual |
Reimplemented from fast::SpatialDataObject.
|
protectedvirtual |
|
virtual |
|
virtual |
|
virtual |
|
overridevirtual |
Reimplemented from fast::SpatialDataObject.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
virtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |