1 #ifndef CAFFE2_OPERATORS_FLOOR_OP_H_ 2 #define CAFFE2_OPERATORS_FLOOR_OP_H_ 4 #include "caffe2/core/common_omp.h" 5 #include "caffe2/core/context.h" 6 #include "caffe2/core/logging.h" 7 #include "caffe2/core/operator.h" 11 template <
typename T,
class Context>
14 USE_OPERATOR_CONTEXT_FUNCTIONS;
17 bool RunOnDevice()
override {
22 const float* Xdata = X.template data<float>();
23 float* Ydata = Y->template mutable_data<float>();
24 for (
int i = 0; i < X.size(); ++i) {
25 Ydata[i] = std::floor(Xdata[i]);
33 #endif // CAFFE2_OPERATORS_FLOOR_OP_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...