Hello World Example.
#include <cstdlib>
#include <iostream>
int main(
int argc,
char* argv[])
{
if (argc != 2)
{
std::cerr << "Usage: " << argv[0] << " <graph.xml>" << std::endl;
return EXIT_FAILURE;
}
{
std::cerr << "Failed to create Context" << std::endl;
return EXIT_FAILURE;
}
if (graphs.empty())
{
std::cerr << "Failed to import graph from XML" << std::endl;
return EXIT_FAILURE;
}
for (auto graph : graphs)
{
{
{
std::cout << "Graph processed successfully" << std::endl;
}
else
{
std::cerr << "Failed to process graph" << std::endl;
}
}
}
for (auto graph : graphs)
{
auto perf = graph->performance();
std::cout << "Graph " << (size_t)graph << " performance metrics:" << std::endl
<< " begin time (ns): " << perf.beg << std::endl
<< " end time (ns): " << perf.end << std::endl
<< " sum time (ns): " << perf.sum << std::endl
<< " num runs: " << perf.num << std::endl
<< " avg time (ns): " << perf.avg << std::endl
<< " min time (ns): " << perf.min << std::endl
<< " max time (ns): " << perf.max << std::endl
<< std::endl;
}
std::cout << "completed successfully" << std::endl;
return EXIT_SUCCESS;
}
CoreVX single-include header for C++ development.
int main()
Definition blur_pipeline.cpp:15
@ VX_SUCCESS
No error.
Definition vx_types.h:543
static vx_context createContext()
Create a new context.
static vx_status getStatus(vx_reference ref)
Provides a generic API to return status values from Object constructors if they fail.
static std::vector< vx_graph > importFromXML(vx_context context, std::string filepath)
Import from XML.
Definition vx_xml.h:42
The internal representation of a vx_array.
Definition vx_array.h:34