|
AGX Dynamics 2.42.1.1
|
Arrays are fast accessors into the data, or a portion of it, held by a Buffer. More...
#include <Array.h>
Inheritance diagram for agxData::AbstractArray:Public Member Functions | |
| AbstractArray () | |
| Create a new invalid array. | |
| AbstractArray (agxData::Buffer *buffer) | |
| Create a new array that covers the entire given buffer. | |
| AbstractArray (agxData::Buffer *buffer, agx::IndexRange32 range) | |
| Create a new array for the given buffer that covers the specified range. | |
| AbstractArray (const agxData::AbstractArray &other, agx::IndexRange32 localRange) | |
| Create a new array that covers a subset of another array. | |
| void | _setBuffer (agxData::Buffer *buffer) |
| Set the buffer while maintaining the current range, should normally not be used. | |
| agxData::Buffer * | buffer () |
| const agxData::Buffer * | buffer () const |
| bool | empty () const |
| agxData::Format * | getFormat () |
| const agxData::Format * | getFormat () const |
| void | init () |
| Set to empty array. | |
| void | init (agxData::Buffer *buffer) |
| Set the buffer that the array will access. The range is set to the entire buffer. | |
| void | init (agxData::Buffer *buffer, agx::IndexRange32 range) |
| Set the buffer that the array will access, as well as the range of the buffer that is to be covered. | |
| bool | isValid () const |
| agx::IndexRange32 & | range () |
| const agx::IndexRange32 & | range () const |
| void | setRange (agx::IndexRange32 range) |
| Set the range of the buffer that the array will cover. | |
| void | setRange (size_t startIndex, size_t endIndex) |
| Set the range of the buffer that the array will cover. | |
| size_t | size () const |
| void | sync () |
| Updates the internal data access pointer. Called when the back end buffer is reallocated. | |
Public Member Functions inherited from agxData::Data | |
| Data (void *ptr=nullptr) | |
| AbstractArray & | asArray () |
| template<typename T > | |
| Array< T > & | asArray () |
| const AbstractArray & | asArray () const |
| template<typename T > | |
| const Array< T > & | asArray () const |
| AbstractScalar & | asScalar () |
| template<typename T > | |
| Scalar< T > & | asScalar () |
| const AbstractScalar & | asScalar () const |
| template<typename T > | |
| const Scalar< T > & | asScalar () const |
| void * | ptr () |
| const void * | ptr () const |
Protected Attributes | |
| agxData::Buffer * | m_buffer |
| agx::IndexRange32 | m_range |
Protected Attributes inherited from agxData::Data | |
| void * | m_ptr |
Arrays are fast accessors into the data, or a portion of it, held by a Buffer.
The AbstractArray provides common base class for the template Array classes.
| agxData::AbstractArray::AbstractArray | ( | ) |
| agxData::AbstractArray::AbstractArray | ( | agxData::Buffer * | buffer | ) |
| agxData::AbstractArray::AbstractArray | ( | agxData::Buffer * | buffer, |
| agx::IndexRange32 | range | ||
| ) |
| agxData::AbstractArray::AbstractArray | ( | const agxData::AbstractArray & | other, |
| agx::IndexRange32 | localRange | ||
| ) |
Create a new array that covers a subset of another array.
Definition at line 647 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::begin(), agx::IndexRangeT< T >::end(), init(), m_buffer, m_range, range(), and agx::IndexRangeT< T >::size().
| void agxData::AbstractArray::_setBuffer | ( | agxData::Buffer * | buffer | ) |
| Buffer * agxData::AbstractArray::buffer | ( | ) |
| const Buffer * agxData::AbstractArray::buffer | ( | ) | const |
Definition at line 720 of file Buffer.h.
References m_buffer.
Referenced by AbstractArray(), agxData::Array< T >::Array(), agxData::Vector< T >::Vector(), _setBuffer(), and init().
| bool agxData::AbstractArray::empty | ( | ) | const |
Definition at line 713 of file Buffer.h.
References m_range, and agx::IndexRangeT< T >::size().
Referenced by agx::createCell().
| Format * agxData::AbstractArray::getFormat | ( | ) |
Definition at line 726 of file Buffer.h.
References agxData::Buffer::getFormat(), and m_buffer.
| const Format * agxData::AbstractArray::getFormat | ( | ) | const |
Definition at line 727 of file Buffer.h.
References agxData::Buffer::getFormat(), and m_buffer.
| void agxData::AbstractArray::init | ( | ) |
Set to empty array.
Definition at line 654 of file Buffer.h.
References m_buffer, agxData::Data::m_ptr, and m_range.
Referenced by AbstractArray(), and init().
| void agxData::AbstractArray::init | ( | agxData::Buffer * | buffer | ) |
| void agxData::AbstractArray::init | ( | agxData::Buffer * | buffer, |
| agx::IndexRange32 | range | ||
| ) |
Set the buffer that the array will access, as well as the range of the buffer that is to be covered.
Definition at line 661 of file Buffer.h.
References agxAssert, buffer(), agx::IndexRangeT< T >::end(), agxData::Buffer::getArray(), m_buffer, m_range, range(), agxData::Buffer::size(), and sync().
| bool agxData::AbstractArray::isValid | ( | ) | const |
| agx::IndexRange32 & agxData::AbstractArray::range | ( | ) |
Definition at line 721 of file Buffer.h.
References m_range.
Referenced by AbstractArray(), agx::createCell(), init(), and setRange().
| const agx::IndexRange32 & agxData::AbstractArray::range | ( | ) | const |
| void agxData::AbstractArray::setRange | ( | agx::IndexRange32 | range | ) |
Set the range of the buffer that the array will cover.
Definition at line 687 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::end(), agxData::Buffer::getArray(), m_buffer, m_range, range(), agxData::Buffer::size(), and sync().
| void agxData::AbstractArray::setRange | ( | size_t | startIndex, |
| size_t | endIndex | ||
| ) |
Set the range of the buffer that the array will cover.
Definition at line 696 of file Buffer.h.
References setRange().
Referenced by setRange().
| size_t agxData::AbstractArray::size | ( | ) | const |
Definition at line 708 of file Buffer.h.
References m_range, and agx::IndexRangeT< T >::size().
Referenced by agx::IndexListRange< T >::IndexListRange(), agx::calculateTier(), agx::GlobalResult::commit(), agx::createCell(), agxData::operator<<(), and agx::JacobianAccessorT< T >::setup().
| void agxData::AbstractArray::sync | ( | ) |
Updates the internal data access pointer. Called when the back end buffer is reallocated.
Definition at line 702 of file Buffer.h.
References agxAssert, agx::IndexRangeT< T >::begin(), agxData::Buffer::getFormat(), agxData::Format::getSize(), m_buffer, agxData::Data::m_ptr, m_range, and agxData::Buffer::ptr().
Referenced by _setBuffer(), init(), and setRange().
|
protected |
Definition at line 96 of file Array.h.
Referenced by AbstractArray(), _setBuffer(), buffer(), getFormat(), init(), isValid(), setRange(), and sync().
|
protected |
Definition at line 97 of file Array.h.
Referenced by AbstractArray(), empty(), init(), range(), agxData::Array< T >::raw(), setRange(), size(), and sync().