treelite
Macros
pred_transform.cc File Reference

Library of transform functions to convert margins into predictions. More...

#include <treelite/tree.h>
#include <string>
#include <unordered_map>
#include "pred_transform.h"
#include "./native/pred_transform.h"
Include dependency graph for pred_transform.cc:

Go to the source code of this file.

Macros

#define PRED_TRANSFORM_FUNC(name)   {#name, &(name)}
 
#define TREELITE_PRED_TRANSFORM_REGISTRY_DEFAULT_TEMPLATE(FUNC_NAME)
 

Detailed Description

Library of transform functions to convert margins into predictions.

Copyright 2017 by Contributors

Author
Philip Cho

Definition in file pred_transform.cc.

Macro Definition Documentation

#define TREELITE_PRED_TRANSFORM_REGISTRY_DEFAULT_TEMPLATE (   FUNC_NAME)
Value:
std::string \
FUNC_NAME(const std::string& backend, const Model& model) { \
if (backend == "native") { \
return treelite::compiler::native::pred_transform::FUNC_NAME(model); \
} else { \
LOG(FATAL) << "Unrecognized backend: " << backend; \
return std::string(); \
} \
}

Definition at line 24 of file pred_transform.cc.