From cTuning.org

Jump to: navigation, search
Navigation: cTuning.org > CTools > ICI


Accessing parameters

Declaration

is done in file gcc/params.def using the macro DEFPARAM and includes the following elements:

  • symbolic name of the parameter (used to create an element of the enumerated type), usually of the form PARAM_<some_descriptive_name>
  • command-line name of the parameter
  • plain text description of the parameter
  • default value
  • minimum value
  • maximum value (if equal to the minimum, no range is defined)

Access

Getting the value can be done

  • through the macro PARAM_VALUE(<param_name>)
  • through the shorthand without the PARAM_ prefix, defined in params.h
  • through global variables holding the initial value of the parameters (see, e.g., PARAM_AVG_ALIASED_VOPS, AVG_ALIASED_VOPS and initial_avg_aliased_vops.

Parameter values for a given parameter named <name> can be set

  • from command line using --param <name>=<value>
  • in the code, by calling set_param_value ("<name>", <value>);
Locations of visitors to this page