class nbla::SyncedArrayCallback

class SyncedArrayCallback

Singleton class to store a callback function for get, cast, and clear of SyncedArray.

Public Functions

bool empty()

Check if callback function is not set.

void set_callback_func(synced_array_callback_func_type f)

Set a callback function.

void call_callback(SyncedArrayPtr saptr, const SyncedArrayCallbackTag func_name, const dtypes dtype, const Context &ctx, const bool write_only, const bool first_creation, const bool off_recording)

Call callback.