Skip to content

Commit

Permalink
Added : ability to select memory access mode externally (on command l…
Browse files Browse the repository at this point in the history
…ine for example)
  • Loading branch information
Cyan4973 committed Aug 19, 2015
1 parent 9ffb7e2 commit 87e6ba0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xxhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ You can contact the author at :
* See http://stackoverflow.com/a/32095106/646947 for details.
* Prefer these methods in priority order (0 > 1 > 2)
*/
#if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
# define XXH_FORCE_MEMORY_ACCESS 2
#elif defined(__INTEL_COMPILER) || \
#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */
# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
# define XXH_FORCE_MEMORY_ACCESS 2
# elif defined(__INTEL_COMPILER) || \
(defined(__GNUC__) && ( defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) ))
# define XXH_FORCE_MEMORY_ACCESS 1
# define XXH_FORCE_MEMORY_ACCESS 1
# endif
#endif

/* XXH_ACCEPT_NULL_INPUT_POINTER :
Expand Down

0 comments on commit 87e6ba0

Please sign in to comment.