VolkAddingNewKernels

= Adding New Volk Kernels =

TODO: Explain how to create/register new Volk kernels

Dealing with Volk Profile Puppets
If the Volk kernel does not 'fit' the the standard set of function parameters expected by the volk_profile structure, you need to create a Volk puppet function to help the profiler call the kernel.

This is essentially due to the function  which has the form:

bool run_volk_tests(struct volk_func_desc, void(*), std::string, float, lv_32fc_t, int, int, std::vector *, std::string); However the line in  expects to have the Volk kernel function to call, tolerance, a scalar, length, number of iterations and a results pointer.

The relevant macro is defined in :

So - for the puppet function, instead of using the  macro in , the   macro is used, which again is defined in  :
 * 1) define VOLK_PROFILE(func, tol, scalar, len, iter, results) run_volk_tests(func##_get_func_desc, (void (*))func##_manual, std::string(#func), tol, scalar, len, iter, results, &quot;NULL&quot;)

So the relevant parameters to the puppet function are tolerance, scalar, length, iterations, and result/output pointer.
 * 1) define VOLK_PUPPET_PROFILE(func, puppet_master_func, tol, scalar, len, iter, results) run_volk_tests(func##_get_func_desc, (void (*))func##_manual, std::string(#func), tol, scalar, len, iter, results, std::string(#puppet_master_func))