Class AAHD_AngleSet
Defined in File aahd_angle_set.h
Inheritance Relationships
Base Type
public opensn::AngleSet(Class AngleSet)
Class Documentation
-
class AAHD_AngleSet : public opensn::AngleSet
AAHD angle set.
Fused all-at-once batch interface
Used only by SweepScheduler::ScheduleAlgoAAOFused.
A batch run sweeps every level of every member angle set in one uninterrupted sequence of launches on one stream. No per-level progress is kept between calls. See AAHDSweepChunk::SubmitBatchRun.
-
void SetFLUDSStream(crb::Stream &stream)
Direct this angle set’s FLUDS host-device copies to a stream.
- Parameters:
stream – Stream for the copies.
-
void PrepareForBatch(SweepChunk &sweep_chunk, crb::Stream &stream)
Prepare this angle set’s device buffers for a batch run.
This mirrors the first part of AngleSetAdvance. Call it once per sweep, before the run is submitted.
- Parameters:
sweep_chunk – Sweep chunk that runs the batch.
stream – Stream of the lane whose batch run this angle set joins.
-
std::size_t NumLevels() const
Return the number of levels in this angle set’s levelized local subgrid.
-
void FillBatchSlots(std::size_t num_levels, std::size_t slot_stride, gpu_kernel::AAHD_BatchSlot *slots) const
Write this angle set’s batch slot for each level of a batch run.
Levels at or beyond NumLevels() get an empty slot because every batch member runs through the same level range.
- Parameters:
num_levels – Number of levels in the batch run.
slot_stride – Distance between this angle set’s slots of consecutive levels.
slots – Slot array. The slot for level
levelis written toslots[level * slot_stride].
-
void SubmitCompletionCopies()
Enqueue this angle set’s post-sweep device-to-host copies without synchronizing.
The copies go on the angle set’s FLUDS stream, which is its run’s lane. The caller waits for that stream before FinishCompletion.
-
void FinishCompletion(SweepChunk &sweep_chunk)
Finish this angle set after its SubmitCompletionCopies copies have completed.
This decrements the followers’ dependency counters, sends the downstream angular fluxes, and copies the saved angular flux to its destination. It mirrors the second part of AngleSetAdvance.
- Parameters:
sweep_chunk – Sweep chunk that ran the batch.
Public Functions
-
inline crb::Stream &GetStream()
-
inline std::uint32_t *GetDeviceAngleIndices()
-
virtual void InitializeDelayedUpstreamData() override
Initializes delayed upstream data.
This method gets called when a sweep scheduler is constructed.
-
inline virtual int GetMaxBufferMessages() const override
Returns the maximum buffer size from the sweepbuffer.
-
inline virtual void SetMaxBufferMessages(int count) override
Sets the maximum buffer size for the sweepbuffer.
-
void PrepostReceives()
-
bool IsReady()
-
void WaitForDownstreamAndDelayed()
-
virtual AngleSetStatus AngleSetAdvance(SweepChunk &sweep_chunk, AngleSetStatus permission) override
This function advances the work stages of an angleset.
-
inline virtual AngleSetStatus FlushSendBuffers() override
-
inline virtual void ResetSweepBuffers() override
Resets the sweep buffer.
-
inline virtual bool ReceiveDelayedData() override
Instructs the sweep buffer to receive delayed data.
-
virtual void SyncDeviceAngleIndices() override
Update the angle index data on the device to match the host.
-
inline void AddBoundaryOffset(std::uint64_t offset)
-
void CopyBoundaryOffsetToDevice()
-
inline std::uint64_t *GetDeviceBoudnaryOffset()
Public Static Attributes
-
static std::mutex m
Protected Attributes
-
crb::Stream stream_ = crb::Stream::get_null_stream()
Associated CUDA stream.
-
AAHD_ASynchronousCommunicator async_comm_
Asynchronous communicator.
-
crb::DeviceMemory<std::uint32_t> device_angle_indices_
Angle indices on GPU.
-
crb::DeviceMemory<std::uint64_t> device_boundary_offsets_
Boundary offset on GPU.
-
void SetFLUDSStream(crb::Stream &stream)