lib/accy/src/kernel/library/random/threefry/geometry.zig
daab053ee43316e1809a84551d573ddd1e5bf3d2
1 const random = @import("../root.zig");
2
3 const base = random.base;
4 const block = random.block;
5
6 const geometry_mod = base.geometry_mod;
7 const threefry_lanes = block.threefry_lanes;
8 const ceilDiv = block.ceilDiv;
9 const random_thread_caps = base.random_thread_caps;
10
11 pub fn threefryThreadsForCount(count: u64) u32 {
12 return geometry_mod.threadsForExtent(ceilDiv(count, threefry_lanes), random_thread_caps);
13 }
14
15 pub fn threefryThreadCandidatesForCount(count: u64) geometry_mod.Thread1DCandidates {
16 return geometry_mod.threadCandidatesForExtent(ceilDiv(count, threefry_lanes), random_thread_caps);
17 }