cucapra / diospyros

Search-based compiler for high-performance DSP programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emit include header file to allow #include of kernel into codebase

agent-lee opened this issue · comments

For generated kernels, accompanying include header file for import is needed to allow it to get compiled into larger code bases. Quick fix might be to just emit a kernel.h and preprocessor.h file for now with just the signature definitions which can be picked up by a build system.

Good point! Just so I'm clear, what are you suggesting would be emitted in preprocessor.h? The C spec header?

Yep. Just the specification function header. Basically I need to cobble together a header file like this to import for other builds. Right now I insert the namespace encapsulation into my wrapper script so I can just dump the preprocessor.h and kernel.h definitions without namespace in the right order here.

namespace diospyros {

void MatMult3x3x3x3(float a_in[3 * 3], float b_in[3 * 3], float c_out[3 * 3]);

namespace specification {
void MatMult3x3x3x3(float a_in[3 * 3], float b_in[3 * 3], float c_out[3 * 3]);
}

} // namespace diospyros