JeVois
1.17
JeVois Smart Embedded Machine Vision Toolkit
|
|
These types and classes support the core JeVois implementation. Pay particular attention to the very useful JEVOIS_DEFINE_ENUM_CLASS(name, SEQ) macro to define new enums that can be used in Parameter to allow menu-style parameters.
Helper macro to define new enum class types. SEQ should be a BOOST_PP_SEQ (see example syntax below). You will get:
You can in particular use name_Values when defining a Parameter definition to list all the valid values, and the streaming operators will allow you to set the Parameter value by string, etc.
For example:
expands to:
Note how the operator>>
will throw if the given string does not match the string representation of one of the enum's values.
Classes | |
class | jevois::BoundedBuffer< T, WhenFull, WhenEmpty > |
Thread-safe synchronized producer/consumer queue. More... | |
class | jevois::Range< T > |
A generic range class. More... | |
class | jevois::Semaphore< BB > |
A simple semaphore. More... | |
class | jevois::Singleton< T > |
A generic singleton class to enforce a single instance of an object. More... | |
class | jevois::StepRange< T > |
A generic range class with a step. More... | |
Enumerations | |
enum | jevois::BlockingBehavior { jevois::BlockingBehavior::Block, jevois::BlockingBehavior::Throw } |
Behavior when attemting an operation that cannot be completed immediately. More... | |
Functions | |
template<class Function , class... Args> | |
std::future< std::invoke_result_t< std::decay_t< Function >, std::decay_t< Args >... > > | jevois::async (Function &&f, Args &&... args) |
Async execution using a thread pool. More... | |
template<class Function , class... Args> | |
std::future< std::invoke_result_t< std::decay_t< Function >, std::decay_t< Args >... > > | jevois::async_little (Function &&f, Args &&... args) |
Async execution using a thread pool. More... | |
|
strong |
Behavior when attemting an operation that cannot be completed immediately.
Defines the behavior of Semaphore, BoundedBuffer, etc.
Enumerator | |
---|---|
Block | Block until operation can be completed. |
Throw | Throw std::runtime_error if operation cannot be completed immediately. |
Definition at line 25 of file BlockingBehavior.H.
std::future<std::invoke_result_t<std::decay_t<Function>, std::decay_t<Args>...> > jevois::async | ( | Function && | f, |
Args &&... | args | ||
) |
Async execution using a thread pool.
Same function signature and usage as std::async(). Always launches the task in a parallel thread, using a thread pool. Runs the task on big (ARM A73) cores when using big.little CPU architecture of JeVois Pro Platform. Use this function to launch parallel threads of high priority, e.g., machine vision algorithms.
Referenced by jevois::rawimage::byteSwap(), jevois::MovieOutput::MovieOutput(), TutorialEdgeDetectionX4::process(), jevois::dnn::Pipeline::process(), jevois::dnn::Network::ready(), and jevois::rawimage::unpackCvRGBAtoGrayRawImage().
std::future<std::invoke_result_t<std::decay_t<Function>, std::decay_t<Args>...> > jevois::async_little | ( | Function && | f, |
Args &&... | args | ||
) |
Async execution using a thread pool.
Same function signature and usage as std::async(). Always launches the task in a parallel thread, using a thread pool. Runs the task on little (ARM A53) cores when using big.little CPU architecture of JeVois Pro Platform, or on the same thread pool as jevois::async() on other architectures. Use this function to run threads that are not very compute intensive, e.g., threads that may sleep most of the time until some condition has become satisfied.
Referenced by jevois::CameraDevice::CameraDevice(), jevois::GUIhelper::drawSystem(), jevois::Engine::Engine(), jevois::Gadget::Gadget(), and jevois::Watchdog::Watchdog().