!6410 clear up codedex of C++

Merge pull request !6410 from lilei/modify_bug
This commit is contained in:
mindspore-ci-bot 2020-09-17 20:09:38 +08:00 committed by Gitee
commit c54c4d644c
4 changed files with 0 additions and 10 deletions

View File

@ -16,7 +16,6 @@
#include "pybind_api/random_normal/philox_generator.h"
namespace mindspore {
void PhiloxGenerator::Jump() {
if ((++counter_[0] == 0) && (++counter_[1] == 0) && (++counter_[2] == 0)) {
++counter_[3];
@ -68,5 +67,4 @@ std::array<uint32_t, gResultNum> PhiloxGenerator::operator()() {
Jump();
return counter_;
}
} // namespace mindspore

View File

@ -20,7 +20,6 @@
#include <array>
namespace mindspore {
static constexpr int gResultNum = 4;
class PhiloxGenerator {
public:
@ -49,7 +48,6 @@ class PhiloxGenerator {
std::array<uint32_t, 2> key_var_;
static constexpr std::array<uint32_t, gResultNum> keyConstant = {0xD2511F53, 0x9E3779B9, 0xCD9E8D57, 0xBB67AE85};
};
} // namespace mindspore
#endif // PYBIND_API_API_IR_RANDOM_NORMAL_PHILOX_GENERATOR_H_

View File

@ -20,7 +20,6 @@
#include "runtime/device/cpu/cpu_device_address.h"
namespace mindspore {
bool InitRandomNormal(float mean, float stddev, std::vector<int64_t> out_shape, int64_t seed,
const py::object &output_tensor) {
if (out_shape.size() == 0) {
@ -53,7 +52,6 @@ bool InitRandomNormal(float mean, float stddev, std::vector<int64_t> out_shape,
threads[thread_num - 1] =
std::thread(mindspore::FillRandoms<mindspore::NormalDistribution<mindspore::PhiloxGenerator, float>>, generator,
offset_ptr, total_count - (thread_num - 1) * batchSize, thread_num - 1);
} else {
threads[0] = std::thread(mindspore::FillRandoms<mindspore::NormalDistribution<mindspore::PhiloxGenerator, float>>,
generator, start_ptr, total_count, 0);
@ -66,5 +64,4 @@ bool InitRandomNormal(float mean, float stddev, std::vector<int64_t> out_shape,
REGISTER_PYBIND_DEFINE(random_normal,
([](py::module *const m) { (void)m->def("random_normal", &InitRandomNormal, "testnormal"); }));
} // namespace mindspore

View File

@ -25,7 +25,6 @@
namespace py = pybind11;
namespace mindspore {
template <class T, typename vartype>
class NormalDistribution;
template <class T>
@ -86,10 +85,8 @@ bool FillRandoms(PhiloxGenerator generator, float *output, int64_t vet_size, int
}
return true;
}
bool InitRandomNormal(float mean, float stddev, std::vector<int64_t> out_shape, int64_t seed,
const py::object &output_tensor);
} // namespace mindspore
#endif // PYBIND_API_API_IR_RANDOM_NORMAL_RANDOM_CPU_KERNEL_H_