Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::LinearOffsetMap< DataType > Class Template Reference

Public Member Functions

void add (DataType size, DataType offset)
 Adds an offset offset of size size.
DataType getAndRemoveOffset (DataType size)
 Retrieves a sufficient offset for an element of size size.
Int32 size () const
 Number of elements in the table.

Detailed Description

template<typename DataType>
class Arcane::LinearOffsetMap< DataType >

Definition at line 39 of file LinearOffsetMap.h.

Member Function Documentation

◆ add()

template<typename DataType>
void Arcane::LinearOffsetMap< DataType >::add ( DataType size,
DataType offset )

Adds an offset offset of size size.

Definition at line 27 of file LinearOffsetMap.cc.

References size().

Referenced by getAndRemoveOffset().

◆ getAndRemoveOffset()

template<typename DataType>
DataType Arcane::LinearOffsetMap< DataType >::getAndRemoveOffset ( DataType size)

Retrieves a sufficient offset for an element of size size.

Returns a negative value if no offset is available. If an offset is available, it returns its value. The found offset is removed from the list and an offset is added for the remaining size if it is not zero: if the found offset is offset and the associated size is offset_size, call add(offset_size - size, offset + size).

Definition at line 37 of file LinearOffsetMap.cc.

References add(), and size().

◆ size()

template<typename DataType>
Int32 Arcane::LinearOffsetMap< DataType >::size ( ) const

Number of elements in the table.

Definition at line 58 of file LinearOffsetMap.cc.

Referenced by add(), and getAndRemoveOffset().


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