瀏覽代碼

fixing weird architectural bug

Nicolas Winkler 5 年之前
父節點
當前提交
c37c3e2a68
共有 2 個文件被更改,包括 7 次插入9 次删除
  1. 6 8
      libmandel/CMakeLists.txt
  2. 1 1
      libmandel/include/Fixed.h

+ 6 - 8
libmandel/CMakeLists.txt

@@ -89,6 +89,7 @@ if(OPENCL_FOUND)
         ${OpenCL_INCLUDE_DIRS}
     )
     link_directories(${OpenCL_LIBRARY})
+    target_link_libraries(mandel PUBLIC OpenCL::OpenCL)
 else(OPENCL_FOUND)
     include_directories("include")
 endif(OPENCL_FOUND)
@@ -97,6 +98,11 @@ if (APPLE AND OpenCL_FOUND)
     SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -framework OpenCL")
 endif()
 
+
+if(OpenMP_CXX_FOUND)
+    target_link_libraries(mandel PUBLIC OpenMP::OpenMP_CXX)
+endif()
+
 if(Boost_FOUND)
     target_compile_definitions(mandel PUBLIC WITH_BOOST)
     target_include_directories(mandel PUBLIC ${Boost_INCLUDE_DIRS})
@@ -126,11 +132,3 @@ if (ARCH STREQUAL "X86_64" OR ARCH STREQUAL "X86")
 elseif(ARCH STREQUAL "ARM")
     set_source_files_properties(src/CpuGeneratorsNeon.cpp PROPERTIES COMPILE_FLAGS -march=armv8-a+simd)
 endif()
-
-
-if(OpenMP_CXX_FOUND)
-    target_link_libraries(mandel PUBLIC OpenMP::OpenMP_CXX)
-endif()
-if(OpenCL_FOUND)
-    target_link_libraries(mandel PUBLIC OpenCL::OpenCL)
-endif()

+ 1 - 1
libmandel/include/Fixed.h

@@ -116,7 +116,7 @@ struct Fixed512
 
     inline Fixed512(double val)
     {
-        body = Once{ boost::multiprecision::pow(Float256{ 2 }, 512 - 32) * val };
+        body = Once{ boost::multiprecision::pow(Float512{ 2 }, 512 - 32) * val };
     }
 
     inline operator Float256(void) const {