IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Added new main block because this was mentioned in the meta issue
list (#406 in cling) as one of the rewrite steps. This also allows for
the main code to be run as opposed to running the main code plus the
function defintions.
Properly set the export symbols for `x86` and `x64` and don't export the `llvm`, `clang` and already exported internal `cling` symbols for both `cling` and `cling-demo`
* [cling][windows] change compiler flags
- Set the `-std:c++14` / `-std:c++17` flag depending on the version of Visual Studio (only if building outside ROOT)
- Split the one line exports in three lines to fix a potential issue with Ninja on Windows (missing a white space between each `/EXPORT:` specifier)
* Add a forgotten `endif()`
This new release includes some improvements:
* Extended array support
* Add cmake variables to control the locations where find_package discovers LLVM and Clang: `LLVM_CONFIG_EXTRA_PATH_HINTS` and `Clang_CONFIG_EXTRA_PATH_HINTS` respectively.
See more at: https://github.com/vgvassilev/clad/blob/v0.9/docs/ReleaseNotes.md
* Update minimal CMake version in favour of advances features it offers
* Remove workaround for FindDoxygen (cmake < 3.13)
* Remnove workaround for cmake < 3.14 to able to report issue directly to stdout
* Remove workaround for CMake < 3.14 when Ninja 1.9.0 builds static libraries twice
* Remove other CMake hack from multi-python ROOT builds
* We are using 3.16 as a min CMake version and REGEX is definitely available in this version
* Remove code used to search Python2/Python3 with <= CMake 3.14
* [cmake] check for internet connection. Fixes#8292
This should fix an issue with external packages requiring an internet connection when working offline.
If there is no internet connection, they are either automatically disabled or raise a `FATAL_ERROR` if the `fail-on-missing` flag is `ON`
* Add forgotten "is" (thanks @pamputt)
* Add internet check for the forgotten 'davix' and 'ssl' options
* Change the timeout value and add information messages (thanks Axel)
* Let's download an existing file to test internet access
* Disable also clad if there is no internet connection
* Do not add the clad directory in case of no internet access
* Change the logic for clad with no internet connection
* disable clad early enough if there is no internet connection
* Disable also xrootd when disabling builtin_xrootd
Only fixes builds from LLVM 9 source. Builds using an LLVM 9 binary
release is still broken.
Drop Ubuntu 16.04 Clang build, since Clang 3.8 is very old and causes
build failure.
The new release includes some improvements in Reverse mode:
* Reduce the quadratic cloning complexity to linear.
* Support variable reassignments pontentially depending on control flow.
* Support operators `+=`, `-=`, `*=`, `/=`, `,`, `++`, `--`.
* Allow assignments to array subscripts.
* Support nested assignments in expressions `a = b * ((c ? d : e) = f = g);`
* Enable differentiation of for-loops
See more at: https://github.com/vgvassilev/clad/blob/v0.6/docs/ReleaseNotes.md
This patch enables us to upgrade to llvm9. Clad supports from clang5 to clang9.
For non [Windows, Ubuntu, Redhat, OS X] operating systems the pkg flag to the --last stable and --current-dev arguments didn't do anything - It should create a tar because that is the default behaviour for Unix like platforms which support bash.
The new release includes some improvements in both Forward and
Reverse mode:
* Extend the way to specify a dependent variables. Consider function,
`double f(double x, double y, double z) {...}`, `clad::differentiate(f, "z")`
is equivalent to `clad::differentiate(f, 2)`. `clad::gradient(f, "x, y")`
differentiates with respect to `x` and `y` but not `z`. The gradient results
are stored in a `_result` parameter in the same order as `x` and `y` were
specified. Namely, the result of `x` is stored in `_result[0]` and the result
of `y` in `_result[1]`. If we invert the arguments specified in the string to
`clad::gradient(f, "y, x")` the results will be stored inversely.
* Enable recursive differentiation.
* Support single- and multi-dimensional arrays -- works for arrays with constant
size like `double A[] = {1, 2, 3};`, `double A[3];` or `double A[1][2][3][4];`
See more at: https://github.com/vgvassilev/clad/blob/v0.5/docs/ReleaseNotes.md
The new release includes some improvements in both Forward and
Reverse mode:
* Support `x += y`, `x -= y`, `x *= y`, `x /= y`, `x++`, `x--`, `++x`, `--x`
in forward mode.
* Reduce emission of unused expressions
* Add a special `#pragma clad ON/OFF/DEFAULT` to annotate regions which
contain derivatives
* Various small optimizations
See more at: https://github.com/vgvassilev/clad/blob/v0.4/docs/ReleaseNotes.md
The new release includes some improvements in both Forward and
Reverse mode:
* Better correctness of C++ constructs -- handle scopes properly; allow proper
variable shadowing; and preserve namespaces.
* Efficient evaluation in forward mode.
* Reduced cloning complexity.
* Handle more C++ constructs -- variable reassignments and for loops.
See more at: https://github.com/vgvassilev/clad/blob/v0.3/docs/ReleaseNotes.md
In cases where we build ROOT with -Dbuiltin_llvm=Off -Dbuiltin_clang=On
and we have installed both llvm and clang in /usr/ clad will pick up
the clang headers from there too.
This patch gives higher priority to the header files which ROOT is
supposed to use. It fixes a very obscure initialization issue due to
different versions of the ASTContext.h installed and used by ROOT.
The relevant highlights are:
* Support better Windows (thanks to Bertrand Bellenot!);
* Disabled automatic discovery of system LLVM -- clad should only
search for LLVM at DCLAD_PATH_TO_LLVM_BUILD. On some platforms
(discovered by Oksana Shadura via rootbench) clad discovers the
system LLVM which is compatible in principle but this is not what
we want for ROOT.
* Implemented -CLAD_BUILD_STATIC_ONLY -- this covers the ROOT usecase
where we do not need shared objects but link the libraries against
another shared object (libCling.so). This allows platforms which have
disabled LLVM_ENABLE_PLUGINS to still build clad and use it. Such
example is CYGWIN and Windows.
See more at: https://github.com/vgvassilev/clad/releases/tag/v0.2
clad is a C++ plugin for clang and cling that implements automatic
differentiation of user-defined functions by employing the chain rule in
forward and reverse mode, coupled with source code transformation and AST
constant fold.
In mathematics and computer algebra, automatic differentiation (AD) is a
set of techniques to numerically evaluate the derivative of a function
specified by a computer program. AD exploits the fact that every computer
program, no matter how complicated, executes a sequence of elementary
arithmetic operations (addition, subtraction, multiplication, division, etc.)
and elementary functions (exp, log, sin, cos, etc.). By applying the chain
rule repeatedly to these operations, derivatives of arbitrary order can
be computed automatically, accurately to working precision, and using at
most a small constant factor more arithmetic operations than the original
program.
AD is an alternative technique to symbolic and numerical differentiation.
These classical methods run into problems: symbolic differentiation leads
to inefficient code (unless done carefully) and faces the difficulty of
converting a computer program into a single expression, while numerical
differentiation can introduce round-off errors in the discretization
process and cancellation. Both classical methods have problems with
calculating higher derivatives, where the complexity and errors increase.
Finally, both classical methods are slow at computing the partial
derivatives of a function with respect to many inputs, as is needed for
gradient-based optimization algorithms. Automatic differentiation solves
all of these problems, at the expense of introducing more software
dependencies.
This patch allows ROOT to interoperate with clad. Namely, users can ask
the interpreter to produce a derivative or a gradient to a known function.
An illustrative example code for first order derivative:
root [0] #include "Math/CladDerivator.h"
root [1] double my_pow2(double x) { return x*x; }
root [2] auto meta_obj = clad::differentiate(my_pow2, /*wrt 1-st argument*/0);
root [3] meta_obj.dump();
The code is: double my_pow2_darg0(double x) {
return (1. * x + x * 1.);
}
root [5] meta_obj.execute(1) // no iterations, at the cost of function call.
(double) 2.0000000
Learn more about clad at https://github.com/vgvassilev/clad
Patch by Aleksandr Efremov and me!
Clang allows third party shared libraries to provide user-defined
extensions. For example, a custom libTemplateInstantiation.so can
visualize all template instantiation chains in clang. To enable it
one needs to pass a set of options such as -fplugin.
Cling should be able to inherently work with clang plugins. However,
cling still does not make full use of the clang driver where the plugin
setup is handled.
This patch enables plugins in cling and extends them in some aspects.
In particular, cling allows loading of plugins from shared libraries
but also if they are linked to the same library where cling is. This is
very useful in cases where cling runs itself in a shared library (eg
libCling). Users of libCling (such as ROOT) prefer to keep all llvm and
clang related symbols local to avoid symbol clashes if there is another
version of clang and llvm linked against a package. This can be done by
dlopen-ing libCling with RTLD_LOCAL visibility mode. Then the only way
for clang plugins to work in this scenario is to be linked to libCling.
Patch by Aleksandr Efremov and me.
Before this commit, cpt.py attempted `"3.11.1" < "3.4.3"`, but this
incorrectly returns `True`. This commit adds a function that splits the
string into version identifiers and checks them all individually.
- cling: add missing symbol in the export list and fix semicolon issue in CMakeList.txt (it has to be in quotes)
- cling-demo: export symbols and format hexadecimal output
We rely on clang's plugin infrastructure for loading, argument processing
and unloading plugins.
This patch teaches cling to work with clang plugins such as clad -- a
clang plugin implementing automatic differentiation facilities.