Skip to content
Snippets Groups Projects

Thread safety

Merged Markus Holzer requested to merge holzer/pystencils:threadSafety into master
1 unresolved thread
Viewing commit 86a6112e
Show latest version
3 files
+ 6
16
Preferences
Compare changes
Files
3
+ 3
8
@@ -135,14 +135,9 @@ class CreateKernelConfig:
"""
skip_independence_check: bool = False
"""
Don't check that loop iterations are independent. This is needed e.g. for
periodicity kernel, that access the field outside the iteration bounds. Use with care!
"""
check_thread_safety: bool = True
"""
Assignments are considered thread safe if read and writes only target the same locations. If this is not the case,
multithreaded optimisations will fail. The thread safety check can be deactivated to use e.g. GPUs anyway.
Use with care!
By default the assignment list is checked for read/write independence. This means fields are only written at
locations where they are read. Doing so guarantees thread safety. In some cases e.g. for
periodicity kernel, this can not be assured and does the check needs to be deactivated. Use with care!
"""
class DataTypeFactory: