-
Notifications
You must be signed in to change notification settings - Fork 0
/
README_HalideCodegen
28 lines (20 loc) · 1.1 KB
/
README_HalideCodegen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Intro to Halide codegeneration pattern (based on Halide documentation)
===========================================================================
functionName:
============
Functions generated by Halide are regular functions with a user chosen name and arguments.
These functions are considered to be the public methods called by external programs.
The body checks the correctness of its arguments, then calls the function
that contains the actual computation. This function is called "__functionName".
__functionName:
=============
Actual function as defined by the Halide programmer.
These are considered to be private functions, called through the above public function.
functionName_argv:
=================
If the function is externally visible, Halide also creates an argv wrapper.
This is useful for calling from JIT and other machine interfaces.
The wrapper calls the function with an array of pointer arguments.
This is easier for the JIT to call than a function with an unknown
(at compile time) argument list.
E.g. The unit tests "simd_ops" contain functions called "unopt_test_op" and "unopt_scalar_test_op"