Send feedback
  
   
 
  
   
  
    
  
  
    
    
litert:: Summary Inheritance Inherits from: 
litert::internal::Handle< LiteRtTensorBuffer, LiteRtDestroyTensorBuffer > 
Public static functions 
 
 
CreateFromAhwb (const RankedTensorType  & tensor_type, AHardwareBuffer *ahwb, size_t ahwb_offset) 
 
 
CreateFromGlBuffer (const RankedTensorType  & tensor_type, LiteRtGLenum target, LiteRtGLuint id, size_t size_bytes, size_t offset) 
 
 
CreateFromGlTexture (const RankedTensorType  & tensor_type, LiteRtGLenum target, LiteRtGLuint id, LiteRtGLenum format, size_t size_bytes, LiteRtGLint layer) 
 
 
CreateFromHostMemory (const RankedTensorType  & tensor_type, void *host_mem_addr, size_t buffer_size) 
 
 
CreateManaged (LiteRtTensorBufferType buffer_type, const RankedTensorType  & tensor_type, size_t buffer_size) 
 
 
Public functions 
BufferType 
Expected   LiteRtTensorBufferType  >  BufferType ()   const   
 
ClearEvent 
Expected < void > ClearEvent()
 
GetOpenClMemory 
Expected   cl_mem  >  GetOpenClMemory ()   const   
 
HasEvent 
bool   HasEvent ()   const   
 
IsOpenClMemory 
bool   IsOpenClMemory ()   const   
 
Offset 
Expected   size_t  >  Offset ()   const   
 
PackedSize 
Expected   size_t  >  PackedSize ()   const   
 
Read 
Expected < void > Read(
  absl::Span< T > data
)
 
SetLiteRtEvent 
Expected < void > SetLiteRtEvent(
  LiteRtEvent & litert_event
)
 
TensorBuffer 
 TensorBuffer()=default 
 
TensorBuffer 
 TensorBuffer(
  LiteRtTensorBuffer tensor_buffer,
  OwnHandle owned
) 
 
Write 
Expected   void  >  Write ( 
   absl :: Span <  const   T  >  data 
) 
 Public static functions 
CreateFromGlTexture 
Expected   TensorBuffer  >  CreateFromGlTexture ( 
   const   RankedTensorType  &  tensor_type , 
   LiteRtGLenum   target , 
   LiteRtGLuint   id , 
   LiteRtGLenum   format , 
   size_t   size_bytes , 
   LiteRtGLint   layer 
) 
 
  
  
 
  
    
    
      
    
     
  
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-05-14 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-14 UTC."],[],[]]