Turi Create  4.0
turi::neural_net::GrandCentralDispatchQueue Class Reference

Concrete TaskQueue implementation wrapping Grand Central Dispatch/. More...

#include <ml/neural_net/GrandCentralDispatchQueue.hpp>

Public Member Functions

void DispatchAsync (std::function< void()> task) override
 
void DispatchSync (std::function< void()> task) override
 
void DispatchApply (size_t n, std::function< void(size_t i)> task) override
 

Detailed Description

Concrete TaskQueue implementation wrapping Grand Central Dispatch/.

Definition at line 18 of file GrandCentralDispatchQueue.hpp.

Member Function Documentation

◆ DispatchApply()

void turi::neural_net::GrandCentralDispatchQueue::DispatchApply ( size_t  n,
std::function< void(size_t i)>  task 
)
overridevirtual

Submits a function to this task queue n times, with arguments ranging from 0 to n - 1. When dispatched to a concurrent queue, the function must be reentrant. Rethrows the first exception thrown by any task invocation.

Implements turi::neural_net::TaskQueue.

◆ DispatchAsync()

void turi::neural_net::GrandCentralDispatchQueue::DispatchAsync ( std::function< void()>  task)
overridevirtual

Submits a function to this task queue without waiting for the function to finish. The task must not throw an exception.

Implements turi::neural_net::TaskQueue.

◆ DispatchSync()

void turi::neural_net::GrandCentralDispatchQueue::DispatchSync ( std::function< void()>  task)
overridevirtual

Submits a function to this task queue and waits for the function to execute. The task must not throw an exception.

Implements turi::neural_net::TaskQueue.


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