Skip to content

Conversation

@raphacan
Copy link
Contributor

Hi,
this PR extends the export / import utility for the IPC to support the object array type.
The export function exposes the meta for the object array itself and each element compositing it.
The import function received two ipc structs, one representing the object array and the other for the different elements of the obj array.
please have a look if you want to take it over,

@brockTI
Copy link
Contributor

brockTI commented Oct 15, 2025

Can you add some testcases similar to the existing tivx_utils_export_ref_for_ipc_xfer tests in test_tiovx/test_tivxMem.c? https://github.com/TexasInstruments/tiovx/blob/main/conformance_tests/test_tiovx/test_tivxMem.c#L1342

* \return VX_SUCCESS on success, else failure
*
*/
vx_status vx_utils_export_ref_for_ipc_xfer_objarray(const vx_reference ref,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these functions be changed from "vx" to "tivx"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


ipcMsgHandle->numFd = 0;
*numMessages = numItems;
VX_PRINT(VX_ZONE_INFO, "vx_utils_export_ref_for_ipc_xfer_objarray() successfull.\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo "successfull" -> "successful"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* could be transferred over Linux/QNX IPC mechanism to a remote process.
* This is just a wrapper for tivx_utils_export_ref_for_ipc_xfer.
*
* \param [in] ref A valid openVX reference for an object array of images
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not restricted to contain only images, right? I believe this could describe data objects in general

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, comment modified

/*!< \brief structure containing information about object array
used when type is set to VX_TYPE_OBJECT_ARRAY */
struct {
/*!< \brief The number of image objects */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also describe data objects generally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified

@brockTI
Copy link
Contributor

brockTI commented Oct 15, 2025

Have you considered a tivx_utils_compare_refs_from_ipc_xfer_objarray function as well?

@raphacan
Copy link
Contributor Author

raphacan commented Oct 21, 2025

@brockTI concerning the compare function. If you look at the function's signature for the object array import (tivx_utils_import_ref_from_ipc_xfer_objarray) you need to provide the object array ref_ipc_msg and the an array of ref_ipc_msg for each objects to be imported.
This function is only a wrapper around these export and import functions to ease the extraction of object arrays.
So I am not sure about a compare function: What would you like to compare in that case?

@brockTI I added a test to showcase the import and export of the object array

@raphacan
Copy link
Contributor Author

raphacan commented Oct 23, 2025

Can you add some testcases similar to the existing tivx_utils_export_ref_for_ipc_xfer tests in test_tiovx/test_tivxMem.c? https://github.com/TexasInstruments/tiovx/blob/main/conformance_tests/test_tiovx/test_tivxMem.c#L1342

I did it, you will find two different tests: One with a NULL object and one with a valid one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants