lib/accy/src/kernel/library/random/philox/names.zig
daab053ee43316e1809a84551d573ddd1e5bf3d2
1 const random = @import("../root.zig");
2 const types = @import("types.zig");
3
4 const std = random.base.std;
5 const Philox = types.Philox;
6
7 pub fn philoxInstanceTarget(allocator: std.mem.Allocator, instance: Philox) ![]u8 {
8 return std.fmt.allocPrint(
9 allocator,
10 "accy.kernel.random.philox{d}_{d}r_{d}_{s}",
11 .{ instance.count, instance.rounds, instance.threads, instance.dtype.name() },
12 );
13 }
14
15 pub fn philoxInstanceEntryName(allocator: std.mem.Allocator, instance: Philox) ![]u8 {
16 return std.fmt.allocPrint(
17 allocator,
18 "accy_kernel_random_philox{d}_{d}r_{d}_{s}",
19 .{ instance.count, instance.rounds, instance.threads, instance.dtype.name() },
20 );
21 }
22
23 pub fn philoxFamilyTarget(allocator: std.mem.Allocator, instance: Philox) ![]u8 {
24 return std.fmt.allocPrint(
25 allocator,
26 "accy.kernel.random.philox_family_{d}r_{d}_{s}",
27 .{ instance.rounds, instance.threads, instance.dtype.name() },
28 );
29 }
30
31 pub fn philoxFamilyEntryName(allocator: std.mem.Allocator, instance: Philox) ![]u8 {
32 return std.fmt.allocPrint(
33 allocator,
34 "accy_kernel_random_philox_family_{d}r_{d}_{s}",
35 .{ instance.rounds, instance.threads, instance.dtype.name() },
36 );
37 }