diff --git a/graph_framework.xcodeproj/project.pbxproj b/graph_framework.xcodeproj/project.pbxproj index c69db129984c6ee829cc5d76986fbb5460bde980..57c3d1388019a03f8b089d0a41609c86413408c7 100644 --- a/graph_framework.xcodeproj/project.pbxproj +++ b/graph_framework.xcodeproj/project.pbxproj @@ -1941,6 +1941,7 @@ "-lLLVMCGData", "-lLLVMSandboxIR", "-lLLVMObjectYAML", + "-lLLVMPlugins", "-lLLVMFrontendAtomic", "-lclangFrontend", "-lclangBasic", @@ -1950,11 +1951,13 @@ "-lclangSerialization", "-lclangAST", "-lclangSema", + "-lclangAnalysisLifetimeSafety", "-lclangAnalysis", "-lclangASTMatchers", "-lclangSupport", "-lclangParse", "-lclangAPINotes", + "-lclangOptions", "-lclangCodeGen", "-rpath", /usr/local/lib, @@ -2111,6 +2114,7 @@ "-lLLVMCGData", "-lLLVMSandboxIR", "-lLLVMObjectYAML", + "-lLLVMPlugins", "-lLLVMFrontendAtomic", "-lclangFrontend", "-lclangBasic", @@ -2120,11 +2124,13 @@ "-lclangSerialization", "-lclangAST", "-lclangSema", + "-lclangAnalysisLifetimeSafety", "-lclangAnalysis", "-lclangASTMatchers", "-lclangSupport", "-lclangParse", "-lclangAPINotes", + "-lclangOptions", "-lclangCodeGen", "-rpath", /usr/local/lib, diff --git a/graph_framework/special_functions.hpp b/graph_framework/special_functions.hpp index e2da06989d3e0a60565ea5561080c568efcc4127..e250b0a2308c9d53fadd70afc16bf7ce2c10f2d1 100644 --- a/graph_framework/special_functions.hpp +++ b/graph_framework/special_functions.hpp @@ -1505,11 +1505,7 @@ namespace special { T y = imag(z); if (y == static_cast (0)) { -#ifdef CUDA_DEVICE_CODE return complex_type (erf(x), y); -#else - return complex_type (std::erf(x), y); -#endif } else if (x == static_cast (0)) { const T y2 = sq(y); return complex_type (x, y2 > static_cast (720) ? (y > static_cast (0) ? numeric_limits::max() : diff --git a/graph_tests/jit_test.cpp b/graph_tests/jit_test.cpp index c1111bb7adab9cbbfadcb31b59ed6f91215d0322..71e8f8278f8749bec23841253657265b30b74d0a 100644 --- a/graph_tests/jit_test.cpp +++ b/graph_tests/jit_test.cpp @@ -322,6 +322,28 @@ template void run_math_tests() { graph::variable_cast(v4)}, {pow_non_int}, {}, pow_non_int->evaluate().at(0), 3.0E-8); + + if constexpr (jit::use_gpu ()) { + result = 9.0E-8; + } else { + result = 0.0; + } + + auto sin_node = graph::sin(v1); + compile ({graph::variable_cast(v1)}, + {sin_node}, {}, + sin_node->evaluate().at(0), 0.0); + + auto cos_node = graph::cos(v1); + compile ({graph::variable_cast(v1)}, + {cos_node}, {}, + cos_node->evaluate().at(0), result); + + auto atan_node = graph::atan(v1, v2); + compile ({ + graph::variable_cast(v1), + graph::variable_cast(v2) + }, {atan_node}, {}, atan_node->evaluate().at(0), result); } //------------------------------------------------------------------------------