Skip to content

Commit ba96c07

Browse files
committed
Removed 'Parallelism is used here to ...' statements and refactored my text accordingly
1 parent 9c1d14d commit ba96c07

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

man/openmp-utils.Rd

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,25 @@
3939
\itemize{
4040
\item\file{between.c} - \code{\link{between}()}
4141
42-
Parallelism is used here to speed up range checks that are performed over the elements of the supplied vector. OpenMP is used here to parallelize:
42+
OpenMP is used here to parallelize:
4343
\itemize{
4444
\item The loops that check if each element of the vector provided is between the specified \code{lower} and \code{upper} bounds, for integer (\code{INTSXP}) and real (\code{REALSXP}) types
45-
\item Checking and handling of undefined values (such as NaNs)
45+
\item The checking and handling of undefined values (such as NaNs)
4646
}
4747
4848
\item\file{cj.c} - \code{\link{CJ}()}
4949
50-
Parallelism is used here to expedite the creation of all combinations of the input vectors over the cross-product space. OpenMP is used here to parallelize:
50+
OpenMP is used here to parallelize:
5151
5252
\itemize{
53-
\item Element assignment in vectors
54-
\item Memory copying operations (blockwise replication of data using \code{memcpy})
53+
\item The element assignment in vectors
54+
\item The memory copying operations (blockwise replication of data using \code{memcpy})
55+
\item The creation of all combinations of the input vectors over the cross-product space
5556
}
5657
5758
\item\file{coalesce.c} - \code{\link{fcoalesce}()}
5859
59-
Parallelism is used here to reduce the time taken to replace NA values with the first non-NA value from other vectors. OpenMP is used here to parallelize:
60+
OpenMP is used here to parallelize:
6061
\itemize{
6162
\item The operation that iterates over the rows to coalesce the data (which can be of type integer, real, or complex)
6263
\item The replacement of NAs with non-NA values from subsequent vectors
@@ -69,7 +70,7 @@
6970
7071
\item\file{fread.c} - \code{\link{fread}()}
7172
72-
Parallelism is used here to speed up the reading and processing of data in chunks (blocks of lines/rows). OpenMP is used here to:
73+
OpenMP is used here to:
7374
7475
\itemize{
7576
\item Avoid race conditions or concurrent writes to the output \code{data.table} by having atomic operations on the string data
@@ -79,7 +80,7 @@
7980
8081
\item\file{forder.c}, \file{fsort.c}, and \file{reorder.c} - \code{\link{forder}()} and related
8182
82-
Parallelism is used here to reduce the time taken in multiple operations that come together to sort a \code{data.table} using the Radix algorithm. OpenMP is used here to parallelize:
83+
OpenMP is used here to parallelize multiple operations that come together to sort a \code{data.table} using the Radix algorithm. These include:
8384
8485
\itemize{
8586
\item The counting of unique values and recursively sorting subsets of data across different threads (specific to \file{forder.c})
@@ -90,27 +91,27 @@
9091
9192
\item\file{froll.c}, \file{frolladaptive.c}, and \file{frollR.c} - \code{\link{froll}()} and family
9293
93-
Parallelism is used here to speed up the computation of rolling statistics. OpenMP is used here to parallelize the loops that compute the rolling means (\code{frollmean}) and sums (\code{frollsum}) over a sliding window for each position in the input vector.
94+
OpenMP is used here to parallelize the loops that compute the rolling means (\code{frollmean}) and sums (\code{frollsum}) over a sliding window for each position in the input vector.
9495
9596
\item\file{fwrite.c} - \code{\link{fwrite}()}
9697
97-
Parallelism is used here to expedite the process of writing rows to the output file. OpenMP is used primarily to achieve the same here, but error handling and compression (if enabled) are also managed within the parallel region. Special attention is paid to thread safety and synchronization, especially in the ordered sections where output to the file and handling of errors is serialized to maintain the correct sequence of rows.
98+
OpenMP is used here primarily to parallelize the process of writing rows to the output file, but error handling and compression (if enabled) are also managed within the parallel region. Special attention is paid to thread safety and synchronization, especially in the ordered sections where output to the file and handling of errors is serialized to maintain the correct sequence of rows.
9899
99100
\item\file{gsumm.c} - GForce in various places, see \link{GForce}
100101
101102
Functions with GForce optimization are internally parallelized to speed up grouped summaries over a large \code{data.table}. OpenMP is used here to parallelize operations involved in calculating group-wise statistics like sum, mean, and median (implying faster computation of \code{sd}, \code{var}, and \code{prod} as well). The input data is split into batches (groups), and each thread processes a subset of the data based on them.
102103
103104
\item\file{nafill.c} - \code{\link{nafill}()}
104105
105-
Parallelism is used here for faster filling of missing values. OpenMP is being used here to parallelize the loop that achieves the same, over columns of the input data. This includes handling different data types (double, integer, and integer64) and applying the designated filling method (constant, last observation carried forward, or next observation carried backward) to each column in parallel.
106+
OpenMP is being used here to parallelize the loop that fills missing values over columns of the input data. This includes handling different data types (double, integer, and integer64) and applying the designated filling method (constant, last observation carried forward, or next observation carried backward) to each column in parallel.
106107
107108
\item\file{subset.c} - Used in \code{\link[=data.table]{[.data.table}} subsetting
108109
109-
Parallelism is used here to expedite the process of subsetting vectors. OpenMP is used here to parallelize the loops that achieve the same, with conditional checks and filtering of data.
110+
OpenMP is used here to parallelize the loops that perform the subsetting of vectors, with conditional checks and filtering of data.
110111
111112
\item\file{types.c} - Internal testing usage
112113
113-
Parallelism is being used here for enhancing the performance of internal tests (not impacting any user-facing operations or functions). OpenMP is being used here to test a message printing function inside a nested loop which has been collapsed into a single loop of the combined iteration space using \code{collapse(2)}, along with specification of dynamic scheduling for distributing the iterations in a way that can balance the workload among the threads.
114+
This caters to internal tests (not impacting any user-facing operations or functions), and OpenMP is being used here to test a message printing function inside a nested loop which has been collapsed into a single loop of the combined iteration space using \code{collapse(2)}, along with specification of dynamic scheduling for distributing the iterations in a way that can balance the workload among the threads.
114115
}
115116
116117
In general, or as applicable to all the aforementioned use cases, better speedup can be expected when dealing with large datasets.

0 commit comments

Comments
 (0)