Commit 52d25baceb0530e5d43a7bc8b4ecba9a4ad5eaf5

Authored by DepthDeluxe
1 parent db40bba0

added README.md for the CUDA plugins folder

Showing 1 changed file with 23 additions and 0 deletions
openbr/plugins/cuda/README.md 0 → 100644
  1 +# CUDA Plugins
  2 +This folder contains CUDA-accelerated OpenBR plugins. They are structured in the following format.
  3 +
  4 +## File Structure
  5 +We will use a plugin called `CUDAPlugin` as an example.
  6 +
  7 +Each plugin has 3 files associated with it: a CUDA file, CPP file, and HPP header file.
  8 +```
  9 +cudaplugin.cu
  10 +cudaplugin.cpp
  11 +cudaplugin.hpp
  12 +```
  13 +The `.cu` file contains CUDA kernel functions and the corresponding wrapper functions
  14 +that directly call the kernel functions. The `.cpp` files contain the OpenBR
  15 +standard plugin declaration. Functions in this file call the wrappers. The `.hpp`
  16 +contains header declarations for the CUDA wrapper functions so the `.cpp` file
  17 +knows how to call them.
  18 +
  19 +# CUDA Files
  20 +All functions for a particular CUDA plugin are defined in a namespace of that
  21 +plugin's name which is defined within `br::cuda` namespace. For example, if
  22 +we have a plugin called CUDAPlugin, both wrapper and kernel functions should
  23 +be globally defined within `br::cuda::cudaplugin`.