Input block record for use with OrderedMultipleInputFilter.
More...
#include <OrderedInput.hpp>
|
| OrderedInputBlock (uint64_t key, unsigned char *block, BlockSize_t len, OrderedInputSource *source, bool makeCopy=true) |
| Create a input block, potentially copying the source data. More...
|
|
void | reuseBlock (uint64_t key, unsigned char *block, BlockSize_t len, OrderedInputSource *source, bool makeCopy=true) OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
| Reinitialize an existing block. This routine is nearly identical to the OrderedInputBlock constructor, but is called when reusing an existing record. More...
|
|
| ~OrderedInputBlock () |
|
uint64_t | getSortKey () const OME_ALWAYS_INLINE |
| Get sort key for block. More...
|
|
bool | operator< (const OrderedInputBlock &arg) const OME_ALWAYS_INLINE OME_ALWAYS_OPTIMIZE("-O3") |
| Less-than comparison between OrderedInputBlock objects. More...
|
|
Input block record for use with OrderedMultipleInputFilter.
The OrderedInputBlock structure is the fundamental record delivery mechanism used by OrderedMultipleInputFilter objects.
◆ BlockSize_t
◆ anonymous enum
Enumerator |
---|
BLOCK_REUSE_PADDING | |
◆ OrderedInputBlock()
OrderedInputBlock::OrderedInputBlock |
( |
uint64_t |
key, |
|
|
unsigned char * |
block, |
|
|
BlockSize_t |
len, |
|
|
OrderedInputSource * |
source, |
|
|
bool |
makeCopy = true |
|
) |
| |
|
inline |
Create a input block, potentially copying the source data.
- Parameters
-
key | specifies the value of the used to order the input. |
block | points to the data for the block |
len | specifies the length of the data |
source | points to the input source from which the data was obtained |
makeCopy | is a Boolean that indicates if a copy of the data should be made. If true, the source data can be altered or deleted immediately, however, effort must be expended to duplicate the content. |
References blockLen, blockStart, inputFile, OME_PREFETCH, ownBlock, sortKey, and usedLen.
◆ ~OrderedInputBlock()
OrderedInputBlock::~OrderedInputBlock |
( |
| ) |
|
|
inline |
◆ getMaximumPossibleSortKey()
static CONSTEXPR uint64_t OrderedInputBlock::getMaximumPossibleSortKey |
( |
| ) |
|
|
inlinestatic |
Return maximum possible value for a sort key.
- Note
- This is a static routine, so the value returned is not specific to a particular OrderedInputSource.
◆ getSortKey()
uint64_t OrderedInputBlock::getSortKey |
( |
| ) |
const |
|
inline |
Get sort key for block.
References sortKey.
◆ operator<()
Less-than comparison between OrderedInputBlock objects.
- Parameters
-
arg | is a reference to the other peer object to be compared. |
- Warning
- The unexpected is done for this specialized class by having less-than act like greater-than so that the priority queue returns elements in the desired order.
- Note
- This routine is
virtual
to allow it to be overridden. This may be rare, but it does allow the logic to work with a subclass. Due to the rarity of this functionality being exploited and the multiple uses per input block, this benefits greatly from devirtualization, so marking application classes as final is helpful.
- See also
- FORCE_ORDERED_INPUT_BLOCK_AS_FINAL for a define to remove all virtualization for performance.
References inputFile, and sortKey.
◆ reuseBlock()
void OrderedInputBlock::reuseBlock |
( |
uint64_t |
key, |
|
|
unsigned char * |
block, |
|
|
BlockSize_t |
len, |
|
|
OrderedInputSource * |
source, |
|
|
bool |
makeCopy = true |
|
) |
| |
|
inline |
Reinitialize an existing block. This routine is nearly identical to the OrderedInputBlock constructor, but is called when reusing an existing record.
- Parameters
-
key | specifies the value of the used to order the input. |
block | points to the data for the block |
len | specifies the length of the data |
source | points to the input source from which the data was obtained |
makeCopy | is a Boolean that indicates if a copy of the data should be made. If true, the source data can be altered or deleted immediately, however, effort must be expended to duplicate the content. |
References blockLen, blockStart, CACHE_LINE_LENGTH, inputFile, OME_EXPECT_FALSE, OME_EXPECT_TRUE, OME_PREFETCH, ownBlock, sortKey, and usedLen.
◆ blockLen
◆ blockStart
unsigned char* OrderedInputBlock::blockStart |
◆ inputFile
class OrderedInputSource* OrderedInputBlock::inputFile |
◆ ownBlock
bool OrderedInputBlock::ownBlock |
◆ sortKey
uint64_t OrderedInputBlock::sortKey |
◆ usedLen
The documentation for this class was generated from the following file: