#[repr(C)]pub struct starpu_perfmodel {Show 17 fields
pub type_: starpu_perfmodel_type,
pub cost_function: Option<unsafe extern "C" fn(arg1: *mut starpu_task, nimpl: c_uint) -> f64>,
pub arch_cost_function: Option<unsafe extern "C" fn(arg1: *mut starpu_task, arch: *mut starpu_perfmodel_arch, nimpl: c_uint) -> f64>,
pub worker_cost_function: Option<unsafe extern "C" fn(arg1: *mut starpu_task, workerid: c_uint, nimpl: c_uint) -> f64>,
pub size_base: Option<unsafe extern "C" fn(arg1: *mut starpu_task, nimpl: c_uint) -> usize>,
pub footprint: Option<unsafe extern "C" fn(arg1: *mut starpu_task) -> u32>,
pub symbol: *const c_char,
pub path: *mut c_char,
pub is_loaded: c_uint,
pub benchmarking: c_uint,
pub is_init: c_uint,
pub parameters: Option<unsafe extern "C" fn(task: *mut starpu_task, parameters: *mut f64)>,
pub parameters_names: *mut *const c_char,
pub nparameters: c_uint,
pub combinations: *mut *mut c_uint,
pub ncombinations: c_uint,
pub state: starpu_perfmodel_state_t,
}Expand description
Contain all information about a performance model. At least the type and symbol fields have to be filled when defining a performance model for a codelet. For compatibility, make sure to initialize the whole structure to zero, either by using explicit memset, or by letting the compiler implicitly do it in e.g. static storage case. If not provided, other fields have to be zero.
Fields§
§type_: starpu_perfmodel_typetype of performance model
- ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED: No other fields needs to be provided, this is purely history-based.
- ::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields starpu_perfmodel::nparameters (number of different parameters), starpu_perfmodel::ncombinations (number of parameters combinations-tuples) and table starpu_perfmodel::combinations which defines exponents of the equation. Function cl_perf_func also needs to define how to extract parameters from the task.
- ::STARPU_PER_ARCH: either field starpu_perfmodel::arch_cost_function has to be filled with a function that returns the cost in micro-seconds on the arch given as parameter, or field starpu_perfmodel::per_arch has to be filled with functions which return the cost in micro-seconds.
- ::STARPU_COMMON: field starpu_perfmodel::cost_function has to be filled with a function that returns the cost in micro-seconds on a CPU, timing on other archs will be determined by multiplying by an arch-specific factor.
cost_function: Option<unsafe extern "C" fn(arg1: *mut starpu_task, nimpl: c_uint) -> f64>Used by ::STARPU_COMMON. Take a task and implementation number, and must return a task duration estimation in micro-seconds.
arch_cost_function: Option<unsafe extern "C" fn(arg1: *mut starpu_task, arch: *mut starpu_perfmodel_arch, nimpl: c_uint) -> f64>Used by ::STARPU_PER_ARCH. Take a task, an arch and implementation number, and must return a task duration estimation in micro-seconds on that arch.
worker_cost_function: Option<unsafe extern "C" fn(arg1: *mut starpu_task, workerid: c_uint, nimpl: c_uint) -> f64>Used by ::STARPU_PER_WORKER. Take a task, a worker id and implementation number, and must return a task duration estimation in micro-seconds on that worker.
size_base: Option<unsafe extern "C" fn(arg1: *mut starpu_task, nimpl: c_uint) -> usize>Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and
::STARPU_NL_REGRESSION_BASED. If not
footprint: Option<unsafe extern "C" fn(arg1: *mut starpu_task) -> u32>Used by ::STARPU_HISTORY_BASED. If not
symbol: *const c_charsymbol name for the performance model, which will be used as file name to store the model. It must be set otherwise the model will be ignored.
path: *mut c_charname of the file storing the performance model. It is non NULL if the model has been loaded or stored in a file.
is_loaded: c_uint\private Whether the performance model is already loaded from the disk.
benchmarking: c_uint\private
is_init: c_uint\private
parameters: Option<unsafe extern "C" fn(task: *mut starpu_task, parameters: *mut f64)>§parameters_names: *mut *const c_char\private Names of parameters used for multiple linear regression models (M, N, K)
nparameters: c_uint\private Number of parameters used for multiple linear regression models
combinations: *mut *mut c_uint\private Table of combinations of parameters (and the exponents) used for multiple linear regression models
ncombinations: c_uint\private Number of combination of parameters used for multiple linear regression models
state: starpu_perfmodel_state_t\private
Trait Implementations§
Source§impl Clone for starpu_perfmodel
impl Clone for starpu_perfmodel
Source§fn clone(&self) -> starpu_perfmodel
fn clone(&self) -> starpu_perfmodel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more