MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / launch_dimensions

Method launch_dimensions

examples/cuda/cpu/path_tracer/src/cuda/mod.rs:107–111  ·  view source on GitHub ↗

calculate an optimal launch configuration for an image kernel

(&self)

Source from the content-addressed store, hash-verified

105
106 /// calculate an optimal launch configuration for an image kernel
107 fn launch_dimensions(&self) -> (GridSize, BlockSize) {
108 let threads = Vec2::broadcast(THREAD_BLOCK_AXIS_LENGTH);
109 let blocks = (self.buffers.viewport.bounds / threads) + 1;
110 (blocks.into(), threads.into())
111 }
112
113 /// Run postprocessing on the accumulated buffer, color correct it, and divide it by the total
114 /// samples to yield a final image that can be displayed.

Callers 2

final_imageMethod · 0.80
renderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected