Processing Plugins

get_processing_plugin_count

int fluxEngine_C_v1_get_processing_plugin_count(fluxEngine_C_v1_Handle *handle, size_t *count, fluxEngine_C_v1_Error **error)

Get the number of processing plugins that were loaded by fluxEngine.

During startup fluxEngine will automatically load any processing plugin it can find in a path adjacent to where the fluxEngine DLLs are installed. Any plugin that is found is attempted to be loaded.

Plugins may provide additional functionality to fluxEngine, or they may provide implementations of algorithms that are optimized for specific devices, for example specific CPU instruction sets.

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

Parameters:
  • handle – The fluxEngine handle

  • count[out] The number of plugins that were loaded

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure

processing_plugin_get_id

int fluxEngine_C_v1_processing_plugin_get_id(fluxEngine_C_v1_Handle *handle, size_t index, char **id, fluxEngine_C_v1_Error **error)

Get the id of a processing plugin.

For a given processing plugin identified by index, which must run from 0 to one less than the count returned by fluxEngine_C_v1_get_processing_plugin_count(), return the id of that plugin.

The id will be a UUID that is encoded as a string.

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

  • fluxEngine_C_v1_ErrorCode_IndexOutOfRange

Parameters:
  • handle – The fluxEngine handle

  • index – The index of the plugin, must be between 0 and one less than the total number of plugins. The index will remain stable for the lifetime of the fluxEngine handle

  • id[out] The id of the processing plugin. It must be freed via fluxEngine_C_v1_string_free() by the user.

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure

processing_plugin_get_name

int fluxEngine_C_v1_processing_plugin_get_name(fluxEngine_C_v1_Handle *handle, size_t index, char **name, fluxEngine_C_v1_Error **error)

Get the name of a processing plugin.

For a given processing plugin identified by index, which must run from 0 to one less than the count returned by fluxEngine_C_v1_get_processing_plugin_count(), return a human-readable name of that plugin.

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

  • fluxEngine_C_v1_ErrorCode_IndexOutOfRange

Parameters:
  • handle – The fluxEngine handle

  • index – The index of the plugin, must be between 0 and one less than the total number of plugins. The index will remain stable for the lifetime of the fluxEngine handle

  • name[out] The name of the processing plugin. It must be freed via fluxEngine_C_v1_string_free() by the user.

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure

processing_plugin_get_available

int fluxEngine_C_v1_processing_plugin_get_available(fluxEngine_C_v1_Handle *handle, size_t index, bool *available, fluxEngine_C_v1_Error **error)

Check if a processing plugin is available.

For a given processing plugin identified by index, which must run from 0 to one less than the count returned by fluxEngine_C_v1_get_processing_plugin_count(), determine if the plugin is available on this system.

A plugin may not be available on the current system due to an incompatibility. For example, a plugin that provides an AVX2 implementation will not be available on a CPU that doesn’t support AVX2, or on an operating system that doesn’t support it, even if the CPU does.

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

  • fluxEngine_C_v1_ErrorCode_IndexOutOfRange

Parameters:
  • handle – The fluxEngine handle

  • index – The index of the plugin, must be between 0 and one less than the total number of plugins. The index will remain stable for the lifetime of the fluxEngine handle

  • available[out] Whether the plugin is available

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure

processing_plugin_get_enabled

int fluxEngine_C_v1_processing_plugin_get_enabled(fluxEngine_C_v1_Handle *handle, size_t index, bool *enabled, fluxEngine_C_v1_Error **error)

Check if a processing plugin is enabled.

For a given processing plugin identified by index, which must run from 0 to one less than the count returned by fluxEngine_C_v1_get_processing_plugin_count(), determine if the plugin is currently enabled.

All plugins are enabled by default, but if a plugin is not available (e.g. a plugin that provides an AVX2 implementation is not available on a CPU that doesn’t support AVX2), the fact that the plugin is enabled will have no effect. See fluxEngine_C_v1_processing_plugin_get_available() to check if a plugin is available.

Plugins are only disabled if they are explicitly disabled by the user.

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

  • fluxEngine_C_v1_ErrorCode_IndexOutOfRange

Parameters:
  • handle – The fluxEngine handle

  • index – The index of the plugin, must be between 0 and one less than the total number of plugins. The index will remain stable for the lifetime of the fluxEngine handle

  • enabled[out] Whether the plugin is enabled

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure

processing_plugin_set_enabled

int fluxEngine_C_v1_processing_plugin_set_enabled(fluxEngine_C_v1_Handle *handle, size_t index, bool enabled, fluxEngine_C_v1_Error **error)

Enable or disable a processing plugin.

For a given processing plugin identified by index, which must run from 0 to one less than the count returned by fluxEngine_C_v1_get_processing_plugin_count(), enable or disable it.

All plugins are enabled by default, but if a plugin is not available (e.g. a plugin that provides an AVX2 implementation is not available on a CPU that doesn’t support AVX2), the fact that the plugin is enabled will have no effect. See fluxEngine_C_v1_processing_plugin_get_available() to check if a plugin is available.

Plugins are only disabled if they are explicitly disabled by the user by this method.

If processing contexts have already been created a call to this function will have no effect on the already existing contexts, it will only affect newly created contexts. (The old contexts will still work though.)

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

  • fluxEngine_C_v1_ErrorCode_IndexOutOfRange

Parameters:
  • handle – The fluxEngine handle

  • index – The index of the plugin, must be between 0 and one less than the total number of plugins. The index will remain stable for the lifetime of the fluxEngine handle

  • enabled – Whether the plugin should be enabled

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure

get_processing_plugin_index_by_id

int fluxEngine_C_v1_get_processing_plugin_index_by_id(fluxEngine_C_v1_Handle *handle, char const *id, size_t *index, fluxEngine_C_v1_Error **error)

Find a processing plugin based on its id.

Attempt to determine the index of a processing plugin that has a specific id that was specified by the user.

The following specific error codes may be returned by this function:

  • fluxEngine_C_v1_ErrorCode_Unknown

  • fluxEngine_C_v1_ErrorCode_AllocationFailure

  • fluxEngine_C_v1_ErrorCode_InvalidArgument

Parameters:
  • handle – The fluxEngine handle

  • id – The of the plugin to search for, must be parseable as a UUID

  • index[out] The index of the plugin, which may be used to address the plugin using the other plugin related functions.

  • error[out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.

Returns:

0 on success, -1 on failure