Shortcuts

executor.h

typedef mmdeploy_value_t (*mmdeploy_then_fn_t)(mmdeploy_value_t, void*)
typedef mmdeploy_value_t (*mmdeploy_then_fn_v2_t)(mmdeploy_value_t*, void*)
typedef int (*mmdeploy_then_fn_v3_t)(mmdeploy_value_t *input, mmdeploy_value_t *output, void*)
typedef struct mmdeploy_sender *mmdeploy_sender_t
typedef struct mmdeploy_scheduler *mmdeploy_scheduler_t
typedef mmdeploy_sender_t (*mmdeploy_let_value_fn_t)(mmdeploy_value_t, void*)
mmdeploy_scheduler_t mmdeploy_executor_inline()
mmdeploy_scheduler_t mmdeploy_executor_system_pool()
mmdeploy_scheduler_t mmdeploy_executor_create_thread_pool(int num_threads)

Create a thread pool with the given number of worker threads

Parameters

num_threads[in]

Returns

the handle to the created thread pool

mmdeploy_scheduler_t mmdeploy_executor_create_thread()
mmdeploy_scheduler_t mmdeploy_executor_dynamic_batch(mmdeploy_scheduler_t scheduler, int max_batch_size, int timeout)
int mmdeploy_scheduler_destroy(mmdeploy_scheduler_t scheduler)
mmdeploy_sender_t mmdeploy_sender_copy(mmdeploy_sender_t input)

Create a copy of a copyable sender. Only senders created by mmdeploy_executor_split is copyable for now.

Parameters

input[in] copyable sender,

Returns

the sender created, or nullptr if the sender is not copyable

int mmdeploy_sender_destroy(mmdeploy_sender_t sender)

Destroy a sender, notice that all sender adapters will consume input senders, only unused senders should be destroyed using this function.

Parameters

input[in]

mmdeploy_sender_t mmdeploy_executor_just(mmdeploy_value_t value)

Create a sender that sends the provided value.

Parameters

value[in]

Returns

created sender

mmdeploy_sender_t mmdeploy_executor_schedule(mmdeploy_scheduler_t scheduler)
Parameters

scheduler[in]

Returns

the sender created

mmdeploy_sender_t mmdeploy_executor_transfer_just(mmdeploy_scheduler_t scheduler, mmdeploy_value_t value)
mmdeploy_sender_t mmdeploy_executor_transfer(mmdeploy_sender_t input, mmdeploy_scheduler_t scheduler)

Transfer the execution to the execution agent of the provided scheduler

Parameters
  • input[in]

  • scheduler[in]

Returns

the sender created

mmdeploy_sender_t mmdeploy_executor_on(mmdeploy_scheduler_t scheduler, mmdeploy_sender_t input)
mmdeploy_sender_t mmdeploy_executor_then(mmdeploy_sender_t input, mmdeploy_then_fn_t fn, void *context)
mmdeploy_sender_t mmdeploy_executor_let_value(mmdeploy_sender_t input, mmdeploy_let_value_fn_t fn, void *context)
mmdeploy_sender_t mmdeploy_executor_split(mmdeploy_sender_t input)

Convert the input sender into a sender that is copyable via mmdeploy_sender_copy. Notice that this function doesn’t make the sender multi-shot, it just return a sender that is copyable.

Parameters

input[in]

Returns

the sender that is copyable

mmdeploy_sender_t mmdeploy_executor_when_all(mmdeploy_sender_t inputs[], int32_t n)
mmdeploy_sender_t mmdeploy_executor_ensure_started(mmdeploy_sender_t input)
int mmdeploy_executor_start_detached(mmdeploy_sender_t input)
mmdeploy_value_t mmdeploy_executor_sync_wait(mmdeploy_sender_t input)
int mmdeploy_executor_sync_wait_v2(mmdeploy_sender_t input, mmdeploy_value_t *output)
void mmdeploy_executor_execute(mmdeploy_scheduler_t scheduler, void (*fn)(void*), void *context)
Read the Docs v: stable
Versions
latest
stable
1.x
v1.3.1
v1.3.0
v1.2.0
v1.1.0
v1.0.0
0.x
v0.14.0
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.