Files
incubator-mxnet/cpp-package/include/mxnet-cpp/base.h
T
Eric Junyuan Xie ed190957bb Refactor Stateful operator and custom op (#6928)
* refactor create layer

* fix

* refactor custom op

* fix

* fix

* fix

* fix

* fix OpState

* remove superfluous infershape

* fix

* fix

* fix lint

* fix

* fix

* fix

* Update CMakeLists.txt

* delete

* fix

* fix scala
2017-07-12 10:04:40 -07:00

39 lines
739 B
C++

/*!
* Copyright (c) 2016 by Contributors
* \file base.h
* \brief base definitions for mxnetcpp
* \author Chuntao Hong, Zhang Chen
*/
#ifndef MXNET_CPP_BASE_H_
#define MXNET_CPP_BASE_H_
#include <cstdlib>
#include "mxnet/c_api.h"
#include "nnvm/c_api.h"
namespace mxnet {
namespace cpp {
typedef unsigned index_t;
enum OpReqType {
/*! \brief no operation, do not write anything */
kNullOp,
/*! \brief write gradient to provided space */
kWriteTo,
/*!
* \brief perform an inplace write,
* Target shares memory with one of input arguments.
* This option only happen when
*/
kWriteInplace,
/*! \brief add to the provided space */
kAddTo
};
} // namespace cpp
} // namespace mxnet
#endif // MXNET_CPP_BASE_H_