-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #352 from bluescarni/pr/kepE_improvements
kepF
- Loading branch information
Showing
29 changed files
with
4,979 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Known issues | ||
============ | ||
|
||
* Due to an upstream bug, if you compile heyoka linking statically against LLVM 17 | ||
while enabling the ``HEYOKA_HIDE_LLVM_SYMBOLS`` option (see the | ||
:ref:`installation instructions <installation_from_source>`), you may experience | ||
runtime errors. This problem should be fixed in LLVM 18. A patch fixing the issue in LLVM 17 | ||
is available `here <https://github.com/llvm/llvm-project/commit/122ebe3b500190b1f408e2e6db753853e297ba28>`__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
// Copyright 2020, 2021, 2022, 2023 Francesco Biscani ([email protected]), Dario Izzo ([email protected]) | ||
// | ||
// This file is part of the heyoka library. | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla | ||
// Public License v. 2.0. If a copy of the MPL was not distributed | ||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#ifndef HEYOKA_MATH_KEPDE_HPP | ||
#define HEYOKA_MATH_KEPDE_HPP | ||
|
||
#include <heyoka/config.hpp> | ||
|
||
#include <cstdint> | ||
#include <vector> | ||
|
||
#if defined(HEYOKA_HAVE_REAL128) | ||
|
||
#include <mp++/real128.hpp> | ||
|
||
#endif | ||
|
||
#if defined(HEYOKA_HAVE_REAL) | ||
|
||
#include <mp++/real.hpp> | ||
|
||
#endif | ||
|
||
#include <heyoka/detail/func_cache.hpp> | ||
#include <heyoka/detail/fwd_decl.hpp> | ||
#include <heyoka/detail/llvm_fwd.hpp> | ||
#include <heyoka/detail/visibility.hpp> | ||
#include <heyoka/func.hpp> | ||
#include <heyoka/s11n.hpp> | ||
|
||
HEYOKA_BEGIN_NAMESPACE | ||
|
||
namespace detail | ||
{ | ||
|
||
class HEYOKA_DLL_PUBLIC kepDE_impl : public func_base | ||
{ | ||
friend class boost::serialization::access; | ||
template <typename Archive> | ||
HEYOKA_DLL_LOCAL void serialize(Archive &, unsigned); | ||
|
||
template <typename T> | ||
HEYOKA_DLL_LOCAL expression diff_impl(funcptr_map<expression> &, const T &) const; | ||
|
||
public: | ||
kepDE_impl(); | ||
explicit kepDE_impl(expression, expression, expression); | ||
|
||
expression diff(funcptr_map<expression> &, const std::string &) const; | ||
expression diff(funcptr_map<expression> &, const param &) const; | ||
|
||
[[nodiscard]] llvm::Value *llvm_eval(llvm_state &, llvm::Type *, const std::vector<llvm::Value *> &, llvm::Value *, | ||
llvm::Value *, llvm::Value *, std::uint32_t, bool) const; | ||
|
||
[[nodiscard]] llvm::Function *llvm_c_eval_func(llvm_state &, llvm::Type *, std::uint32_t, bool) const; | ||
}; | ||
|
||
} // namespace detail | ||
|
||
HEYOKA_DLL_PUBLIC expression kepDE(expression, expression, expression); | ||
|
||
#define HEYOKA_DECLARE_KEPDE_OVERLOADS(type) \ | ||
HEYOKA_DLL_PUBLIC expression kepDE(expression, type, type); \ | ||
HEYOKA_DLL_PUBLIC expression kepDE(type, expression, type); \ | ||
HEYOKA_DLL_PUBLIC expression kepDE(type, type, expression); \ | ||
HEYOKA_DLL_PUBLIC expression kepDE(expression, expression, type); \ | ||
HEYOKA_DLL_PUBLIC expression kepDE(expression, type, expression); \ | ||
HEYOKA_DLL_PUBLIC expression kepDE(type, expression, expression) | ||
|
||
HEYOKA_DECLARE_KEPDE_OVERLOADS(double); | ||
HEYOKA_DECLARE_KEPDE_OVERLOADS(long double); | ||
|
||
#if defined(HEYOKA_HAVE_REAL128) | ||
|
||
HEYOKA_DECLARE_KEPDE_OVERLOADS(mppp::real128); | ||
|
||
#endif | ||
|
||
#if defined(HEYOKA_HAVE_REAL) | ||
|
||
HEYOKA_DECLARE_KEPDE_OVERLOADS(mppp::real); | ||
|
||
#endif | ||
|
||
#undef HEYOKA_DECLARE_KEPDE_OVERLOADS | ||
|
||
HEYOKA_END_NAMESPACE | ||
|
||
HEYOKA_S11N_FUNC_EXPORT_KEY(heyoka::detail::kepDE_impl) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.