9prady9 · GitHub

@9prady9

@9prady9

9prady9 marked this pull request as ready for review

May 6, 2020 12:58

@9prady9

* Moved common code required by CUDA and OpenCL caching algorithm into
  kernel_cache.[hpp|cpp]
* Added common/compile_kernel.hpp header that defines the signature
  of the function, compileKernel, that each backend has to implement.
* Each backend has to implement/satisfy the following requirements:
  - Provide compile_kernel.cpp source with compileKernel function that is
    used by common::findKernel
  - Provide Kernel.hpp/cpp that implements KernelInterface from
    common/KernelInterface.hpp
  - Kernel.hpp also provides a functor than helps launch backend kernels.
* Moved kernel utility helpers into separate header(s)/source:
  - TemplateArg.hpp/cpp contains the TemplateArg struct and some helper macros
    to convert template arguments to strings.
  - TemplateTypename.hpp contains the templated TemplateTypename struct that
    helps to convert backend kernel paramters to TemplateArg object.
* Refactored all CUDA kernels to use the new caching API
* Refactored only transpose, morph and canny to use new caching API from OpenCL
* Reduced lot of unnecessary instantiations for morphological functions

@9prady9

@9prady9

@9prady9

@9prady9

@9prady9

9prady9 deleted the ocl_kernel_cache_improv branch

May 12, 2020 17:21

Merged

2 tasks

Read the original on github.com ↗