Update language reference.
Add a glossary and explain the overall shape of a Cretonne function.
This commit is contained in:
8
cranelift/docs/example.c
Normal file
8
cranelift/docs/example.c
Normal file
@@ -0,0 +1,8 @@
|
||||
float
|
||||
average(const float *array, size_t count)
|
||||
{
|
||||
double sum = 0;
|
||||
for (size_t i = 0; i < count; i++)
|
||||
sum += array[i];
|
||||
return sum / count;
|
||||
}
|
||||
Reference in New Issue
Block a user