Apache Singa
A General Distributed Deep Learning Library
|
Factory template to generate class (or a sub-class) object based on id. More...
#include <factory.h>
Static Public Member Functions | |
static void | Register (const ID &id, const std::function< T *(void)> &creator) |
Register functions to create user defined classes. More... | |
static T * | Create (const ID &id) |
create an instance by providing its id More... | |
static const std::vector< ID > | GetIDs () |
Factory template to generate class (or a sub-class) object based on id.
|
inlinestatic |
create an instance by providing its id
id |
|
inlinestatic |
Register functions to create user defined classes.
This function is called by the REGISTER_FACTORY macro.
id | Identifier of the creating function/class |
func | a function that creates a layer instance |