FUTHARK-DATASET(1)
π FUTHARK-DATASET π
okay so bestie, welcome to futhark-dataset, part of the Futhark manual, section 1 π. literally the moment you've been waiting for.
β¨ NAME β¨
futhark-dataset β generate random data sets π²
πΈ SYNOPSIS πΈ
futhark dataset [options...]
π¦ DESCRIPTION π¦
so basically, this thing makes random values in Futhark syntax, and that is so useful when you need to whip up input datasets for testing your programs. iconic.
- all Futhark primitive types? supported, no cap π
- tuples? not supported π sorry bestie
- arrays of specific (non-random) sizes? yes, you can generate those π
- you can set maximum and minimum bounds on values β¨
- and you can set the random seed used when generating the data π
whatever it generates gets written straight to standard output π«Ά
okay and here's the other mode: if you pass no -g/--generate options, then values get read from standard input and printed to standard output in whatever format you indicated. the input format β textual or binary β is automatically detected. it just knows π
β οΈ and it returns a nonzero exit code if it fails to write the full output. so like, watch for that.
π OPTIONS π
-b,--binaryβ output data in binary Futhark format. must come before--generatebestie, order matters π«Ά-gtype,--generatetype β generate a value of the indicated type, e.g.-g i32or-g [10]f32. and plot twist: the type can also be an actual literal value, and then that literal value is what gets generated β-sint β set the seed used for the RNG. it's1by default π²--T-bounds=<min:max>β set inclusive lower and upper bounds on generated values of typeT.Tis any primitive type, e.g.i32orf32. and the way that these bounds apply to any following uses of the-goptionβ¦ π--textβ output data in text format (must precede--generate). this is the default β¨-t,--typeβ output the types of the values (textually) instead of the values themselves. mostly useful when you're reading values on stdin π
also, tiny lil heads up: you can alter the output format using the following flags β to use them, add them before data generation (--generate) π (yes that's --text, -t/--type, and -b/--binary up there, they're all in on the same bit)
π₯ EXAMPLES π₯
generate a 4 by 2 integer matrix:
futhark dataset -g [4][2]i32
generate an array of floating-point numbers and an array of indices into that array:
futhark dataset -g [10]f32 --i64-bounds=0:9 -g [100]i64
to generate binary data, the --binary must come before the --generate:
futhark dataset --binary --generate=[42]i32
create a binary data file from a data file:
futhark dataset --binary < any_data > binary_data
determine the types of values contained in a data file:
futhark dataset -t < any_data
π SEE ALSO π
futhark-test <#futhark-test-1>futhark-bench <#futhark-bench-1>
π Copyright π
2013-2020, DIKU, University of Copenhagen
aaaand that's the whole page bestie π version 0.25.32, dated Mar 11, 2026. go generate something cute β¨π§π
π¦ where this page comes from
- ubuntu resolute: futhark 0.25.32-3build1 Β· ISC
- ubuntu stonking: futhark 0.25.32-3build1 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms