Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Fixes for Android API 14 and below.
Browse files Browse the repository at this point in the history
Those version of Android doesn't have posix_memalign
  • Loading branch information
lygstate committed Feb 8, 2017
1 parent 7642202 commit c7aa916
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mshadow/packet-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#include "./tensor.h"
#include "./expression.h"

#if defined(__ANDROID_API__) && __ANDROID_API__ <16
static int posix_memalign(void **memptr, size_t alignment, size_t size) {
*memptr = memalign(alignment, size);
return 0;
}
#endif

namespace mshadow {
/*! \brief namespace of packet math*/
Expand Down

0 comments on commit c7aa916

Please sign in to comment.