treelite
Classes | Macros
compiler.h File Reference

Interface of compiler that compiles a tree ensemble model. More...

#include <dmlc/registry.h>
#include <treelite/common.h>
#include <unordered_map>
#include <functional>
#include <memory>
#include <string>
Include dependency graph for compiler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CompiledModel
 
class  Compiler
 interface of compiler More...
 
struct  CompilerReg
 Registry entry for compiler. More...
 

Macros

#define TREELITE_REGISTER_COMPILER(UniqueId, Name)
 Macro to register compiler. More...
 

Detailed Description

Interface of compiler that compiles a tree ensemble model.

Copyright 2017 by Contributors

Author
Philip Cho

Definition in file compiler.h.

Macro Definition Documentation

◆ TREELITE_REGISTER_COMPILER

#define TREELITE_REGISTER_COMPILER (   UniqueId,
  Name 
)
Value:
static DMLC_ATTRIBUTE_UNUSED ::treelite::CompilerReg & \
__make_ ## CompilerReg ## _ ## UniqueId ## __ = \
::dmlc::Registry< ::treelite::CompilerReg>::Get()->__REGISTER__(Name)

Macro to register compiler.

// example of registering the simple compiler
TREELITE_REGISTER_COMPILER(SimpleCompiler, "simple")
.describe("Bare-bones simple compiler")
.set_body([]() {
return new SimpleCompiler();
});

Definition at line 72 of file compiler.h.