treelite
Variables
main_template.h File Reference

template for main function More...

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

Go to the source code of this file.

Variables

const char * main_start_template
 
const char * main_end_multiclass_template
 
const char * main_end_template
 

Detailed Description

template for main function

Copyright (c) 2018 by Contributors

Author
Philip Cho

Definition in file main_template.h.

Variable Documentation

const char* main_end_multiclass_template
Initial value:
=
R"TREELITETEMPLATE(
for (int i = 0; i < {num_output_group}; ++i) {{
result[i] = sum[i]{optional_average_field} + (float)({global_bias});
}}
if (!pred_margin) {{
return pred_transform(result);
}} else {{
return {num_output_group};
}}
}}
)TREELITETEMPLATE"

Definition at line 35 of file main_template.h.

const char* main_end_template
Initial value:
=
R"TREELITETEMPLATE(
sum = sum{optional_average_field} + (float)({global_bias});
if (!pred_margin) {{
return pred_transform(sum);
}} else {{
return sum;
}}
}}
)TREELITETEMPLATE"

Definition at line 48 of file main_template.h.

const char* main_start_template
Initial value:
=
R"TREELITETEMPLATE(
#include "header.h"
const unsigned char is_categorical[] = {{
{array_is_categorical}
}};
{get_num_output_group_function_signature} {{
return {num_output_group};
}}
{get_num_feature_function_signature} {{
return {num_feature};
}}
{pred_transform_function}
{predict_function_signature} {{
)TREELITETEMPLATE"

Definition at line 15 of file main_template.h.