RoveComm C++ 3.0.0
Welcome to the RoveComm C++ repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of RoveComm C++. The RoveComm C++ project is the RoveComm interface for high level systems and should not be used for microcontrollers.
Loading...
Searching...
No Matches
BS::loop_task< T, F > Struct Template Reference

A function object class used by detach_loop() and submit_loop() to execute a loop function over a specified range of indices. More...

#include <BS_thread_pool.hpp>

Public Member Functions

void operator() ()

Public Attributes

std::shared_ptr< std::decay_t< F > > loop_ptr
T start
T end

Detailed Description

template<typename T, typename F>
struct BS::loop_task< T, F >

A function object class used by detach_loop() and submit_loop() to execute a loop function over a specified range of indices.

Template Parameters
TThe type of the indices.
FThe type of the function.

Member Function Documentation

◆ operator()()

template<typename T, typename F>
void BS::loop_task< T, F >::operator() ( )
inline
693 {
694 for (T i = start; i < end; ++i)
695 (*loop_ptr)(i);
696 }
A function object class used by detach_loop() and submit_loop() to execute a loop function over a spe...
Definition BS_thread_pool.hpp:691
T end
Definition BS_thread_pool.hpp:700
std::shared_ptr< std::decay_t< F > > loop_ptr
Definition BS_thread_pool.hpp:698
T start
Definition BS_thread_pool.hpp:699

Member Data Documentation

◆ end

template<typename T, typename F>
T BS::loop_task< T, F >::end

◆ loop_ptr

template<typename T, typename F>
std::shared_ptr<std::decay_t<F> > BS::loop_task< T, F >::loop_ptr

◆ start

template<typename T, typename F>
T BS::loop_task< T, F >::start

The documentation for this struct was generated from the following file: