mirror of
https://github.com/RustyRaptor/incubator-mxnet.git
synced 2026-12-04 00:05:18 -07:00
* Copy mxnet.cpp to cpp-package sub directory * Add missing type name declaration for nnvm::Tuple<dmlc::optional<int>> * Add trigger to update operation wrapper in cpp package when building mxnet * Add test to travis scripts * Disable op generation on windows
39 lines
733 B
C++
39 lines
733 B
C++
/*!
|
|
* Copyright (c) 2016 by Contributors
|
|
* \file base.h
|
|
* \brief base definitions for mxnetcpp
|
|
* \author Chuntao Hong, Zhang Chen
|
|
*/
|
|
|
|
#ifndef MXNETCPP_BASE_H
|
|
#define MXNETCPP_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 // MXNETCPP_BASE_H
|