Kompute
Public Member Functions | List of all members
kp::TensorT< T > Class Template Reference
Inheritance diagram for kp::TensorT< T >:
Inheritance graph
[legend]
Collaboration diagram for kp::TensorT< T >:
Collaboration graph
[legend]

Public Member Functions

 TensorT (std::shared_ptr< vk::PhysicalDevice > physicalDevice, std::shared_ptr< vk::Device > device, const std::vector< T > &data, const TensorTypes &tensorType=TensorTypes::eDevice)
 
T * data ()
 
std::vector< T > vector ()
 
T & operator[] (int index)
 
void setData (const std::vector< T > &data)
 
TensorDataTypes dataType ()
 
- Public Member Functions inherited from kp::Tensor
 Tensor (std::shared_ptr< vk::PhysicalDevice > physicalDevice, std::shared_ptr< vk::Device > device, void *data, uint32_t elementTotalCount, uint32_t elementMemorySize, const TensorDataTypes &dataType, const TensorTypes &tensorType=TensorTypes::eDevice)
 
virtual ~Tensor ()
 
void rebuild (void *data, uint32_t elementTotalCount, uint32_t elementMemorySize)
 
void destroy ()
 
bool isInit ()
 
TensorTypes tensorType ()
 
void recordCopyFrom (const vk::CommandBuffer &commandBuffer, std::shared_ptr< Tensor > copyFromTensor)
 
void recordCopyFromStagingToDevice (const vk::CommandBuffer &commandBuffer)
 
void recordCopyFromDeviceToStaging (const vk::CommandBuffer &commandBuffer)
 
void recordPrimaryBufferMemoryBarrier (const vk::CommandBuffer &commandBuffer, vk::AccessFlagBits srcAccessMask, vk::AccessFlagBits dstAccessMask, vk::PipelineStageFlagBits srcStageMask, vk::PipelineStageFlagBits dstStageMask)
 
void recordStagingBufferMemoryBarrier (const vk::CommandBuffer &commandBuffer, vk::AccessFlagBits srcAccessMask, vk::AccessFlagBits dstAccessMask, vk::PipelineStageFlagBits srcStageMask, vk::PipelineStageFlagBits dstStageMask)
 
vk::DescriptorBufferInfo constructDescriptorBufferInfo ()
 
uint32_t size ()
 
uint32_t dataTypeMemorySize ()
 
uint32_t memorySize ()
 
TensorDataTypes dataType ()
 
void * rawData ()
 
void setRawData (const void *data)
 
template<typename T >
T * data ()
 
template<typename T >
std::vector< T > vector ()
 

Additional Inherited Members

- Public Types inherited from kp::Tensor
enum class  TensorTypes { eDevice = 0 , eHost = 1 , eStorage = 2 }
 
enum class  TensorDataTypes {
  eBool = 0 , eInt = 1 , eUnsignedInt = 2 , eFloat = 3 ,
  eDouble = 4
}
 
- Static Public Member Functions inherited from kp::Tensor
static std::string toString (TensorDataTypes dt)
 
static std::string toString (TensorTypes dt)
 
- Protected Attributes inherited from kp::Tensor
TensorTypes mTensorType
 
TensorDataTypes mDataType
 
uint32_t mSize
 
uint32_t mDataTypeMemorySize
 
void * mRawData
 

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