17 INLINE PipelineCyclerTrivialImpl::
26 #ifdef SIMPLE_STRUCT_POINTERS 27 nassertv(initial_data == (
CycleData *)
this);
30 #endif // SIMPLE_STRUCT_POINTERS 59 #ifdef SIMPLE_STRUCT_POINTERS 63 #endif // SIMPLE_STRUCT_POINTERS 73 #ifdef SIMPLE_STRUCT_POINTERS 77 #endif // SIMPLE_STRUCT_POINTERS 108 #ifdef SIMPLE_STRUCT_POINTERS 112 #endif // SIMPLE_STRUCT_POINTERS 137 #ifdef SIMPLE_STRUCT_POINTERS 141 #endif // SIMPLE_STRUCT_POINTERS 151 #ifdef SIMPLE_STRUCT_POINTERS 155 #endif // SIMPLE_STRUCT_POINTERS 165 #ifdef SIMPLE_STRUCT_POINTERS 169 #endif // SIMPLE_STRUCT_POINTERS 202 #ifdef SIMPLE_STRUCT_POINTERS 206 #endif // SIMPLE_STRUCT_POINTERS 216 #ifdef SIMPLE_STRUCT_POINTERS 220 #endif // SIMPLE_STRUCT_POINTERS 238 #ifdef SIMPLE_STRUCT_POINTERS 242 #endif // SIMPLE_STRUCT_POINTERS 253 #ifdef SIMPLE_STRUCT_POINTERS 257 #endif // SIMPLE_STRUCT_POINTERS 267 #ifdef SIMPLE_STRUCT_POINTERS 271 #endif // SIMPLE_STRUCT_POINTERS 281 #ifdef SIMPLE_STRUCT_POINTERS 285 #endif // SIMPLE_STRUCT_POINTERS 312 #ifdef SIMPLE_STRUCT_POINTERS 316 #endif // SIMPLE_STRUCT_POINTERS CycleData * write_stage(int pipeline_stage, Thread *current_thread)
Returns a pointer suitable for writing to the nth stage of the pipeline.
CycleData * write_upstream(bool force_to_0, Thread *current_thread)
This special variant on write() will automatically propagate changes back to upstream pipeline stages...
const CycleData * read_stage(int pipeline_stage, Thread *current_thread) const
Returns a const CycleData pointer, filled with the data for the indicated pipeline stage.
void increment_read(const CycleData *pointer) const
Increments the count on a pointer previously retrieved by read(); now the pointer will need to be rel...
A single page of data maintained by a PipelineCycler.
virtual TypeHandle get_parent_type() const
Returns the type of the container that owns the CycleData.
CycleData * elevate_read_stage(int pipeline_stage, const CycleData *pointer, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer.
CycleData * write(Thread *current_thread)
Returns a non-const CycleData pointer, filled with a unique copy of the data for the current stage of...
const CycleData * read_stage_unlocked(int pipeline_stage) const
Returns a const CycleData pointer, filled with the data for the indicated stage of the pipeline.
void increment_write(CycleData *pointer) const
Increments the count on a pointer previously retrieved by write(); now the pointer will need to be re...
void release_write_stage(int pipeline_stage, CycleData *pointer)
Releases a pointer previously obtained via a call to write_stage().
CycleData * write_stage_upstream(int pipeline_stage, bool force_to_0, Thread *current_thread)
Returns a pointer suitable for writing to the nth stage of the pipeline.
void release_read_stage(int pipeline_stage, const CycleData *pointer) const
Releases a pointer previously obtained via a call to read_stage().
TypeHandle get_parent_type() const
Returns the type of object that owns this cycler, as reported by CycleData::get_parent_type().
int get_read_count() const
Returns the number of handles currently outstanding to read the current stage of the data.
void acquire(Thread *current_thread=nullptr)
Grabs an overall lock on the cycler.
CycleData * elevate_read(const CycleData *pointer, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer.
This class manages a staged pipeline of data, for instance the render pipeline, so that each stage of...
void release()
Release the overall lock on the cycler that was grabbed via acquire().
void release_write(CycleData *pointer)
Releases a pointer previously obtained via a call to write().
CycleData * cheat() const
Returns a pointer without counting it.
A thread; that is, a lightweight process.
const CycleData * read(Thread *current_thread) const
Returns a const CycleData pointer, filled with the data for the current stage of the pipeline as seen...
int get_num_stages()
Returns the number of stages in the pipeline.
int get_write_count() const
Returns the number of handles currently outstanding to read the current stage of the data.
TypeHandle is the identifier used to differentiate C++ class types.
CycleData * elevate_read_stage_upstream(int pipeline_stage, const CycleData *pointer, bool force_to_0, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer.
void release_read(const CycleData *pointer) const
Releases a pointer previously obtained via a call to read().
CycleData * elevate_read_upstream(const CycleData *pointer, bool force_to_0, Thread *current_thread)
Elevates a currently-held read pointer into a write pointer, like elevate_read(), but also propagates...
const CycleData * read_unlocked(Thread *current_thread) const
Returns a const CycleData pointer, filled with the data for the current stage of the pipeline as seen...