diff --git a/framework/include/vx_array.h b/framework/include/vx_array.h index 1fea1652..1ff9ab6e 100644 --- a/framework/include/vx_array.h +++ b/framework/include/vx_array.h @@ -31,6 +31,8 @@ /*! \brief The internal representation of a \ref vx_array * \ingroup group_int_array */ +namespace corevx { + class Array : public Reference { public: @@ -296,4 +298,7 @@ class Array : public Reference vx_uint32 offset; }; +} // namespace corevx + + #endif /* VX_ARRAY_H */ diff --git a/framework/include/vx_context.h b/framework/include/vx_context.h index 9c9b8daf..8846516c 100644 --- a/framework/include/vx_context.h +++ b/framework/include/vx_context.h @@ -38,6 +38,8 @@ extern const vx_char implementation[]; /*! \brief The top level context data for the entire OpenVX instance * \ingroup group_int_context */ +namespace corevx { + class Context : public Reference { public: @@ -505,4 +507,7 @@ class Context : public Reference const vx_char* extension; }; +} // namespace corevx + + #endif /* VX_CONTEXT_H */ diff --git a/framework/include/vx_convolution.h b/framework/include/vx_convolution.h index 63ba5770..71f260b2 100644 --- a/framework/include/vx_convolution.h +++ b/framework/include/vx_convolution.h @@ -32,6 +32,8 @@ /*! \brief A convolution is a special type of matrix (MxM) * \ingroup group_int_convolution */ +namespace corevx { + class Convolution : public Matrix { public: @@ -114,4 +116,7 @@ class Convolution : public Matrix vx_uint32 scale; }; +} // namespace corevx + + #endif /* VX_CONVOLUTION_H */ diff --git a/framework/include/vx_delay.h b/framework/include/vx_delay.h index 0a7281d5..a3901001 100644 --- a/framework/include/vx_delay.h +++ b/framework/include/vx_delay.h @@ -26,6 +26,8 @@ /*! \brief The internal representation of any delay object. * \ingroup group_int_delay */ +namespace corevx { + class Delay : public Reference { public: @@ -138,4 +140,6 @@ class Delay : public Reference vx_delay* pyr; }; +} // namespace corevx + #endif /* VX_DELAY_H */ \ No newline at end of file diff --git a/framework/include/vx_distribution.h b/framework/include/vx_distribution.h index 0221e955..bc8b2e1e 100644 --- a/framework/include/vx_distribution.h +++ b/framework/include/vx_distribution.h @@ -31,6 +31,8 @@ /*! \brief A Distribution. * \ingroup group_int_distribution */ +namespace corevx { + class Distribution : public Reference { public: @@ -167,4 +169,7 @@ class Distribution : public Reference vx_int32 offset_y; }; +} // namespace corevx + + #endif /* VX_DISTRIBUTION_H */ diff --git a/framework/include/vx_error.h b/framework/include/vx_error.h index a3ce5ca3..c03e1cd2 100644 --- a/framework/include/vx_error.h +++ b/framework/include/vx_error.h @@ -30,6 +30,8 @@ /*! \brief The internal representation of the error object. * \ingroup group_int_error */ +namespace corevx { + class Error : public Reference { public: @@ -85,6 +87,9 @@ class Error : public Reference vx_status status; }; +} // namespace corevx + + /*! \brief Matches the status code against all known error objects in the * context. * \param [in] context The pointer to the overall context. diff --git a/framework/include/vx_event_queue.hpp b/framework/include/vx_event_queue.hpp index 8d3b1637..a12595b7 100644 --- a/framework/include/vx_event_queue.hpp +++ b/framework/include/vx_event_queue.hpp @@ -23,6 +23,8 @@ * @brief Internal Event Queue Object * */ +namespace corevx { + class EventQueue { // Registration structure that stores additional event parameters for a vx_reference. @@ -256,3 +258,6 @@ private : bool enabled_; return std::chrono::duration_cast(now.time_since_epoch()).count(); } }; + +} // namespace corevx + diff --git a/framework/include/vx_graph.h b/framework/include/vx_graph.h index 74a1b775..760aafb8 100644 --- a/framework/include/vx_graph.h +++ b/framework/include/vx_graph.h @@ -34,6 +34,8 @@ /*! \brief The internal representation of a graph. * \ingroup group_int_graph */ +namespace corevx { + class Graph : public Reference { private: @@ -406,4 +408,7 @@ class Graph : public Reference vx_graph_schedule_mode_type_e scheduleMode; }; +} // namespace corevx + + #endif /* VX_GRAPH_H */ diff --git a/framework/include/vx_image.h b/framework/include/vx_image.h index 9c9ce284..6bf6732e 100644 --- a/framework/include/vx_image.h +++ b/framework/include/vx_image.h @@ -31,6 +31,8 @@ /*! \brief The internal representation of a \ref vx_image * \ingroup group_int_image */ +namespace corevx { + class Image : public Reference { public: @@ -417,4 +419,7 @@ class Image : public Reference #endif }; +} // namespace corevx + + #endif /* VX_IMAGE_H */ diff --git a/framework/include/vx_import.h b/framework/include/vx_import.h index ded8f727..993f8ae2 100644 --- a/framework/include/vx_import.h +++ b/framework/include/vx_import.h @@ -32,6 +32,8 @@ /*! \brief The internal representation of a \ref vx_import * \ingroup group_int_import */ +namespace corevx { + class Import : public Reference { public: @@ -132,4 +134,7 @@ class Import : public Reference vx_reference* refs; }; +} // namespace corevx + + #endif /* VX_IMPORT_H */ diff --git a/framework/include/vx_internal.h b/framework/include/vx_internal.h index 928199c9..554159f9 100644 --- a/framework/include/vx_internal.h +++ b/framework/include/vx_internal.h @@ -199,7 +199,8 @@ /*! \brief Used to determine is a type is an image. * \ingroup group_int_macros */ -#define VX_TYPE_IS_IMAGE(type) (Image::isSupportedFourcc(type) == vx_true_e) +// Ensure namespaced Image is referenced +#define VX_TYPE_IS_IMAGE(type) (corevx::Image::isSupportedFourcc(type) == vx_true_e) /*! \brief Used to determine if a type is a scalar. * \ingroup group_int_macros @@ -426,10 +427,9 @@ typedef struct vx_processor_t { // forward declarations struct vx_threadpool_t; struct vx_threadpool_worker_t; -class Target; -using vx_target = Target*; -class Error; -using vx_error = Error*; +namespace corevx { class Target; class Error; } +using vx_target = corevx::Target*; +using vx_error = corevx::Error*; /*! \brief The function pointer to the worker function. * \param [in] worker The per-thread worker data structure. diff --git a/framework/include/vx_kernel.h b/framework/include/vx_kernel.h index 5d601e5f..15e712a9 100644 --- a/framework/include/vx_kernel.h +++ b/framework/include/vx_kernel.h @@ -35,6 +35,8 @@ /*! \brief The internal representation of an abstract kernel. * \ingroup group_int_kernel */ +namespace corevx { + class Kernel : public Reference { public: @@ -458,4 +460,7 @@ class Kernel : public Reference vx_uint32 pipeUpCounter; }; +} // namespace corevx + + #endif /* VX_KERNEL_H */ diff --git a/framework/include/vx_log.h b/framework/include/vx_log.h index aee43171..5bc61ae1 100644 --- a/framework/include/vx_log.h +++ b/framework/include/vx_log.h @@ -31,6 +31,8 @@ * @brief Logger utility class that wraps spdlog functionality * @ingroup group_int_log */ +namespace corevx { + class Logger { public: @@ -61,4 +63,7 @@ class Logger static void addLogEntry(vx_reference ref, vx_status status, const char *message, va_list ap); }; +} // namespace corevx + + #endif /* VX_LOG_H */ diff --git a/framework/include/vx_lut.h b/framework/include/vx_lut.h index 4d74070b..7475a51b 100644 --- a/framework/include/vx_lut.h +++ b/framework/include/vx_lut.h @@ -27,5 +27,8 @@ * \ingroup group_internal * \brief The Internal LUT API. */ +namespace corevx { + +} // namespace corevx #endif /* VX_LUT_H */ diff --git a/framework/include/vx_matrix.h b/framework/include/vx_matrix.h index 4bc1d39e..81c24612 100644 --- a/framework/include/vx_matrix.h +++ b/framework/include/vx_matrix.h @@ -30,6 +30,8 @@ /*! \brief The internal matrix structure. * \ingroup group_int_matrix */ +namespace corevx { + class Matrix : public Reference { public: @@ -146,4 +148,7 @@ class Matrix : public Reference vx_enum pattern; }; +} // namespace corevx + + #endif /* VX_MATRIX_H */ diff --git a/framework/include/vx_memory.h b/framework/include/vx_memory.h index 36d1be2e..df420ba7 100644 --- a/framework/include/vx_memory.h +++ b/framework/include/vx_memory.h @@ -29,6 +29,8 @@ /*! \brief The internal representation of a \ref vx_memory_t * \ingroup group_int_memory */ +namespace corevx { + class Memory { public: @@ -78,4 +80,7 @@ class Memory vx_uint32 p); }; +} // namespace corevx + + #endif /* VX_MEMORY_H */ diff --git a/framework/include/vx_meta_format.h b/framework/include/vx_meta_format.h index 96d5ce5d..2cc3e36f 100644 --- a/framework/include/vx_meta_format.h +++ b/framework/include/vx_meta_format.h @@ -35,6 +35,8 @@ * framework to automatically create the data object, if needed. * \ingroup group_int_meta_format */ +namespace corevx { + class MetaFormat : public Reference { public: @@ -246,6 +248,9 @@ class MetaFormat : public Reference vx_kernel_image_valid_rectangle_f set_valid_rectangle_callback; }; +} // namespace corevx + + /*! \brief Creates a metaformat object. * \param [in] context The overall context object. * \ingroup group_int_meta_format diff --git a/framework/include/vx_node.h b/framework/include/vx_node.h index 45caeb2e..dece9df8 100644 --- a/framework/include/vx_node.h +++ b/framework/include/vx_node.h @@ -55,6 +55,8 @@ vx_graph vxGetChildGraphOfNode(vx_node node); /*! \brief The internal representation of a node. * \ingroup group_int_node */ +namespace corevx { + class Node : public Reference { public: @@ -296,4 +298,7 @@ class Node : public Reference vx_node_state_e state; }; +} // namespace corevx + + #endif /* VX_NODE_H */ diff --git a/framework/include/vx_object_array.h b/framework/include/vx_object_array.h index 3d217d27..94bb660f 100644 --- a/framework/include/vx_object_array.h +++ b/framework/include/vx_object_array.h @@ -31,6 +31,8 @@ /*! \brief The internal representation of a \ref vx_object_array * \ingroup group_int_object_array */ +namespace corevx { + class ObjectArray : public Reference { public: @@ -140,4 +142,7 @@ class ObjectArray : public Reference vx_enum item_type; }; +} // namespace corevx + + #endif /* VX_OBJECT_ARRAY_H */ diff --git a/framework/include/vx_osal.h b/framework/include/vx_osal.h index e4ff0034..eb4216f5 100644 --- a/framework/include/vx_osal.h +++ b/framework/include/vx_osal.h @@ -28,6 +28,7 @@ * \ingroup group_internal * \brief The Internal Operating System Abstraction Layer API. */ +namespace corevx { /** * @brief OS Abstraction Layer Utility Class @@ -313,4 +314,6 @@ class Osal static vx_symbol_t getSymbol(vx_module_handle_t mod, const vx_char * name); }; +} // namespace corevx + #endif /* VX_OSAL_H */ diff --git a/framework/include/vx_parameter.h b/framework/include/vx_parameter.h index 3d5c87dc..2612fabd 100644 --- a/framework/include/vx_parameter.h +++ b/framework/include/vx_parameter.h @@ -30,6 +30,8 @@ /*! \brief The internal representation of a parameter. * \ingroup group_int_parameter */ +namespace corevx { + class Parameter : public Reference { public: @@ -171,4 +173,7 @@ class Parameter : public Reference vx_kernel kernel; }; +} // namespace corevx + + #endif /* VX_PARAMETER_H */ diff --git a/framework/include/vx_pyramid.h b/framework/include/vx_pyramid.h index debd167d..effbe0df 100644 --- a/framework/include/vx_pyramid.h +++ b/framework/include/vx_pyramid.h @@ -31,6 +31,8 @@ /*! \brief A pyramid object. Contains a set of scaled images. * \ingroup group_int_pyramid */ +namespace corevx { + class Pyramid : public Reference { public: @@ -147,4 +149,7 @@ class Pyramid : public Reference vx_df_image format; }; +} // namespace corevx + + #endif /* VX_PYRAMID_H */ diff --git a/framework/include/vx_reference.h b/framework/include/vx_reference.h index cbda82ad..74f30f69 100644 --- a/framework/include/vx_reference.h +++ b/framework/include/vx_reference.h @@ -35,6 +35,8 @@ * to allow casting to this type. * \ingroup group_int_reference */ +namespace corevx { + class Reference { public: /** @@ -215,4 +217,7 @@ class Reference { vx_char name[VX_MAX_REFERENCE_NAME]; }; +} // namespace corevx + + #endif /* VX_REFERENCE_H */ diff --git a/framework/include/vx_remap.h b/framework/include/vx_remap.h index 5ff3ce28..6d530200 100644 --- a/framework/include/vx_remap.h +++ b/framework/include/vx_remap.h @@ -30,6 +30,8 @@ /*! \brief A remap is a 2D image of float32 pairs. * \ingroup group_int_remap */ +namespace corevx { + class Remap : public Reference { public: @@ -193,4 +195,7 @@ class Remap : public Reference vx_uint32 dst_height; }; +} // namespace corevx + + #endif /* VX_REMAP_H */ diff --git a/framework/include/vx_scalar.h b/framework/include/vx_scalar.h index f04114c1..5ff3f99a 100644 --- a/framework/include/vx_scalar.h +++ b/framework/include/vx_scalar.h @@ -30,6 +30,8 @@ /*! \brief The internal representation of a scalar value. * \ingroup group_int_scalar */ +namespace corevx { + class Scalar : public Reference { public: @@ -185,4 +187,7 @@ class Scalar : public Reference vx_size data_len; }; +} // namespace corevx + + #endif /* VX_SCALAR_H */ diff --git a/framework/include/vx_target.h b/framework/include/vx_target.h index 8db3866c..aa23d940 100644 --- a/framework/include/vx_target.h +++ b/framework/include/vx_target.h @@ -30,6 +30,8 @@ /*! \brief The internal representation of a target. * \ingroup group_int_target */ +namespace corevx { + class Target : public Reference { public: @@ -119,4 +121,7 @@ class Target : public Reference void *reserved; }; +} // namespace corevx + + #endif /* VX_TARGET_H */ diff --git a/framework/include/vx_tensor.h b/framework/include/vx_tensor.h index 0863d128..8f754cd7 100644 --- a/framework/include/vx_tensor.h +++ b/framework/include/vx_tensor.h @@ -30,6 +30,8 @@ /*! \brief The internal representation of a tensor. * \ingroup group_int_tensor */ +namespace corevx { + class Tensor : public Reference { public: @@ -221,4 +223,7 @@ class Tensor : public Reference vx_image subimages[VX_INT_MAX_REF]; }; +} // namespace corevx + + #endif diff --git a/framework/include/vx_threshold.h b/framework/include/vx_threshold.h index 5b3701a1..e0ccfd42 100644 --- a/framework/include/vx_threshold.h +++ b/framework/include/vx_threshold.h @@ -35,6 +35,8 @@ void ownReleaseThresholdInt(vx_threshold* threshold); /*! \brief The internal threshold structure. * \ingroup group_int_threshold */ +namespace corevx { + class Threshold : public Reference { public: @@ -327,4 +329,7 @@ class Threshold : public Reference vx_df_image output_format; }; +} // namespace corevx + + #endif /* VX_THRESHOLD_H */ diff --git a/framework/include/vx_type_pairs.h b/framework/include/vx_type_pairs.h index 9cd8151d..0c78c4c9 100644 --- a/framework/include/vx_type_pairs.h +++ b/framework/include/vx_type_pairs.h @@ -28,6 +28,7 @@ * \ingroup group_internal * \brief The Internal Type Pairs Helper API. */ +namespace corevx { /*! \brief The enum string structure * \ingroup group_int_type_pairs @@ -117,5 +118,6 @@ class TypePairs static vx_size metaSizeOfType(vx_enum type); #endif /* defined (OPENVX_USE_XML) */ }; +} // namespace corevx #endif /* VX_TYPE_PAIRS_H */ diff --git a/framework/include/vx_user_data_object.h b/framework/include/vx_user_data_object.h index d11ef68d..e4671636 100644 --- a/framework/include/vx_user_data_object.h +++ b/framework/include/vx_user_data_object.h @@ -25,6 +25,8 @@ /*! \brief user data object descriptor as placed in shared memory * \ingroup group_int_user_data_object */ +namespace corevx { + class UserDataObject : public Reference { public: @@ -114,4 +116,7 @@ class UserDataObject : public Reference vx_char type_name[VX_MAX_REFERENCE_NAME]; }; +} // namespace corevx + + #endif /* VX_USER_DATA_OBJECT_H */ \ No newline at end of file diff --git a/framework/src/vx_array.cpp b/framework/src/vx_array.cpp index 9327e72a..4665ff56 100644 --- a/framework/src/vx_array.cpp +++ b/framework/src/vx_array.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_log.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_context.cpp b/framework/src/vx_context.cpp index ef800690..e688357c 100644 --- a/framework/src/vx_context.cpp +++ b/framework/src/vx_context.cpp @@ -20,6 +20,8 @@ #include "vx_internal.h" #include "vx_context.h" +using namespace corevx; + vx_char targetModules[][VX_MAX_TARGET_NAME] = { #if defined(EXPERIMENTAL_USE_OPENCL) "openvx-opencl", diff --git a/framework/src/vx_convolution.cpp b/framework/src/vx_convolution.cpp index 27c081d8..2e17d058 100644 --- a/framework/src/vx_convolution.cpp +++ b/framework/src/vx_convolution.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_convolution.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_delay.cpp b/framework/src/vx_delay.cpp index 9ac6f0d4..5af6ee96 100644 --- a/framework/src/vx_delay.cpp +++ b/framework/src/vx_delay.cpp @@ -17,6 +17,7 @@ #include "vx_internal.h" #include "vx_delay.h" +using namespace corevx; #define vxIsValidDelay(d) ((d) && Reference::isValidReference((vx_reference)(d), VX_TYPE_DELAY)) #define vxIsValidGraph(g) ((g) && Reference::isValidReference((vx_reference)(g), VX_TYPE_GRAPH)) diff --git a/framework/src/vx_distribution.cpp b/framework/src/vx_distribution.cpp index d3f22471..4d5fb90c 100644 --- a/framework/src/vx_distribution.cpp +++ b/framework/src/vx_distribution.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_distribution.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_dot.cpp b/framework/src/vx_dot.cpp index c95dd28d..f15c1b55 100644 --- a/framework/src/vx_dot.cpp +++ b/framework/src/vx_dot.cpp @@ -22,6 +22,8 @@ #include "vx_internal.h" #include "vx_type_pairs.h" +using namespace corevx; + #if defined(EXPERIMENTAL_USE_DOT) VX_API_ENTRY vx_status VX_API_CALL vxExportGraphToDot(vx_graph graph, vx_char dotfile[], vx_bool showData) { diff --git a/framework/src/vx_error.cpp b/framework/src/vx_error.cpp index 64451767..44a6467e 100644 --- a/framework/src/vx_error.cpp +++ b/framework/src/vx_error.cpp @@ -16,6 +16,7 @@ #include "vx_internal.h" #include "vx_error.h" +using namespace corevx; /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_event_queue.cpp b/framework/src/vx_event_queue.cpp index 2876b9eb..174e6e89 100755 --- a/framework/src/vx_event_queue.cpp +++ b/framework/src/vx_event_queue.cpp @@ -19,6 +19,8 @@ #include "vx_internal.h" +using namespace corevx; + #ifdef OPENVX_USE_PIPELINING VX_API_ENTRY vx_status VX_API_CALL vxEnableEvents(vx_context context) diff --git a/framework/src/vx_graph.cpp b/framework/src/vx_graph.cpp index ab860e40..53b9faa0 100644 --- a/framework/src/vx_graph.cpp +++ b/framework/src/vx_graph.cpp @@ -20,6 +20,8 @@ #include "vx_internal.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL FUNCTIONS */ /******************************************************************************/ diff --git a/framework/src/vx_graph_pipeline.cpp b/framework/src/vx_graph_pipeline.cpp index 903943be..1ca9d6c3 100644 --- a/framework/src/vx_graph_pipeline.cpp +++ b/framework/src/vx_graph_pipeline.cpp @@ -21,6 +21,8 @@ #include "vx_internal.h" +using namespace corevx; + #ifdef OPENVX_USE_PIPELINING VX_API_ENTRY vx_status vxSetGraphScheduleConfig( diff --git a/framework/src/vx_graph_stream.cpp b/framework/src/vx_graph_stream.cpp index 5cf3eff6..43e760a9 100644 --- a/framework/src/vx_graph_stream.cpp +++ b/framework/src/vx_graph_stream.cpp @@ -19,6 +19,8 @@ #include "vx_internal.h" +using namespace corevx; + #ifdef OPENVX_USE_STREAMING VX_API_ENTRY vx_status VX_API_CALL vxEnableGraphStreaming(vx_graph graph, diff --git a/framework/src/vx_image.cpp b/framework/src/vx_image.cpp index de8c540c..799f65e6 100644 --- a/framework/src/vx_image.cpp +++ b/framework/src/vx_image.cpp @@ -20,6 +20,8 @@ #include "vx_internal.h" #include "vx_image.h" +using namespace corevx; + /*============================================================================== PRIVATE INTERFACE =============================================================================*/ diff --git a/framework/src/vx_import.cpp b/framework/src/vx_import.cpp index 089ad5ce..c59fa586 100644 --- a/framework/src/vx_import.cpp +++ b/framework/src/vx_import.cpp @@ -15,6 +15,7 @@ #include "vx_internal.h" #include "vx_import.h" +using namespace corevx; /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_ix_export.cpp b/framework/src/vx_ix_export.cpp index 3418df21..1f3c542a 100644 --- a/framework/src/vx_ix_export.cpp +++ b/framework/src/vx_ix_export.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" +using namespace corevx; + #ifdef OPENVX_USE_IX #ifndef VX_IX_USE_IMPORT_AS_KERNEL #define VX_IX_USE_IMPORT_AS_KERNEL (VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_IX_USE) + 0x3) /*!< \brief Graph exported as user kernel. */ diff --git a/framework/src/vx_ix_import.cpp b/framework/src/vx_ix_import.cpp index 23386365..212d8d50 100644 --- a/framework/src/vx_ix_import.cpp +++ b/framework/src/vx_ix_import.cpp @@ -16,6 +16,8 @@ #include "vx_internal.h" +using namespace corevx; + #ifdef OPENVX_USE_IX #ifndef VX_IX_USE_IMPORT_AS_KERNEL #define VX_IX_USE_IMPORT_AS_KERNEL (VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_IX_USE) + 0x3) /*!< \brief Graph exported as user kernel. */ diff --git a/framework/src/vx_kernel.cpp b/framework/src/vx_kernel.cpp index 84d55bf4..acc83ffe 100644 --- a/framework/src/vx_kernel.cpp +++ b/framework/src/vx_kernel.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_kernel.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_log.cpp b/framework/src/vx_log.cpp index ad50cb6d..739e368b 100644 --- a/framework/src/vx_log.cpp +++ b/framework/src/vx_log.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_log.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_lut.cpp b/framework/src/vx_lut.cpp index 72f40005..67a3b278 100644 --- a/framework/src/vx_lut.cpp +++ b/framework/src/vx_lut.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_lut.h" +using namespace corevx; + VX_API_ENTRY vx_lut VX_API_CALL vxCreateLUT(vx_context context, vx_enum data_type, vx_size count) { vx_lut_t lut = nullptr; diff --git a/framework/src/vx_matrix.cpp b/framework/src/vx_matrix.cpp index 9dae5e28..f68045e2 100644 --- a/framework/src/vx_matrix.cpp +++ b/framework/src/vx_matrix.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_matrix.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_memory.cpp b/framework/src/vx_memory.cpp index 0162407c..dfa99d21 100644 --- a/framework/src/vx_memory.cpp +++ b/framework/src/vx_memory.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_memory.h" +using namespace corevx; + vx_bool Memory::freeMemory(vx_context context, vx_memory_t *memory) { (void)context; diff --git a/framework/src/vx_meta_format.cpp b/framework/src/vx_meta_format.cpp index 084b498a..25165a83 100644 --- a/framework/src/vx_meta_format.cpp +++ b/framework/src/vx_meta_format.cpp @@ -17,6 +17,7 @@ #include "vx_internal.h" #include "vx_meta_format.h" +using namespace corevx; /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_node.cpp b/framework/src/vx_node.cpp index e049e5a7..22903180 100644 --- a/framework/src/vx_node.cpp +++ b/framework/src/vx_node.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_node.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_object_array.cpp b/framework/src/vx_object_array.cpp index 01a418b8..3a692163 100644 --- a/framework/src/vx_object_array.cpp +++ b/framework/src/vx_object_array.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_object_array.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_osal.cpp b/framework/src/vx_osal.cpp index 99f08b3a..7376f044 100644 --- a/framework/src/vx_osal.cpp +++ b/framework/src/vx_osal.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_osal.h" +using namespace corevx; + #define BILLION (1000000000LLU) vx_bool Osal::createSem(vx_sem_t *sem, vx_uint32 count) diff --git a/framework/src/vx_parameter.cpp b/framework/src/vx_parameter.cpp index 291a7f8a..7793d179 100644 --- a/framework/src/vx_parameter.cpp +++ b/framework/src/vx_parameter.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_parameter.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_pyramid.cpp b/framework/src/vx_pyramid.cpp index ce5f39b0..124f1941 100644 --- a/framework/src/vx_pyramid.cpp +++ b/framework/src/vx_pyramid.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_pyramid.h" +using namespace corevx; + /******************************************************************************/ /* INTERNAL INTERFACE */ /******************************************************************************/ diff --git a/framework/src/vx_reference.cpp b/framework/src/vx_reference.cpp index 320c50b5..f2f8f3fb 100644 --- a/framework/src/vx_reference.cpp +++ b/framework/src/vx_reference.cpp @@ -16,6 +16,8 @@ #include "vx_internal.h" +using namespace corevx; + vx_enum static_objects[] = { VX_TYPE_TARGET, VX_TYPE_KERNEL, diff --git a/framework/src/vx_remap.cpp b/framework/src/vx_remap.cpp index ee9aff9d..be8e013a 100644 --- a/framework/src/vx_remap.cpp +++ b/framework/src/vx_remap.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_remap.h" +using namespace corevx; + /*****************************************************************************/ /* INTERNAL INTERFACE */ /*****************************************************************************/ diff --git a/framework/src/vx_scalar.cpp b/framework/src/vx_scalar.cpp index dc5ab859..b851c9ab 100644 --- a/framework/src/vx_scalar.cpp +++ b/framework/src/vx_scalar.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_scalar.h" +using namespace corevx; + /*****************************************************************************/ /* INTERNAL INTERFACE */ /*****************************************************************************/ diff --git a/framework/src/vx_target.cpp b/framework/src/vx_target.cpp index be764a5b..060e9889 100644 --- a/framework/src/vx_target.cpp +++ b/framework/src/vx_target.cpp @@ -15,6 +15,7 @@ #include "vx_internal.h" +using namespace corevx; /*****************************************************************************/ /* INTERNAL INTERFACE */ /*****************************************************************************/ diff --git a/framework/src/vx_tensor.cpp b/framework/src/vx_tensor.cpp index 4bebbf01..d60c0984 100644 --- a/framework/src/vx_tensor.cpp +++ b/framework/src/vx_tensor.cpp @@ -19,6 +19,8 @@ #include "vx_internal.h" #include "vx_tensor.h" +using namespace corevx; + /*****************************************************************************/ /* INTERNAL INTERFACE */ /*****************************************************************************/ diff --git a/framework/src/vx_threshold.cpp b/framework/src/vx_threshold.cpp index 564a421e..2523fca0 100644 --- a/framework/src/vx_threshold.cpp +++ b/framework/src/vx_threshold.cpp @@ -17,6 +17,8 @@ #include "vx_internal.h" #include "vx_threshold.h" +using namespace corevx; + /*****************************************************************************/ /* INTERNAL INTERFACE */ /*****************************************************************************/ diff --git a/framework/src/vx_type_pairs.cpp b/framework/src/vx_type_pairs.cpp index 18f71958..1c5dccd1 100644 --- a/framework/src/vx_type_pairs.cpp +++ b/framework/src/vx_type_pairs.cpp @@ -15,6 +15,8 @@ #include "vx_type_pairs.h" +using namespace corevx; + #if defined(EXPERIMENTAL_USE_DOT) || defined(OPENVX_USE_XML) vx_int32 TypePairs::stringFromType(vx_enum type) diff --git a/framework/src/vx_user_data_object.cpp b/framework/src/vx_user_data_object.cpp index 8b34e4d0..094676f7 100644 --- a/framework/src/vx_user_data_object.cpp +++ b/framework/src/vx_user_data_object.cpp @@ -23,6 +23,8 @@ #include "vx_internal.h" +using namespace corevx; + #if defined(OPENVX_USE_USER_DATA_OBJECT) /*****************************************************************************/ diff --git a/framework/src/vx_xml_export.cpp b/framework/src/vx_xml_export.cpp index 8ff07b4d..4242c46c 100644 --- a/framework/src/vx_xml_export.cpp +++ b/framework/src/vx_xml_export.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_type_pairs.h" +using namespace corevx; + #if defined(OPENVX_USE_XML) #if defined(__APPLE__) diff --git a/framework/src/vx_xml_import.cpp b/framework/src/vx_xml_import.cpp index 8fa33c40..71c6074c 100644 --- a/framework/src/vx_xml_import.cpp +++ b/framework/src/vx_xml_import.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_type_pairs.h" +using namespace corevx; + #if defined(OPENVX_USE_XML) #if defined(__APPLE__) diff --git a/include/COREVX/all.hpp b/include/COREVX/all.hpp new file mode 100644 index 00000000..8f238b2b --- /dev/null +++ b/include/COREVX/all.hpp @@ -0,0 +1,35 @@ +// CoreVX single-include header for C++ development +// Exposes the existing C++ classes under the corevx namespace without refactoring +// and re-exports the stable OpenVX C API for convenience. + +#pragma once + +// Public OpenVX C API (stable surface) +#include +#include + +// C++ class headers (implementation classes). These expose full class methods. +// Note: These are part of the current implementation and may include internal details. +// They are intentionally exposed here to allow direct C++ usage of the pipeline engine. +#include "framework/include/vx_internal.h" +#include "framework/include/vx_reference.h" +#include "framework/include/vx_context.h" +#include "framework/include/vx_graph.h" +#include "framework/include/vx_node.h" +#include "framework/include/vx_image.h" +#include "framework/include/vx_array.h" +#include "framework/include/vx_tensor.h" +#include "framework/include/vx_matrix.h" +#include "framework/include/vx_threshold.h" +#include "framework/include/vx_distribution.h" +#include "framework/include/vx_convolution.h" +#include "framework/include/vx_pyramid.h" +#include "framework/include/vx_remap.h" +#include "framework/include/vx_object_array.h" +#include "framework/include/vx_parameter.h" +#include "framework/include/vx_kernel.h" +#include "framework/include/vx_meta_format.h" +#include "framework/include/vx_import.h" +#include "framework/include/vx_error.h" +#include "framework/include/vx_delay.h" +#include "framework/include/vx_event_queue.hpp" diff --git a/include/VX/vx_corevx_ext.h b/include/VX/vx_corevx_ext.h index 6967b51b..4365d888 100644 --- a/include/VX/vx_corevx_ext.h +++ b/include/VX/vx_corevx_ext.h @@ -310,6 +310,7 @@ VX_API_ENTRY vx_status VX_API_CALL vxImportGraphFromDot(vx_graph graph, vx_char #define VX_INT_MAX_PARAM_QUEUE_DEPTH 10 /* ENABLED FEATURES IN COREVX ONLY */ +#define DISABLE_ICD_COMPATIBILITY 1 #define OPENVX_USE_USER_DATA_OBJECT 1 #define OPENVX_USE_IX 1 #define OPENVX_USE_XML 1 diff --git a/include/VX/vx_import.h b/include/VX/vx_import.h index 4045d150..6a585d86 100644 --- a/include/VX/vx_import.h +++ b/include/VX/vx_import.h @@ -52,8 +52,8 @@ IMPORT * \ingroup group_import */ #ifdef __cplusplus -class Import; -using vx_import = Import*; +namespace corevx { class Import; } +using vx_import = corevx::Import*; #else struct Import; typedef struct Import* vx_import; diff --git a/include/VX/vx_khr_user_data_object.h b/include/VX/vx_khr_user_data_object.h index d467fb37..a12bc3f9 100644 --- a/include/VX/vx_khr_user_data_object.h +++ b/include/VX/vx_khr_user_data_object.h @@ -35,8 +35,8 @@ extern "C" { * \ingroup group_user_data_object */ #ifdef __cplusplus -class UserDataObject; -using vx_user_data_object = UserDataObject*; +namespace corevx {class UserDataObject;} +using vx_user_data_object = corevx::UserDataObject*; #else struct UserDataObject; typedef struct UserDataObject* vx_user_data_object; diff --git a/include/VX/vx_khr_xml.h b/include/VX/vx_khr_xml.h index c42b64a5..6aa1b757 100644 --- a/include/VX/vx_khr_xml.h +++ b/include/VX/vx_khr_xml.h @@ -61,8 +61,13 @@ enum vx_import_attribute_e { * \ingroup group_xml * \extends vx_reference */ -class Import; -using vx_import = Import*; +#ifdef __cplusplus +namespace corevx { class Import; } +using vx_import = corevx::Import*; +#else +struct Import; +typedef struct Import* vx_import; +#endif #ifdef __cplusplus diff --git a/include/VX/vx_types.h b/include/VX/vx_types.h index d7e1460d..1e475bd5 100644 --- a/include/VX/vx_types.h +++ b/include/VX/vx_types.h @@ -145,8 +145,29 @@ typedef double vx_float64; * \ingroup group_reference */ #ifdef __cplusplus +namespace corevx { class Reference; -using vx_reference = Reference*; +class Context; +class Graph; +class Node; +class Image; +class Array; +class Tensor; +class Matrix; +class Threshold; +class Distribution; +class Convolution; +class Pyramid; +class Remap; +class ObjectArray; +class Scalar; +class Parameter; +class Kernel; +class Delay; +class MetaFormat; +using Lut = Array; +} +using vx_reference = corevx::Reference*; #else struct Reference; typedef struct Reference* vx_reference; @@ -181,8 +202,7 @@ typedef uintptr_t vx_map_id; * \extends vx_reference */ #ifdef __cplusplus -class Scalar; -using vx_scalar = Scalar*; +using vx_scalar = corevx::Scalar*; #else struct Scalar; typedef struct Scalar* vx_scalar; @@ -194,8 +214,7 @@ typedef struct Scalar* vx_scalar; * \extends vx_reference */ #ifdef __cplusplus -class Image; -using vx_image = Image*; +using vx_image = corevx::Image*; #else typedef struct Image* vx_image; #endif @@ -207,8 +226,7 @@ typedef struct Image* vx_image; * \extends vx_reference */ #ifdef __cplusplus -class Kernel; -using vx_kernel = Kernel*; +using vx_kernel = corevx::Kernel*; #else typedef struct Kernel* vx_kernel; #endif @@ -219,8 +237,7 @@ typedef struct Kernel* vx_kernel; * \extends vx_reference */ #ifdef __cplusplus -class Parameter; -using vx_parameter = Parameter*; +using vx_parameter = corevx::Parameter*; #else typedef struct Parameter* vx_parameter; #endif @@ -231,8 +248,7 @@ typedef struct Parameter* vx_parameter; * \extends vx_reference */ #ifdef __cplusplus -class Node; -using vx_node = Node*; +using vx_node = corevx::Node*; #else typedef struct Node* vx_node; #endif @@ -242,8 +258,7 @@ typedef struct Node* vx_node; * \extends vx_reference */ #ifdef __cplusplus -class Graph; -using vx_graph = Graph*; +using vx_graph = corevx::Graph*; #else typedef struct Graph* vx_graph; #endif @@ -254,8 +269,7 @@ typedef struct Graph* vx_graph; * \extends vx_reference */ #ifdef __cplusplus -class Context; -using vx_context = Context*; +using vx_context = corevx::Context*; #else typedef struct Context* vx_context; #endif @@ -267,8 +281,7 @@ typedef struct Context* vx_context; * \ingroup group_delay */ #ifdef __cplusplus -class Delay; -using vx_delay = Delay*; +using vx_delay = corevx::Delay*; #else typedef struct Delay* vx_delay; #endif @@ -278,9 +291,7 @@ typedef struct Delay* vx_delay; * \ingroup group_lut */ #ifdef __cplusplus -class Array; -using Lut = Array; -using vx_lut = Lut *; +using vx_lut = corevx::Lut*; #else typedef struct Lut* vx_lut; #endif @@ -291,8 +302,7 @@ typedef struct Lut* vx_lut; * \ingroup group_distribution */ #ifdef __cplusplus -class Distribution; -using vx_distribution = Distribution*; +using vx_distribution = corevx::Distribution*; #else typedef struct Distribution* vx_distribution; #endif @@ -302,8 +312,7 @@ typedef struct Distribution* vx_distribution; * \ingroup group_matrix */ #ifdef __cplusplus -class Matrix; -using vx_matrix = Matrix*; +using vx_matrix = corevx::Matrix*; #else typedef struct Matrix* vx_matrix; #endif @@ -313,8 +322,7 @@ typedef struct Matrix* vx_matrix; * \ingroup group_pyramid */ #ifdef __cplusplus -class Pyramid; -using vx_pyramid = Pyramid*; +using vx_pyramid = corevx::Pyramid*; #else typedef struct Pyramid* vx_pyramid; #endif @@ -325,8 +333,7 @@ typedef struct Pyramid* vx_pyramid; * \ingroup group_threshold */ #ifdef __cplusplus -class Threshold; -using vx_threshold = Threshold*; +using vx_threshold = corevx::Threshold*; #else typedef struct Threshold* vx_threshold; #endif @@ -336,8 +343,7 @@ typedef struct Threshold* vx_threshold; * \ingroup group_convolution */ #ifdef __cplusplus -class Convolution; -using vx_convolution = Convolution*; +using vx_convolution = corevx::Convolution*; #else typedef struct Convolution* vx_convolution; #endif @@ -347,8 +353,7 @@ typedef struct Convolution* vx_convolution; * \ingroup group_remap */ #ifdef __cplusplus -class Remap; -using vx_remap = Remap*; +using vx_remap = corevx::Remap*; #else typedef struct Remap* vx_remap; #endif @@ -357,7 +362,7 @@ typedef struct Remap* vx_remap; * \ingroup group_array */ #ifdef __cplusplus -using vx_array = Array*; +using vx_array = corevx::Array*; #else typedef struct Array* vx_array; #endif @@ -366,8 +371,7 @@ typedef struct Array* vx_array; * \ingroup group_object_array */ #ifdef __cplusplus -class ObjectArray; -using vx_object_array = ObjectArray*; +using vx_object_array = corevx::ObjectArray*; #else typedef struct ObjectArray* vx_object_array; #endif @@ -378,8 +382,7 @@ typedef struct ObjectArray* vx_object_array; * \extends vx_reference */ #ifdef __cplusplus -class Tensor; -using vx_tensor = Tensor*; +using vx_tensor = corevx::Tensor*; #else typedef struct Tensor* vx_tensor; #endif @@ -419,8 +422,7 @@ typedef vx_enum vx_bool; * \ingroup group_user_kernels */ #ifdef __cplusplus -class MetaFormat; -using vx_meta_format = MetaFormat*; +using vx_meta_format = corevx::MetaFormat*; #else typedef struct MetaFormat* vx_meta_format; #endif diff --git a/kernels/c_model/c_convertcolor.cpp b/kernels/c_model/c_convertcolor.cpp index 15401bec..f18190b6 100644 --- a/kernels/c_model/c_convertcolor.cpp +++ b/kernels/c_model/c_convertcolor.cpp @@ -164,12 +164,12 @@ vx_status vxConvertColor(vx_image src, vx_image dst) for (p = 0; p < src_planes; p++) { status |= vxAccessImagePatch(src, &rect, p, &src_addr[p], &src_base[p], VX_READ_ONLY); - Image::printImageAddressing(&src_addr[p]); + corevx::Image::printImageAddressing(&src_addr[p]); } for (p = 0; p < dst_planes; p++) { status |= vxAccessImagePatch(dst, &rect, p, &dst_addr[p], &dst_base[p], VX_WRITE_ONLY); - Image::printImageAddressing(&dst_addr[p]); + corevx::Image::printImageAddressing(&dst_addr[p]); } if (status != VX_SUCCESS) { diff --git a/targets/ai_server/vx_interface.cpp b/targets/ai_server/vx_interface.cpp index 75f0f2c7..b2057b17 100644 --- a/targets/ai_server/vx_interface.cpp +++ b/targets/ai_server/vx_interface.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_interface.h" +using namespace corevx; + static const vx_char name[VX_MAX_TARGET_NAME] = "corevx.ai.server"; /*! \brief Declares the list of all supported base kernels. diff --git a/targets/c_model/vx_colorconvert.cpp b/targets/c_model/vx_colorconvert.cpp index 64297622..2037b4df 100644 --- a/targets/c_model/vx_colorconvert.cpp +++ b/targets/c_model/vx_colorconvert.cpp @@ -28,7 +28,7 @@ static vx_status VX_CALLBACK vxColorConvertKernel(vx_node node, const vx_reference *parameters, vx_uint32 num) { - if (vx_true_e == Reference::isValidReference(node, VX_TYPE_NODE) && + if (vx_true_e == corevx::Reference::isValidReference(node, VX_TYPE_NODE) && (2 == num)) { vx_image src = (vx_image)parameters[0]; diff --git a/targets/c_model/vx_interface.cpp b/targets/c_model/vx_interface.cpp index 52425ee4..09c78463 100644 --- a/targets/c_model/vx_interface.cpp +++ b/targets/c_model/vx_interface.cpp @@ -26,6 +26,8 @@ #include "vx_internal.h" #include "vx_interface.h" +using namespace corevx; + static const vx_char name[VX_MAX_TARGET_NAME] = "khronos.any"; /*! \brief Declares the list of all supported base kernels. diff --git a/targets/c_model/vx_tensor_transpose.cpp b/targets/c_model/vx_tensor_transpose.cpp index 6f60a052..dd9db882 100644 --- a/targets/c_model/vx_tensor_transpose.cpp +++ b/targets/c_model/vx_tensor_transpose.cpp @@ -46,7 +46,7 @@ static vx_status VX_CALLBACK tensorTansposeKernel(vx_node node, const vx_referen vx_scalar dim1 = (vx_scalar)parameters[TRANSPOSE_PARAM_DIM1]; vx_scalar dim2 = (vx_scalar)parameters[TRANSPOSE_PARAM_DIM2]; vx_tensor output = (vx_tensor)parameters[TRANSPOSE_PARAM_TENSOR_OUT]; - status = TransposeTensorKernelImpl(in, dim1, dim2, output, Reference::sizeOfType(output->data_type)); + status = TransposeTensorKernelImpl(in, dim1, dim2, output, corevx::Reference::sizeOfType(output->data_type)); } return status; diff --git a/targets/executorch/vx_interface.cpp b/targets/executorch/vx_interface.cpp index 024807c9..3e81509b 100644 --- a/targets/executorch/vx_interface.cpp +++ b/targets/executorch/vx_interface.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_interface.h" +using namespace corevx; + static const vx_char name[VX_MAX_TARGET_NAME] = "corevx.exec.torch"; /*! \brief Declares the list of all supported base kernels. diff --git a/targets/liteRT/vx_interface.cpp b/targets/liteRT/vx_interface.cpp index bfac3965..580d8b53 100644 --- a/targets/liteRT/vx_interface.cpp +++ b/targets/liteRT/vx_interface.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_interface.h" +using namespace corevx; + static const vx_char name[VX_MAX_TARGET_NAME] = "corevx.tflite.rt"; /*! \brief Declares the list of all supported base kernels. diff --git a/targets/onnxRT/vx_interface.cpp b/targets/onnxRT/vx_interface.cpp index e9ec19ec..05bc3b55 100644 --- a/targets/onnxRT/vx_interface.cpp +++ b/targets/onnxRT/vx_interface.cpp @@ -18,6 +18,8 @@ #include "vx_internal.h" #include "vx_interface.h" +using namespace corevx; + static const vx_char name[VX_MAX_TARGET_NAME] = "corevx.onnx.rt"; /*! \brief Declares the list of all supported base kernels. diff --git a/targets/opencl/vx_absdiff.cpp b/targets/opencl/vx_absdiff.cpp index f7d60bff..c6124ca1 100644 --- a/targets/opencl/vx_absdiff.cpp +++ b/targets/opencl/vx_absdiff.cpp @@ -73,7 +73,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -117,7 +117,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_bitwise.cpp b/targets/opencl/vx_bitwise.cpp index 32b97e40..81abbe38 100644 --- a/targets/opencl/vx_bitwise.cpp +++ b/targets/opencl/vx_bitwise.cpp @@ -168,7 +168,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -215,7 +215,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_convolution.cpp b/targets/opencl/vx_convolution.cpp index e3922259..e65bb16e 100644 --- a/targets/opencl/vx_convolution.cpp +++ b/targets/opencl/vx_convolution.cpp @@ -81,7 +81,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -170,7 +170,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_filter.cpp b/targets/opencl/vx_filter.cpp index 2f80b55c..d980f9bc 100644 --- a/targets/opencl/vx_filter.cpp +++ b/targets/opencl/vx_filter.cpp @@ -75,7 +75,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -141,7 +141,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_gradients.cpp b/targets/opencl/vx_gradients.cpp index e6f61cbd..62ea44ef 100644 --- a/targets/opencl/vx_gradients.cpp +++ b/targets/opencl/vx_gradients.cpp @@ -74,7 +74,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -162,7 +162,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); @@ -176,7 +176,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_interface.cpp b/targets/opencl/vx_interface.cpp index 769de4fb..6c825a03 100644 --- a/targets/opencl/vx_interface.cpp +++ b/targets/opencl/vx_interface.cpp @@ -29,6 +29,8 @@ #include "vx_internal.h" #include "vx_support.h" +using namespace corevx; + static const vx_char name[VX_MAX_TARGET_NAME] = "pc.opencl"; /*! \brief Prototype for assigning to kernel */ diff --git a/targets/opencl/vx_morphology.cpp b/targets/opencl/vx_morphology.cpp index 96597259..559f0f83 100644 --- a/targets/opencl/vx_morphology.cpp +++ b/targets/opencl/vx_morphology.cpp @@ -74,7 +74,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -140,7 +140,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_nonlinearfilter.cpp b/targets/opencl/vx_nonlinearfilter.cpp index c5c52b73..15c18f01 100644 --- a/targets/opencl/vx_nonlinearfilter.cpp +++ b/targets/opencl/vx_nonlinearfilter.cpp @@ -56,7 +56,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen vx_enum stype = VX_TYPE_INVALID; vxCopyScalar(sc, &value, VX_READ_ONLY, VX_MEMORY_TYPE_HOST); vxQueryScalar(sc, VX_SCALAR_TYPE, &stype, sizeof(stype)); - size = Reference::sizeOfType(stype); + size = corevx::Reference::sizeOfType(stype); err = clSetKernelArg(kernel, argidx++, size, &value); @@ -80,7 +80,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -91,7 +91,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen ref = node->parameters[2]; memory = &((vx_matrix)ref)->memory; - size = Memory::computeMemorySize(memory, pln); + size = corevx::Memory::computeMemorySize(memory, pln); memory->hdls[pln] = clCreateBuffer(context->global[0], CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR, size, memory->ptrs[pln], &err); err = clEnqueueWriteBuffer(context->queues[plidx][didx], @@ -194,7 +194,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_phase.cpp b/targets/opencl/vx_phase.cpp index b7ddcea1..8869ab44 100644 --- a/targets/opencl/vx_phase.cpp +++ b/targets/opencl/vx_phase.cpp @@ -73,7 +73,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -116,7 +116,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_threshold.cpp b/targets/opencl/vx_threshold.cpp index 497b54ba..aa0c641b 100644 --- a/targets/opencl/vx_threshold.cpp +++ b/targets/opencl/vx_threshold.cpp @@ -73,7 +73,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -152,7 +152,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/targets/opencl/vx_warp.cpp b/targets/opencl/vx_warp.cpp index 03fa546b..e9fe4d9f 100644 --- a/targets/opencl/vx_warp.cpp +++ b/targets/opencl/vx_warp.cpp @@ -80,7 +80,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen memory->hdls[pln], CL_TRUE, 0, - Memory::computeMemorySize(memory, pln), + corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, @@ -179,7 +179,7 @@ static vx_status VX_CALLBACK vxclCallOpenCLKernel(vx_node node, const vx_referen err = clEnqueueReadBuffer(context->queues[plidx][didx], memory->hdls[pln], - CL_TRUE, 0, Memory::computeMemorySize(memory, pln), + CL_TRUE, 0, corevx::Memory::computeMemorySize(memory, pln), memory->ptrs[pln], 0, nullptr, nullptr); diff --git a/tests/unit_test/test_array.cpp b/tests/unit_test/test_array.cpp index 588623a8..58fe735d 100644 --- a/tests/unit_test/test_array.cpp +++ b/tests/unit_test/test_array.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ArrayTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_context.cpp b/tests/unit_test/test_context.cpp index 19bb9c05..c230f3b2 100644 --- a/tests/unit_test/test_context.cpp +++ b/tests/unit_test/test_context.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ContextTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_delay.cpp b/tests/unit_test/test_delay.cpp index 087bc583..28e47623 100644 --- a/tests/unit_test/test_delay.cpp +++ b/tests/unit_test/test_delay.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class DelayTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_distribution.cpp b/tests/unit_test/test_distribution.cpp index 83b2ce35..8f1d0ee0 100644 --- a/tests/unit_test/test_distribution.cpp +++ b/tests/unit_test/test_distribution.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class DistributionTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_dot.cpp b/tests/unit_test/test_dot.cpp index 010e4e99..2080211e 100644 --- a/tests/unit_test/test_dot.cpp +++ b/tests/unit_test/test_dot.cpp @@ -14,6 +14,8 @@ #include #include "vx_internal.h" +using namespace corevx; + // Helper to write DOT file content to a temporary file. static std::string writeTempDotFile(const std::string &content) { diff --git a/tests/unit_test/test_error.cpp b/tests/unit_test/test_error.cpp index 3f537909..5da6b479 100644 --- a/tests/unit_test/test_error.cpp +++ b/tests/unit_test/test_error.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ErrorTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_image.cpp b/tests/unit_test/test_image.cpp index 458c81ec..d9cf3db9 100644 --- a/tests/unit_test/test_image.cpp +++ b/tests/unit_test/test_image.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ImageTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_import.cpp b/tests/unit_test/test_import.cpp index f42f7f7b..3f7e89bf 100644 --- a/tests/unit_test/test_import.cpp +++ b/tests/unit_test/test_import.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + #if defined(OPENVX_USE_XML) || defined(OPENVX_USE_IX) class ImportTest : public ::testing::Test diff --git a/tests/unit_test/test_parameter.cpp b/tests/unit_test/test_parameter.cpp index e8facf81..5e49c7d6 100644 --- a/tests/unit_test/test_parameter.cpp +++ b/tests/unit_test/test_parameter.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ParameterTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_remap.cpp b/tests/unit_test/test_remap.cpp index 79c0eb26..1cf06a83 100644 --- a/tests/unit_test/test_remap.cpp +++ b/tests/unit_test/test_remap.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class RemapTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_scalar.cpp b/tests/unit_test/test_scalar.cpp index 5b7b0e58..0ec9646d 100644 --- a/tests/unit_test/test_scalar.cpp +++ b/tests/unit_test/test_scalar.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ScalarTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_target.cpp b/tests/unit_test/test_target.cpp index 05a4d421..84e3879c 100644 --- a/tests/unit_test/test_target.cpp +++ b/tests/unit_test/test_target.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class TargetTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_threshold.cpp b/tests/unit_test/test_threshold.cpp index 75e2b588..c7a300bb 100644 --- a/tests/unit_test/test_threshold.cpp +++ b/tests/unit_test/test_threshold.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + class ThresholdTest : public ::testing::Test { protected: diff --git a/tests/unit_test/test_userdataobject.cpp b/tests/unit_test/test_userdataobject.cpp index fc041613..127f4d18 100644 --- a/tests/unit_test/test_userdataobject.cpp +++ b/tests/unit_test/test_userdataobject.cpp @@ -12,6 +12,8 @@ #include "vx_internal.h" +using namespace corevx; + #ifdef OPENVX_USE_USER_DATA_OBJECT class UserDataObjectTest : public ::testing::Test