FUTHARK-C(1)
π FUTHARK-C π
okay bestie, welcome to the futhark-c era of your life. this is the one from the Futhark manual set, and she compiles Futhark to sequential C. that's the whole gig. let's get into it π«Ά
β¨ NAME β¨
futhark-c β compile Futhark to sequential C π
β¨ SYNOPSIS β¨
futhark c [options...] <program.fut>
β¨ DESCRIPTION β¨
so futhark c takes your Futhark program and translates it into sequential C code, and then β pick your fighter β it either
- compiles that C code with a C compiler (see below for which one, bestie) into an executable binary program, or
- produces a
.hand.cfile that can be linked with other code.
The standard Futhark optimisation pipeline is used, andβ¦
and. that's it. the sentence just ends there. no cap, we love a cliffhanger π iconic behaviour honestly.
The resulting program will read the arguments to the entry point (main by default) from standard input, and print its return value on standard output. Both the reading and the printing happen in Futhark syntax, so stay in your lane and feed it Futhark. β¨
πΈ OPTIONS πΈ
-hβ print help text to standard output and exit. bye bestie π--entry-point NAMEβ treat this top-level function as an entry point. let her be the main character.--libraryβ generate a library instead of an executable. It appends.c/.hto the name indicated by the-ooption to determine the output file names.-o outfileβ where to write the result. If the source program is namedfoo.fut, this defaults tofoo.--safeβ ignoreunsafein the program and perform safety checks unconditionally. safety girl summer π--serverβ generate a server-mode executable that reads commands from stdin.-v verboseβ enable debugging output. If compilation fails due to a compiler error, the result of the last successful compiler step will be printed to standard error. so you will find out what went wrong.-Vβ print version information on standard output and exit.-Wβ do not print any warnings. living in denial, respectfully.--Werrorβ treat warnings as errors. the strict bestie. π₯
π¦ ENVIRONMENT VARIABLES π¦
CCβ the C compiler used to compile the program. Defaults toccif unset.CFLAGSβ space-separated list of options passed to the C compiler. Defaults to-O3 -std=c99if unset.
π EXECUTABLE OPTIONS π
The following options are accepted by executables generated by futhark c.
-h,--helpβ print help text to standard output and exit.-b,--binary-outputβ print the program result in the binary output format. The default is human-readable text, which is very slow. Not accepted by server-mode executables.--cache-file=FILEβ store any reusable initialisation data in this file, possibly speeding up subsequent launches. obsessed with a little pre-game. π-D,--debuggingβ perform possibly expensive internal correctness checks and verbose logging. Implies-L.-e,--entry-point=FUNβ the entry point to run. Defaults tomain. Not accepted by server-mode executables.-L,--logβ print various low-overhead logging information to stderr while running.-n,--no-print-resultβ do not print the program result. Not accepted by server-mode executables.-P,--profileβ gather profiling data during execution. Mostly interesting in--servermode. Implied by-D.--param=ASSIGNMENTβ set a tuning parameter to the given value.ASSIGNMENTmust be of the formNAME=INT. Use--print-paramsto see which names are available.--print-paramsβ print all tuning parameters that can be set with--paramor--tuning.-r,--runs=NUMβ performNUMruns of the program. With-t, the runtime for each individual run will be printed. Additionally, a single leading warmup run will be performed (not counted). Only the final run will have its result written to stdout. Not accepted by server-mode executables.-t,--write-runtime-to=FILEβ print the time taken to execute the program to the indicated file, an integral number of microseconds. Not accepted by server-mode executables.--tuning=FILEβ readsize=valueassignments from the given file.
quick vibe check: several of these are not accepted by server-mode executables β-b/--binary-output,-e,--entry-point=FUN,-n/--no-print-result,-r,--runs=NUM, and-t,--write-runtime-to=FILE. don't try it, she'll say no. π
π SEE ALSO π
futhark-openclfuthark-cudafuthark-test
and that's the whole page, bestie, you ate. periodt. π β¨
copyright moment, because we respect the elders: 2013-2020, DIKU, University of Copenhagen π«Ά
this gorgeous little manual page is from Futhark 0.25.32, dated Mar 11, 2026, and yes she's serving FUTHARK-C(1) realness till the very last line. mwah. πππ¦
π¦ 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