You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-05-18-Supporting-STL-concurrency-primitives-in-clad.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,40 +7,40 @@ author: Petro Mozil
7
7
permalink: blogs/gsoc25_/
8
8
banner_image: /images/blog/gsoc-banner.png
9
9
date: 2025-05-18
10
-
tags: gsoc llvm clang audo-differentiation
10
+
tags: gsoc llvm clang auto-differentiation
11
11
---
12
12
13
13
## About me
14
14
15
15
I am Petro Mozil, a student participating in the Google Summer of Code program in 2025.
16
-
I will work on adding support of STL conurrency primitives to CLAD.
16
+
I will work on adding support of STL concurrency primitives to CLAD.
17
17
18
18
## Problem description
19
19
20
20
`Clad` is a plugin for automatic differentiation for the `clang` compiler.
21
21
Automatic differentiation is a term for multiple techniques of deriving a mathematical function analytically. Some of the ways of doing this include simply calculating the derivative numerically or by deriving a function by a set of rules, symbolically.
22
22
23
-
`Clad` provides an interface that returns an object that containd the derivative of a given function. There might be problems with some functions, if they are to be derived. For example, one would not derive `printf`, and neither would they derive `std::tread` - those are exceptions, and should be handled differently from mathematical functions.
23
+
`Clad` provides an interface that returns an object that contained the derivative of a given function. There might be problems with some functions, if they are to be derived. For example, one would not derive `printf`, and neither would they derive `std::tread` - those are exceptions, and should be handled differently from mathematical functions.
24
24
25
25
The main goals of this project are to implement support for automatically derive functions that contain `std::thread` so that the user wouldn't have to separate the multi-processing logic from the mathematical functions - such a feature would be a great time-saver for production of multi-processing code.
26
26
27
27
## Objectives
28
28
29
-
The objectives for thi project include adding support for multiple objects in STL, such as `std::thread`, `std::atomic`, `std::mutex`.
29
+
The objectives for this project include adding support for multiple objects in STL, such as `std::thread`, `std::atomic`, `std::mutex`.
30
30
31
-
The first, and, likely, most important part of the project is to add support for `std::thread` - this will include deriving not the `std::thread` constructor, but deriving the function suppliend for the thread.
31
+
The first, and, likely, most important part of the project is to add support for `std::thread` - this will include deriving not the `std::thread` constructor, but deriving the function supplied for the thread.
32
32
33
-
Support for mutexes is a bit more straighforward - though `clad` creates a second object to represent the derived value, it shouldn't do so for a mutex. It is a matter of having a custom derivative for `std::mutex`.
33
+
Support for mutexes is a bit more straightforward - though `clad` creates a second object to represent the derived value, it shouldn't do so for a mutex. It is a matter of having a custom derivative for `std::mutex`.
34
34
35
-
Atomics will likely involve moer effort - they would require custom derivatives for `compare_exchange` functions as well as their methods.
35
+
Atomics will likely involve more effort - they would require custom derivatives for `compare_exchange` functions as well as their methods.
36
36
37
37
If time allows, I would also like to add support for `std::condition_variable`, `std::lock_guard`, `std::unique_lock` and `std::jthread`, and most of those would also only involve a custom derivative.
38
38
39
39
40
40
## Conclusion
41
41
42
42
A a result of this project, support for the concurrency primitives is expected. Clad should seamlessly derive functions with concurrency primitives in them.
43
-
Though this project does not focus on features immediately reuired from `clad`, it should result in making easier the lives of those, who use clad for high-perf computing.
43
+
Though this project does not focus on features immediately required from `clad`, it should result in making easier the lives of those, who use clad for high-perf computing.
0 commit comments