-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvx_training_01.c
41 lines (35 loc) · 1.16 KB
/
vx_training_01.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* Copyright (C) 2022 RidgeRun, LLC (http://www.ridgerun.com)
* All Rights Reserved.
*
* The contents of this software are proprietary and confidential to RidgeRun,
* LLC. No part of this program may be photocopied, reproduced or translated
* into another programming language without prior written consent of
* RidgeRun, LLC. The user is free to modify the source code after obtaining
* a software license from RidgeRun. All source code changes must be provided
* back to RidgeRun without any encumbrance.
*/
#include <stdio.h>
#include <VX/vx.h>
static void VX_CALLBACK
context_log_callback(vx_context context, vx_reference ref, vx_status status,
const vx_char string[])
{
printf ("vx-training: %s\n", string);
}
int
main (int argc, char *argv[])
{
int ret = 0;
vx_context context = vxCreateContext ();
vx_status status = vxGetStatus ((vx_reference)context);
if (VX_SUCCESS != status) {
fprintf (stderr, "vx-training: Unable to create context: %d\n", status);;
ret = -1;
goto out;
}
vx_bool reentrant = vx_false_e;
vxRegisterLogCallback(context, context_log_callback, reentrant);
out:
vxReleaseContext (&context);
return ret;
}