Skip to content

Commit

Permalink
Merge pull request #7 from sunsided/feature/openvx-extensions
Browse files Browse the repository at this point in the history
Add extension headers
  • Loading branch information
sunsided authored May 11, 2024
2 parents 5867c25 + 7e48119 commit cbd840f
Show file tree
Hide file tree
Showing 7 changed files with 1,434 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y libclang-dev libopencv-dev ocl-icd-opencl-dev intel-opencl-icd
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "16.0"

- name: Build libraries and sample
run: cargo build

Expand Down
9 changes: 8 additions & 1 deletion openvx-sys/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# openvx-sys

To get the latest OpenVX API headers, go to [github.com/KhronosGroup/OpenVX-Registry](https://github.com/KhronosGroup/OpenVX-Registry).
![](https://img.shields.io/badge/OpenVX-1.3.1-blue)

This crate is built against LLVM/Clang 16.

## OpenVX Headers

Headers are vendored with this crate's repo. To get the latest OpenVX API headers, visit
[github.com/KhronosGroup/OpenVX-Registry](https://github.com/KhronosGroup/OpenVX-Registry).
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ enum vx_bidirectional_enum_e
* \param [in,out] accum The accumulation image in <tt>\ref VX_DF_IMAGE_S16</tt>.
* \ingroup group_vision_function_accumulate
* \return <tt>\ref vx_node</tt>.
* \retval vx_node A node reference. Any possible errors preventing a successful creation should be checked using <tt>\ref vxGetStatus</tt>
* \retval vx_node A node reference. Any possible errors preventing a successful creation should be checked using <tt>\ref vxGetStatus</tt>
*/
VX_API_ENTRY vx_node VX_API_CALL vxAccumulateImageNode(vx_graph graph, vx_image input, vx_image accum);

Expand All @@ -60,7 +60,7 @@ VX_API_ENTRY vx_node VX_API_CALL vxAccumulateImageNode(vx_graph graph, vx_image
* \param [in,out] accum The <tt>\ref VX_DF_IMAGE_U8</tt> accumulation image.
* \ingroup group_vision_function_accumulate_weighted
* \return <tt>\ref vx_node</tt>.
* \retval vx_node A node reference. Any possible errors preventing a successful creation should be checked using <tt>\ref vxGetStatus</tt>
* \retval vx_node A node reference. Any possible errors preventing a successful creation should be checked using <tt>\ref vxGetStatus</tt>
*/
VX_API_ENTRY vx_node VX_API_CALL vxAccumulateWeightedImageNodeX(vx_graph graph, vx_image input, vx_float32 alpha, vx_image accum);

Expand All @@ -71,7 +71,7 @@ VX_API_ENTRY vx_node VX_API_CALL vxAccumulateWeightedImageNodeX(vx_graph graph,
* \param [in,out] accum The accumulation image in <tt>\ref VX_DF_IMAGE_S16</tt>.
* \ingroup group_vision_function_accumulate_square
* \return <tt>\ref vx_node</tt>.
* \retval vx_node A node reference. Any possible errors preventing a successful creation should be checked using <tt>\ref vxGetStatus</tt>
* \retval vx_node A node reference. Any possible errors preventing a successful creation should be checked using <tt>\ref vxGetStatus</tt>
*/
VX_API_ENTRY vx_node VX_API_CALL vxAccumulateSquareImageNodeX(vx_graph graph, vx_image input, vx_uint32 shift, vx_image accum);
#endif
Expand Down
2 changes: 1 addition & 1 deletion openvx-sys/include/1.3.1/extensions/VX/vx_khr_pipelining.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ typedef struct _vx_event {
VX_API_ENTRY vx_status VX_API_CALL vxWaitEvent(vx_context context, vx_event_t *event, vx_bool do_not_block);

/*! \brief Enable event generation
*
*
* Depending on the implementation, events may be either enabled or disabled by default.
*
* \param context [in] OpenVX context
Expand Down
1 change: 0 additions & 1 deletion openvx-sys/include/1.3.1/extensions/VX/vx_khr_swap_move.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/


#ifndef _OPENVX_SWAP_MOVE_H_
#define _OPENVX_SWAP_MOVE_H_

Expand Down
1,403 changes: 1,403 additions & 0 deletions openvx-sys/src/lib.rs

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions openvx-sys/wrapper.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#include "include/1.3.1/standard/VX/vx.h"
#include "include/1.3.1/standard/VX/vx_compatibility.h"
#include "include/1.3.1/standard/VX/vxu.h"

#include "include/1.3.1/extensions/VX/vx_import.h"
// #include "include/1.3.1/extensions/VX/vx_khr_bidirectional_parameters.h"
#include "include/1.3.1/extensions/VX/vx_khr_buffer_aliasing.h"
#include "include/1.3.1/extensions/VX/vx_khr_class.h"
#include "include/1.3.1/extensions/VX/vx_khr_icd.h"
#include "include/1.3.1/extensions/VX/vx_khr_import_kernel.h"
#include "include/1.3.1/extensions/VX/vx_khr_opencl_interop.h"
#include "include/1.3.1/extensions/VX/vx_khr_pipelining.h"
#include "include/1.3.1/extensions/VX/vx_khr_raw_image.h"
#include "include/1.3.1/extensions/VX/vx_khr_swap_move.h"
#include "include/1.3.1/extensions/VX/vx_khr_tiling.h"
#include "include/1.3.1/extensions/VX/vx_khr_user_data_object.h"
// #include "include/1.3.1/extensions/VX/vx_khr_xml.h"

0 comments on commit cbd840f

Please sign in to comment.