4 ms·
> the kernel needs to be compiled at run time Are there examples of other programs that require this?
by platz 11y ago
> the kernel needs to be compiled at run time
Are there examples of other programs that require this?
- runarb 11y agoI believe the Varnish cache server generates C code from its config rules and compile a new kernel based in it. This all rules are optimized binary code that work directly on the data stream instead if having a runtime that applies the rules.
- codezero 11y agoMany template engines do this.
- Gladdyu 11y agoAny OpenCL/CUDA program for GPGPU would require this. Different GPUs may have different characteristics (core count, available instructions, memory sizes and speeds), that need to be taken into account and can be optimized for. This can only be done when you know the run-time target device, which is only at run-time. This is the reason why for GPGPU programs, you often supply the kernel/shader as C code or another intermediate representation (vendor-specific assembly), and the final compilation step is done by the GPU driver.