remove std

This commit is contained in:
wangzhe 2020-09-17 19:51:58 +08:00
parent fec931c65d
commit 371f5ad2fc
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); }