When and how is vxPublishKernels() necessary?

When and how is vxPublishKernels() necessary?

Hi there,

In two CV SDK samples, i.e. the face detection user nodes and video stabilization user nodes, the API function vxPublishKernels() is defined. Within that function, the user kernels are registered to the context via vxAddUserKernelvxAddParameterToKernel, and vxFinalizeKernel.

However, the main application in neither of the two samples explicitly calls vxPublishKernels() , meaning the user kernels are not registered before they are used. Yet the samples work fine.

I  experimented with my own user kernel/node too. My user kernel defines the API function vxPublishKernels(), very similar to the ones in the aforementioned samples. This is what I am observing: as long as I can correctly load the library that is built with my user kernel, via vxLoadKernels(context, my_user_kernel_lib), my code runs correctly regardless of whether vxPublishKernels() is called or not.

How is this so? Why does vxPublishKernels() seem unnecessary? When should it be used?

Thanks!

-Robby

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Robby, 

vxPublishKernels is used to allow users to add custom kernels to the known database in OpenVX at run-time. 

Hence, the reason you  do not see a direct call for it.

 

Regards,

Stav

Best Reply

Hi Stav,

Sorry for the late response. I was on vacation for a week.

This is what I understand now: The purpose of vxPublishKernels  is for the OpenVX framework to add a user's custom kernels at run-time. The function is not called by the user, but by the framework.

Thanks,

Robby

Hi Robby,

that is correct.

Hope you had a good vacation.

Regards,

Stav

Hi Stav, Thanks for the confirmation. And yes, I had a wonderful vacation ;-)

-Robby

Leave a Comment

Please sign in to add a comment. Not a member? Join today