BufferDescriptor Struct Reference

BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects. More...

#include <bufferDescriptor.h>

Public Member Functions

 BufferDescriptor ()
 Default Constructor. More...
 
 BufferDescriptor (int o, int l, int s)
 Constructor. More...
 
int GetLocalOffset () const
 Returns the relative offset within a stride. More...
 
bool IsValid () const
 True if the descriptor values are internally consistent. More...
 
void Reset ()
 Resets the descriptor to default. More...
 
bool operator== (BufferDescriptor const &other) const
 True if the descriptors are identical. More...
 
bool operator!= (BufferDescriptor const &other) const
 True if the descriptors are not identical. More...
 

Public Attributes

int offset
 offset to desired element data More...
 
int length
 number or length of the data More...
 
int stride
 stride to the next element More...
 

Detailed Description

BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects.

The offset of BufferDescriptor can also be used to express a batching offset if the data buffer is combined across multiple objects together.

  • Note that each element has the same data type (float)

Definition at line 61 of file bufferDescriptor.h.

Constructor & Destructor Documentation

BufferDescriptor ( )
inline

Default Constructor.

Definition at line 64 of file bufferDescriptor.h.

BufferDescriptor ( int  o,
int  l,
int  s 
)
inline

Constructor.

Definition at line 67 of file bufferDescriptor.h.

Member Function Documentation

int GetLocalOffset ( ) const
inline

Returns the relative offset within a stride.

Definition at line 70 of file bufferDescriptor.h.

bool IsValid ( ) const
inline

True if the descriptor values are internally consistent.

Definition at line 75 of file bufferDescriptor.h.

bool operator!= ( BufferDescriptor const &  other) const
inline

True if the descriptors are not identical.

Definition at line 93 of file bufferDescriptor.h.

bool operator== ( BufferDescriptor const &  other) const
inline

True if the descriptors are identical.

Definition at line 86 of file bufferDescriptor.h.

void Reset ( )
inline

Resets the descriptor to default.

Definition at line 81 of file bufferDescriptor.h.

Member Data Documentation

int length

number or length of the data

Definition at line 100 of file bufferDescriptor.h.

int offset

offset to desired element data

Definition at line 98 of file bufferDescriptor.h.

int stride

stride to the next element

Definition at line 102 of file bufferDescriptor.h.


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