Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
bgawrych committed Aug 10, 2020
1 parent 711b9f6 commit a3e9fec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ inline int GetDefaultDtype(int dtype) {
inline bool AlignedMemAlloc(void** ptr, size_t size, size_t alignment) {
#if _MSC_VER
*ptr = _aligned_malloc(size, alignment);
if(*ptr == nullptr)
if (*ptr == nullptr)
return false;
#else
int res = posix_memalign(ptr, alignment, size);
Expand Down
2 changes: 1 addition & 1 deletion src/storage/storage_manager_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ContextHelperCPU : public ContextHelper {

void Free(void *dptr) const override {
mxnet::common::AlignedMemFree(dptr);
}
}

private:
#if MXNET_USE_MKLDNN == 1
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/storage/storage_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TEST(Storage, CPU_MemAlign) {
auto&& storage = mxnet::Storage::Get();
mxnet::Context context_cpu = mxnet::Context::CPU(0);

for(int i=0; i < 5; ++i) {
for (int i = 0; i < 5; ++i) {
const size_t kSize = (std::rand() % 1024) + 1;
auto&& handle = storage->Alloc(kSize, context_cpu);
EXPECT_EQ(handle.ctx, context_cpu);
Expand Down

0 comments on commit a3e9fec

Please sign in to comment.