LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst::ap::ChunkDescriptor< MaxBlocksPerChunk > Class Template Reference

A generic descriptor containing state for different kinds of chunks. More...

#include <Chunk.h>

Inheritance diagram for lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >:

Public Member Functions

 ChunkDescriptor ()
 
void initialize ()
 
void clear ()
 
bool operator< (ChunkDescriptor const &cd) const
 
int getId () const
 
int getNextInChain () const
 
void setId (int const id)
 
void setNextInChain (int const id)
 

Public Attributes

int _chunkId
 Identifier for the chunk. More...
 
int _visitId
 Identifier for the visit that currently owns the chunk. More...
 
int _nextChunk
 Index of the next chunk in the same hash bucket as this one. More...
 
bool _usable
 
int _numBlocks
 Number of memory blocks allocated. More...
 
int _nextBlock
 Index of the next block to insert into. More...
 
int _index
 Index of the next free entry in the current block. More...
 
int _size
 Total number of entries. More...
 
int _delta
 Index of first entry marked IN_DELTA. More...
 
std::size_t _curBlockOffset
 Offset of the current block. More...
 
Fifo< MAX_VISITS_IN_FLIGHT > _interestedParties
 FIFO of visits to a FOV that overlaps the chunk. More...
 
std::size_t _blocks [MaxBlocksPerChunk]
 List of memory block offsets for allocated blocks. More...
 

Detailed Description

template<int MaxBlocksPerChunk>
class lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >

A generic descriptor containing state for different kinds of chunks.

State is data and memory type agnostic (that is, the structure contains no pointers and can therefore safely be placed in shared memory).

Definition at line 85 of file Chunk.h.

Constructor & Destructor Documentation

template<int MaxBlocksPerChunk>
lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::ChunkDescriptor ( )
inline

Definition at line 111 of file Chunk.h.

111 { initialize(); }

Member Function Documentation

template<int MaxBlocksPerChunk>
void lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::clear ( )
inline

Definition at line 115 of file Chunk.h.

115  {
116  _nextBlock = 0;
117  _index = 0;
118  _size = 0;
119  _delta = 0;
120  _curBlockOffset = 0;
121  }
std::size_t _curBlockOffset
Offset of the current block.
Definition: Chunk.h:103
int _delta
Index of first entry marked IN_DELTA.
Definition: Chunk.h:102
int _index
Index of the next free entry in the current block.
Definition: Chunk.h:100
int _size
Total number of entries.
Definition: Chunk.h:101
int _nextBlock
Index of the next block to insert into.
Definition: Chunk.h:99
template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::getId ( ) const
inline

Definition at line 128 of file Chunk.h.

128 { return _chunkId; }
int _chunkId
Identifier for the chunk.
Definition: Chunk.h:88
template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::getNextInChain ( ) const
inline

Definition at line 129 of file Chunk.h.

129 { return _nextChunk; }
int _nextChunk
Index of the next chunk in the same hash bucket as this one.
Definition: Chunk.h:90
template<int MaxBlocksPerChunk>
void lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::initialize ( )

Definition at line 53 of file Chunk.cc.

53  {
54 
55  _chunkId = -1;
56  _visitId = -1;
57  _nextChunk = -1;
58  _usable = false;
59  _numBlocks = 0;
60  _nextBlock = 0;
61  _index = 0;
62  _size = 0;
63  _delta = 0;
64  _curBlockOffset = 0;
65 
67  std::memset(_blocks, 0, sizeof(_blocks));
68 }
void clear()
Empties the Fifo.
Definition: Fifo.h:59
int _chunkId
Identifier for the chunk.
Definition: Chunk.h:88
int _numBlocks
Number of memory blocks allocated.
Definition: Chunk.h:98
std::size_t _curBlockOffset
Offset of the current block.
Definition: Chunk.h:103
int _nextChunk
Index of the next chunk in the same hash bucket as this one.
Definition: Chunk.h:90
Fifo< MAX_VISITS_IN_FLIGHT > _interestedParties
FIFO of visits to a FOV that overlaps the chunk.
Definition: Chunk.h:106
std::size_t _blocks[MaxBlocksPerChunk]
List of memory block offsets for allocated blocks.
Definition: Chunk.h:108
int _delta
Index of first entry marked IN_DELTA.
Definition: Chunk.h:102
int _index
Index of the next free entry in the current block.
Definition: Chunk.h:100
int _size
Total number of entries.
Definition: Chunk.h:101
int _nextBlock
Index of the next block to insert into.
Definition: Chunk.h:99
int _visitId
Identifier for the visit that currently owns the chunk.
Definition: Chunk.h:89
template<int MaxBlocksPerChunk>
bool lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::operator< ( ChunkDescriptor< MaxBlocksPerChunk > const &  cd) const
inline

Definition at line 123 of file Chunk.h.

123  {
124  return _visitId < cd._visitId || (_visitId == cd._visitId && _chunkId < cd._chunkId);
125  }
table::Key< table::Array< double > > cd
Definition: Wcs.cc:1043
int _chunkId
Identifier for the chunk.
Definition: Chunk.h:88
int _visitId
Identifier for the visit that currently owns the chunk.
Definition: Chunk.h:89
template<int MaxBlocksPerChunk>
void lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::setId ( int const  id)
inline

Definition at line 130 of file Chunk.h.

130 { _chunkId = id; }
int _chunkId
Identifier for the chunk.
Definition: Chunk.h:88
int id
Definition: CR.cc:151
template<int MaxBlocksPerChunk>
void lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::setNextInChain ( int const  id)
inline

Definition at line 131 of file Chunk.h.

131 { _nextChunk = id; }
int _nextChunk
Index of the next chunk in the same hash bucket as this one.
Definition: Chunk.h:90
int id
Definition: CR.cc:151

Member Data Documentation

template<int MaxBlocksPerChunk>
std::size_t lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_blocks[MaxBlocksPerChunk]

List of memory block offsets for allocated blocks.

Definition at line 108 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_chunkId

Identifier for the chunk.

Definition at line 88 of file Chunk.h.

template<int MaxBlocksPerChunk>
std::size_t lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_curBlockOffset

Offset of the current block.

Definition at line 103 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_delta

Index of first entry marked IN_DELTA.

Definition at line 102 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_index

Index of the next free entry in the current block.

Definition at line 100 of file Chunk.h.

template<int MaxBlocksPerChunk>
Fifo<MAX_VISITS_IN_FLIGHT> lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_interestedParties

FIFO of visits to a FOV that overlaps the chunk.

Definition at line 106 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_nextBlock

Index of the next block to insert into.

Definition at line 99 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_nextChunk

Index of the next chunk in the same hash bucket as this one.

Definition at line 90 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_numBlocks

Number of memory blocks allocated.

Definition at line 98 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_size

Total number of entries.

Definition at line 101 of file Chunk.h.

template<int MaxBlocksPerChunk>
bool lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_usable

Flag indicating whether the chunk is in a usable state. A chunk is usable once its data has been successfully and completely read from permanent storage.

Definition at line 96 of file Chunk.h.

template<int MaxBlocksPerChunk>
int lsst::ap::ChunkDescriptor< MaxBlocksPerChunk >::_visitId

Identifier for the visit that currently owns the chunk.

Definition at line 89 of file Chunk.h.


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