提交 cfde85bc 编写于 作者: Y yangyaming

CallBack --> Callback

上级 cfad83ce
...@@ -110,7 +110,7 @@ public: ...@@ -110,7 +110,7 @@ public:
function2_(FunctionBase::funcRegistrar_.createByType(name2)) { function2_(FunctionBase::funcRegistrar_.createByType(name2)) {
function1_->init(config); function1_->init(config);
function2_->init(config); function2_->init(config);
initArgsCallBack_ = nullptr; initArgsCallback_ = nullptr;
} }
~Compare2Function() {} ~Compare2Function() {}
...@@ -171,8 +171,8 @@ public: ...@@ -171,8 +171,8 @@ public:
*seq2_)); *seq2_));
} }
void registerInitCallBack(std::function<void(BufferArg&, size_t)> callback) { void registerInitCallback(std::function<void(BufferArg&, size_t)> callback) {
initArgsCallBack_ = callback; initArgsCallback_ = callback;
} }
// output need only contains shape, do not contains data. // output need only contains shape, do not contains data.
...@@ -345,8 +345,8 @@ protected: ...@@ -345,8 +345,8 @@ protected:
initArg(*func1Inputs_[i]); initArg(*func1Inputs_[i]);
} }
if (initArgsCallBack_ != nullptr) { if (initArgsCallback_ != nullptr) {
initArgsCallBack_(*func1Inputs_[i], i); initArgsCallback_(*func1Inputs_[i], i);
} }
copyArg_(*func1Inputs_[i], *func2Inputs_[i]); copyArg_(*func1Inputs_[i], *func2Inputs_[i]);
...@@ -395,7 +395,7 @@ protected: ...@@ -395,7 +395,7 @@ protected:
std::shared_ptr<SequenceIdArg> seq1_; std::shared_ptr<SequenceIdArg> seq1_;
std::shared_ptr<SequenceIdArg> seq2_; std::shared_ptr<SequenceIdArg> seq2_;
test::CopyArgument<DType1, DType2> copyArg_; test::CopyArgument<DType1, DType2> copyArg_;
std::function<void(BufferArg&, size_t)> initArgsCallBack_; std::function<void(BufferArg&, size_t)> initArgsCallback_;
}; };
class CpuGpuFuncCompare class CpuGpuFuncCompare
......
...@@ -16,13 +16,6 @@ limitations under the License. */ ...@@ -16,13 +16,6 @@ limitations under the License. */
#include "FunctionTest.h" #include "FunctionTest.h"
namespace paddle { namespace paddle {
/*
for (size_t numSamples : {5, 32}) {
for (size_t channels : {5, 5, 32}) {
for (size_t imgSizeH : {5, 33, 100}) {
for (size_t imgSizeW : {5, 32, 96}) {
for (real value : {-0.5, 0.0, 0.5}) {
*/
TEST(MulValue, real) { TEST(MulValue, real) {
for (size_t numSamples : {5, 32}) { for (size_t numSamples : {5, 32}) {
...@@ -46,7 +39,7 @@ TEST(MulValue, real) { ...@@ -46,7 +39,7 @@ TEST(MulValue, real) {
compare.addInputs(BufferArg(VALUE_TYPE_FLOAT, shape)); compare.addInputs(BufferArg(VALUE_TYPE_FLOAT, shape));
compare.addInputs(BufferArg(VALUE_TYPE_FLOAT, indicesShape)); compare.addInputs(BufferArg(VALUE_TYPE_FLOAT, indicesShape));
compare.registerInitCallBack([=](BufferArg& arg, size_t index) { compare.registerInitCallback([=](BufferArg& arg, size_t index) {
if (index == 1) { if (index == 1) {
real* data = (real*)arg.data(); real* data = (real*)arg.data();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册