Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions interpreter/cling/tools/plugins/clad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ if (DEFINED CLAD_SOURCE_DIR)
list(APPEND _clad_extra_settings SOURCE_DIR ${CLAD_SOURCE_DIR})
else()
list(APPEND _clad_extra_settings GIT_REPOSITORY https://github.com/vgvassilev/clad.git)
list(APPEND _clad_extra_settings GIT_TAG v2.0)
list(APPEND _clad_extra_settings GIT_TAG v2.1)
endif()

# list(APPEND _clad_patches_list "patch1.patch" "patch2.patch")
list(APPEND _clad_patches_list "Add-missing-exception-include.patch")
set(_clad_patch_command
${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/interpreter/cling/tools/plugins/clad/patches <SOURCE_DIR>
&& git checkout -q <SOURCE_DIR>
&& git apply --ignore-space-change --ignore-whitespace ${_clad_patches_list}
)
## list(APPEND _clad_patches_list "patch1.patch" "patch2.patch")
#list(APPEND _clad_patches_list "")
#set(_clad_patch_command
# ${CMAKE_COMMAND} -E copy_directory
# ${CMAKE_SOURCE_DIR}/interpreter/cling/tools/plugins/clad/patches <SOURCE_DIR>
# && git checkout -q <SOURCE_DIR>
# && git apply --ignore-space-change --ignore-whitespace ${_clad_patches_list}
# )

ExternalProject_Add(
clad
Expand Down

This file was deleted.

8 changes: 4 additions & 4 deletions math/mathcore/inc/Math/CladDerivator.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ ValueAndPushforward<T, T> Log2_pushforward(T x, T d_x)
return {::TMath::Log2(x), (1.0 / (x * ::TMath::Log(2.0))) * d_x};
}

template <typename T>
ValueAndPushforward<T, T> Power_pushforward(T x, T y, T d_x, T d_y)
template <typename T, typename U>
ValueAndPushforward<T, T> Power_pushforward(T x, U y, T d_x, U d_y)
{
T pushforward = y * ::TMath::Power(x, y - 1) * d_x;
if (d_y) {
Expand All @@ -161,8 +161,8 @@ ValueAndPushforward<T, T> Power_pushforward(T x, T y, T d_x, T d_y)
return {::TMath::Power(x, y), pushforward};
}

template <typename T, typename U>
void Power_pullback(T x, T y, U p, clad::array_ref<T> d_x, clad::array_ref<T> d_y)
template <typename T, typename U, typename V>
void Power_pullback(T x, U y, V p, clad::array_ref<T> d_x, clad::array_ref<U> d_y)
{
auto t = pow_pushforward(x, y, 1, 0);
*d_x += t.pushforward * p;
Expand Down
Loading