Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The allocation of source data is an integral part of the initialization phase for each thread. This ensures that the worker threads divide the source and target data spaces in a manner that is conducive to parallel processing. The goal is to enable the threads to operate independently without interference from each other. It’s crucial to avoid scenarios where one thread’s written data would necessitate changes in another thread’s source data. Similarly, it’s important to prevent overlap in the target data space of two or more threads to ensure consistent results. If these conditions cannot be met, the process may not be suitable for parallel processing.

Data allocation is provided only within scope of parallel dimension (process parameter pDimPar). The other parameter values defining the source and target data space should be shared between each worker thread.

Allocation of source data is based on pThreadID parameter value is provided by the modulo logic as depicted on below example. Number of working threads pMaxThreads was set to 4, main thread is not participating in the data processing. Child threads have pThreadID set to 1, 2 and 3. For simplicity elements in parallel dimension have symbolic names A, B, C, D, E, F, G, H and I.

Element

A

B

C

D

E

F

G

H

I

J

Thread

1

2

3

1

2

3

1

2

3

1

Each thread is responsible to allocate its own data both in the source and in the target. Target view for cleaning and cleaning itself must be provided by the thread itself. All objects such as views or subsets must be created as temporary.

  • No labels