Skip to content

Commit

Permalink
Fixed compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
PENGUINLIONG committed Sep 16, 2022
1 parent 3825bd5 commit 97ebb7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion taichi/program/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ Program::Program(Arch desired_arch) : snode_rw_accessors_bank_(this) {
// For performance considerations and correctness of QuantFloatType
// operations, we force floating-point operations to flush to zero on all
// backends (including CPUs).
#if defined(TI_ARCH_x64) && !(defined(__arm64__) || defined(__aarch64__))
#if !(defined(__arm64__) || defined(__aarch64__))
#if defined(TI_ARCH_x64)
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
#else
// Enforce flush to zero on arm64 CPUs
Expand All @@ -69,6 +70,7 @@ Program::Program(Arch desired_arch) : snode_rw_accessors_bank_(this) {
: "ri"(fpcr | (1 << 24))); // Bit 24 is FZ
__asm__ __volatile__("");
#endif
#endif // !(defined(__arm64__) || defined(__aarch64__))
config = default_compile_config;
config.arch = desired_arch;
// TODO: allow users to run in debug mode without out-of-bound checks
Expand Down

0 comments on commit 97ebb7e

Please sign in to comment.