!6427 emergency remove std

Merge pull request !6427 from wangzhe/master
This commit is contained in:
mindspore-ci-bot 2020-09-17 20:08:06 +08:00 committed by Gitee
commit 788ff3366f
2 changed files with 8 additions and 8 deletions

View File

@ -137,13 +137,13 @@ typedef struct MSTensor {
/// \return Byte size of data in MSTensor.
size_t Size() const;
static void *operator new(std::size_t sz);
static void *operator new(size_t sz);
static void *operator new[](std::size_t sz);
static void *operator new[](size_t sz);
static void operator delete(void *ptr, std::size_t sz);
static void operator delete(void *ptr, size_t sz);
static void operator delete[](void *ptr, std::size_t sz);
static void operator delete[](void *ptr, size_t sz);
} MSTensor;
MSTensor *CreateTensor(TypeId data_type, const ShapeVector &shape);

View File

@ -204,16 +204,16 @@ int MSTensor::ElementsC4Num() const {
return result;
}
void *MSTensor::operator new(std::size_t sz) {
void *MSTensor::operator new(size_t sz) {
void *storage = malloc(sz);
return storage;
}
void *MSTensor::operator new[](std::size_t sz) {
void *MSTensor::operator new[](size_t sz) {
void *storage = malloc(sz);
return storage;
}
void MSTensor::operator delete(void *ptr, std::size_t sz) { free(ptr); }
void MSTensor::operator delete(void *ptr, size_t sz) { free(ptr); }
void MSTensor::operator delete[](void *ptr, std::size_t sz) { free(ptr); }
void MSTensor::operator delete[](void *ptr, size_t sz) { free(ptr); }