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

compile on Mac OSX #38

Merged
merged 1 commit into from
Sep 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/storage/cpu_device_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ class CPUDeviceStorage {
}; // class CPUDeviceStorage

inline void* CPUDeviceStorage::Alloc(size_t size) {
#ifdef __APPLE__
return CHECK_NOTNULL(malloc(size));
#elif _MSC_VER
return CHECK_NOTNULL(_aligned_malloc(size, alignment_));
#else
return CHECK_NOTNULL(memalign(alignment_, size));
#endif
}

inline void CPUDeviceStorage::Free(void* ptr) { free(ptr); }
Expand Down