|
RTC Toolkit 5.1.0
|
#include <computation.hpp>
Classes | |
| struct | Result |
| struct | ResultIf |
Public Types | |
| enum class | Algorithm : uint8_t { Mean , Median , SimpleInversion , PythonInversion } |
| enum class | Algorithm : uint8_t { Mean , Median , SimpleInversion , PythonInversion } |
| using | ServiceContainer = rtctk::componentFramework::ServiceContainer |
| template<typename T > | |
| using | MatrixBuffer = rtctk::componentFramework::MatrixBuffer<T> |
| using | ServiceContainer = rtctk::componentFramework::ServiceContainer |
| using | ServiceContainer = rtctk::componentFramework::ServiceContainer |
| template<typename T > | |
| using | MatrixBuffer = rtctk::componentFramework::MatrixBuffer<T> |
Public Types inherited from rtctk::dataTask::ComputationBase< TopicType > | |
| enum | State |
| Current state of the worker thread. More... | |
| using | TopicType |
| using | ServiceContainer |
| using | ComponentMetricsIf |
Public Member Functions | |
| Computation (ServiceContainer &services, ResultIf &publisher, const std::string &shm_name, size_t to_read, size_t to_skip, std::chrono::milliseconds sample_timeout, std::optional< numapp::NumaPolicies > thread_policies, size_t n_slopes, size_t n_modes, size_t gpu) | |
| ~Computation () | |
| void | SetSlopesToModesMatrix (MatrixBuffer< float > &&s2m_matrix) |
| Computation (ServiceContainer &services, ResultIf &publisher, const std::string &shm_name, size_t to_read, size_t to_skip, std::chrono::milliseconds sample_timeout, std::optional< numapp::NumaPolicies > thread_policies) | |
| ~Computation () | |
| Result & | ComputeSync (Algorithm algorithm) |
| One way to make result available to BusinessLogic is to return a reference here. | |
| Computation () | |
| void | SetStaticConfig (size_t n_slopes, size_t n_acts) |
| void | SetDynamicConfig (MatrixBuffer< float > &&data) |
| Result | Compute (Algorithm algorithm) |
| Computation (ServiceContainer &services, ResultIf &publisher, const std::string &shm_name, size_t to_read, size_t to_skip, std::chrono::milliseconds sample_timeout, std::optional< numapp::NumaPolicies > thread_policies, size_t n_slopes, size_t n_modes) | |
| ~Computation () | |
| void | SetSlopesToModesMatrix (MatrixBuffer< float > &&s2m_matrix) |
Public Member Functions inherited from rtctk::dataTask::ComputationBase< TopicType > | |
| ComputationBase (ServiceContainer &services, const std::string &shm_name, size_t to_read, size_t to_skip, std::chrono::milliseconds sample_timeout, std::optional< numapp::NumaPolicies > thread_policies) | |
| Constructor. | |
| virtual | ~ComputationBase ()=default |
| Destructor. | |
| void | SetSamplesToRead (size_t value) |
| Sets the number of samples to read. | |
| size_t | GetSamplesToRead () const |
| Gets the number of samples to read. | |
| void | SetSamplesToSkip (size_t value) |
| Sets the number of samples to skip. | |
| size_t | GetSamplesToSkip () const |
| Gets the number of samples to skip. | |
| void | Spawn () |
| Spawns the worker thread (sync method). | |
| void | Join () |
| Terminates the worker thread (sync method). | |
| void | Run (std::optional< size_t > cycles=std::nullopt) |
| Commands the worker thread to perform number of computation cycles (async method). | |
| void | RunOnceSync (std::optional< std::chrono::milliseconds > poll_interval=std::nullopt) |
| Commands the worker thread to perform a single computation cycle (sync method). | |
| void | Idle () |
| Commands the worker thread to stop performing computation cycles (async method). | |
| State | GetState () const |
| Returns the current state of the worker thread. | |
| size_t | GetCycles () const |
| Retrieves number of computation cycles performed since running. | |
| void | CheckErrors () |
| Checks for errors in the worker thread and rethrows them to the caller. | |
Additional Inherited Members | |
Protected Member Functions inherited from rtctk::dataTask::ComputationBase< TopicType > | |
| virtual void | CopyData (size_t sample_idx, const TopicType &sample) noexcept=0 |
| User-hook used to copy data of a single computation cycle into user-owned sample buffer. | |
| using rtctk::exampleDataTask::Computation::MatrixBuffer = rtctk::componentFramework::MatrixBuffer<T> |
| using rtctk::exampleDataTask::Computation::MatrixBuffer = rtctk::componentFramework::MatrixBuffer<T> |
| using rtctk::exampleDataTask::Computation::ServiceContainer = rtctk::componentFramework::ServiceContainer |
| using rtctk::exampleDataTask::Computation::ServiceContainer = rtctk::componentFramework::ServiceContainer |
| using rtctk::exampleDataTask::Computation::ServiceContainer = rtctk::componentFramework::ServiceContainer |
| rtctk::exampleDataTask::Computation::Computation | ( | ServiceContainer & | services, |
| ResultIf & | publisher, | ||
| const std::string & | shm_name, | ||
| size_t | to_read, | ||
| size_t | to_skip, | ||
| std::chrono::milliseconds | sample_timeout, | ||
| std::optional< numapp::NumaPolicies > | thread_policies, | ||
| size_t | n_slopes, | ||
| size_t | n_modes, | ||
| size_t | gpu ) |
| rtctk::exampleDataTask::Computation::~Computation | ( | ) |
| rtctk::exampleDataTask::Computation::Computation | ( | ServiceContainer & | services, |
| ResultIf & | publisher, | ||
| const std::string & | shm_name, | ||
| size_t | to_read, | ||
| size_t | to_skip, | ||
| std::chrono::milliseconds | sample_timeout, | ||
| std::optional< numapp::NumaPolicies > | thread_policies ) |
| rtctk::exampleDataTask::Computation::~Computation | ( | ) |
|
inline |
| rtctk::exampleDataTask::Computation::Computation | ( | ServiceContainer & | services, |
| ResultIf & | publisher, | ||
| const std::string & | shm_name, | ||
| size_t | to_read, | ||
| size_t | to_skip, | ||
| std::chrono::milliseconds | sample_timeout, | ||
| std::optional< numapp::NumaPolicies > | thread_policies, | ||
| size_t | n_slopes, | ||
| size_t | n_modes ) |
| rtctk::exampleDataTask::Computation::~Computation | ( | ) |
| Computation::Result & rtctk::exampleDataTask::Computation::ComputeSync | ( | Algorithm | algorithm | ) |
One way to make result available to BusinessLogic is to return a reference here.
|
inline |
| void rtctk::exampleDataTask::Computation::SetSlopesToModesMatrix | ( | MatrixBuffer< float > && | s2m_matrix | ) |
| void rtctk::exampleDataTask::Computation::SetSlopesToModesMatrix | ( | MatrixBuffer< float > && | s2m_matrix | ) |