Skip to content
Snippets Groups Projects
Commit e73e7e36 authored by Moritz Hanke's avatar Moritz Hanke
Browse files

adds support for yac_weight_file_on_exit to instance.c

parent 55e80653
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,7 @@ struct src_field_config {
struct yac_interp_stack_config * interp_stack;
const char * weight_file_name;
enum yac_weight_file_on_existing weight_file_on_existing;
struct field_config_event_data event_data;
};
......@@ -230,6 +231,7 @@ static struct src_field_config get_src_interp_config(
couple_config, couple_idx, field_couple_idx))?
yac_couple_config_get_weight_file_name(
couple_config, couple_idx, field_couple_idx):NULL,
.weight_file_on_existing = YAC_WEIGHT_FILE_ON_EXISTING_DEFAULT_VALUE,
.event_data = empty_event_data,
};
}
......@@ -345,6 +347,10 @@ compare_field_config_interp_method(const void * a, const void * b) {
(ret = strcmp(a_->src_interp_config.weight_file_name,
b_->src_interp_config.weight_file_name))) return ret;
if ((a_->src_interp_config.weight_file_name != NULL) &&
(ret = (int)(a_->src_interp_config.weight_file_on_existing) -
(int)(b_->src_interp_config.weight_file_on_existing))) return ret;
return
yac_interp_stack_config_compare(
a_->src_interp_config.interp_stack,
......@@ -1183,7 +1189,7 @@ static void generate_interpolations(
curr_field_config->src_interp_config.weight_file_name,
curr_comp_grid_pair->config[src_comp_idx].grid_name,
curr_comp_grid_pair->config[src_comp_idx^1].grid_name,
0, 0, YAC_WEIGHT_FILE_ON_EXISTING_DEFAULT_VALUE);
0, 0, curr_field_config->src_interp_config.weight_file_on_existing);
}
// if the current weight reorder method differs from the previous
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment