|
39 | 39 | \itemize{ |
40 | 40 | \item\file{between.c} - \code{\link{between}()} |
41 | 41 | |
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: |
43 | 43 | \itemize{ |
44 | 44 | \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) |
46 | 46 | } |
47 | 47 | |
48 | 48 | \item\file{cj.c} - \code{\link{CJ}()} |
49 | 49 | |
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: |
51 | 51 |
|
52 | 52 | \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 |
55 | 56 | } |
56 | 57 | |
57 | 58 | \item\file{coalesce.c} - \code{\link{fcoalesce}()} |
58 | 59 | |
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: |
60 | 61 | \itemize{ |
61 | 62 | \item The operation that iterates over the rows to coalesce the data (which can be of type integer, real, or complex) |
62 | 63 | \item The replacement of NAs with non-NA values from subsequent vectors |
|
69 | 70 | |
70 | 71 | \item\file{fread.c} - \code{\link{fread}()} |
71 | 72 | |
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: |
73 | 74 |
|
74 | 75 | \itemize{ |
75 | 76 | \item Avoid race conditions or concurrent writes to the output \code{data.table} by having atomic operations on the string data |
|
79 | 80 | |
80 | 81 | \item\file{forder.c}, \file{fsort.c}, and \file{reorder.c} - \code{\link{forder}()} and related |
81 | 82 | |
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: |
83 | 84 | |
84 | 85 | \itemize{ |
85 | 86 | \item The counting of unique values and recursively sorting subsets of data across different threads (specific to \file{forder.c}) |
|
90 | 91 | |
91 | 92 | \item\file{froll.c}, \file{frolladaptive.c}, and \file{frollR.c} - \code{\link{froll}()} and family |
92 | 93 | |
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. |
94 | 95 |
|
95 | 96 | \item\file{fwrite.c} - \code{\link{fwrite}()} |
96 | 97 |
|
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. |
98 | 99 | |
99 | 100 | \item\file{gsumm.c} - GForce in various places, see \link{GForce} |
100 | 101 | |
101 | 102 | 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. |
102 | 103 | |
103 | 104 | \item\file{nafill.c} - \code{\link{nafill}()} |
104 | 105 | |
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. |
106 | 107 | |
107 | 108 | \item\file{subset.c} - Used in \code{\link[=data.table]{[.data.table}} subsetting |
108 | 109 | |
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. |
110 | 111 | |
111 | 112 | \item\file{types.c} - Internal testing usage |
112 | 113 | |
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. |
114 | 115 | } |
115 | 116 | |
116 | 117 | In general, or as applicable to all the aforementioned use cases, better speedup can be expected when dealing with large datasets. |
|
0 commit comments