C Configuration Space and Tuning Library (CCS)
Loading...
Searching...
No Matches
Functions
feature_space.h File Reference

A feature space is a context (see context.h) defining a set of features represented using CCS parameters (see parameter.h). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ccs_result_t ccs_create_feature_space (const char *name, size_t num_parameters, ccs_parameter_t *parameters, ccs_feature_space_t *feature_space_ret)
 Create a new feature space.
 
ccs_result_t ccs_feature_space_get_default_features (ccs_feature_space_t feature_space, ccs_features_t *features_ret)
 Get the default features of a feature space.
 

Detailed Description

A feature space is a context (see context.h) defining a set of features represented using CCS parameters (see parameter.h).

Function Documentation

◆ ccs_create_feature_space()

ccs_result_t ccs_create_feature_space ( const char *  name,
size_t  num_parameters,
ccs_parameter_t parameters,
ccs_feature_space_t feature_space_ret 
)
extern

Create a new feature space.

Parameters
[in]namepointer to a string that will be copied internally
[in]num_parametersthe number of provided parameters
[in]parametersan array of num_parameters parameters to add to the feature space
[out]feature_space_reta pointer to the variable that will hold the newly created feature space
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_VALUE if name is NULL; or if feature_space_ret is NULL; or if parameters is NULL; or if num_parameters is NULL
CCS_RESULT_ERROR_INVALID_OBJECT if a parameter is not a valid CCS parameter
CCS_RESULT_ERROR_INVALID_PARAMETER if a parameter appears more than once in parameters; or if two or more parameters share the same name; or if a parameter is already part of another context
CCS_RESULT_ERROR_OUT_OF_MEMORY if there was a lack of memory to allocate the new feature space
Remarks
This function is thread-safe

◆ ccs_feature_space_get_default_features()

ccs_result_t ccs_feature_space_get_default_features ( ccs_feature_space_t  feature_space,
ccs_features_t features_ret 
)
extern

Get the default features of a feature space.

Parameters
[in]feature_space
[in]features_reta pointer to a variable that will contain the returned features.
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if feature_space is not a valid CCS feature space
CCS_RESULT_ERROR_INVALID_VALUE if feature_space_ret is NULL
Remarks
This function is thread-safe