|
static void | copyFromDiscontiguousMemory (const ValueType *src, ValueType *dst, const size_type *discontIds, const size_type N, const size_type nComponents) |
| Function to copy a source array x to a destination array y , where the source is accessed discontiguously but the destination is accessed contiguously. In other words, \( y[i] = x[d_i],
i=0,1,2,\ldots,N-1\), where \(\{d_0, d_1, d_2, \ldots, d_{N-1}\}\) define a set of discontiguous indices for x . In practice, we extend the above to multi-component case, wherein both x and \y contain multiple-components for each index. We assume the components to be stored contiguously for each index. Thus, if there are \(C\) components, the function does \( y[i*C + j] = x[d_i*C + j],
i=0,1,2,\ldots,N-1\) and \(j=0,1,2,\ldots,C-1\). More...
|
|
static void | copyToDiscontiguousMemory (const ValueType *src, ValueType *dst, const size_type *discontIds, const size_type N, const size_type nComponents) |
| Function to copy a source array x to a destination array y , where the source is accessed contiguously but the destination is accessed discontiguously. In other words, \( y[d_i] = x[i],
i=0,1,2,\ldots,N-1\), where \(\{d_0, d_1, d_2, \ldots, d_{N-1}\}\) define a set of discontiguous indices for y . In practice, we extend the above to multi-component case, wherein both x and \y contain multiple-components for each index. We assume the components to be stored contiguously for each index. Thus, if there are \(C\) components, the function does \( y[d_i*C + j] = x[i*C + j],
i=0,1,2,\ldots,N-1\) and \(j=0,1,2,\ldots,C-1\). More...
|
|
static void | addToDiscontiguousMemory (const ValueType *src, ValueType *dst, const size_type *discontIds, const size_type N, const size_type nComponents) |
| Function to add a source array x to a destination array y , where the source is accessed contiguously but the destination is accessed discontiguously. In other words, \( y[d_i] = y[d_i] + x[i],
i=0,1,2,\ldots,N-1\), where \(\{d_0, d_1, d_2, \ldots, d_{N-1}\}\) define a set of discontiguous indices for y . In practice, we extend the above to multi-component case, wherein both x and \y contain multiple-components for each index. We assume the components to be stored contiguously for each index. Thus, if there are \(C\) components, the function does \( y[d_i*C + j] = y[d_i*C + j] + x[i*C +
j], i=0,1,2,\ldots,N-1\) and \(j=0,1,2,\ldots,C-1\). More...
|
|
Function to add a source array x
to a destination array y
, where the source is accessed contiguously but the destination is accessed discontiguously. In other words, \( y[d_i] = y[d_i] + x[i],
i=0,1,2,\ldots,N-1\), where \(\{d_0, d_1, d_2, \ldots, d_{N-1}\}\) define a set of discontiguous indices for y
. In practice, we extend the above to multi-component case, wherein both x
and \y contain multiple-components for each index. We assume the components to be stored contiguously for each index. Thus, if there are \(C\) components, the function does \( y[d_i*C + j] = y[d_i*C + j] + x[i*C +
j], i=0,1,2,\ldots,N-1\) and \(j=0,1,2,\ldots,C-1\).
- Note
- It assumes that
y
preallocated to a size that is atleast N
(i.e., number of discontiguous indices)
- Template Parameters
-
- Parameters
-
[in] | src | Pointer to the x array (source array) |
[out] | dst | Pointer to the y array (destination array) |
[in] | discontIds | Pointer to array containing the discontiguous indices of the destination array ( \(d_i\)'s in the above description) |
[in] | N | Non-negative integer specifying the number of discontiguous indices |
[in] | nComponents | Number of components (i.e., \(C\) in the above description) |
- Note
- The
dst
array is not allocated internally and hence must be pre-allocted appropriately. That is, dst[d_i*C + j] must be a valid memory access for all d_i's and j's
-
No size size consistency is performed on the
src
array and must be pre-allocated appropriately. That is, src[i*C + j] must be a valid memory access for all i's and j's
Function to copy a source array x
to a destination array y
, where the source is accessed discontiguously but the destination is accessed contiguously. In other words, \( y[i] = x[d_i],
i=0,1,2,\ldots,N-1\), where \(\{d_0, d_1, d_2, \ldots, d_{N-1}\}\) define a set of discontiguous indices for x
. In practice, we extend the above to multi-component case, wherein both x
and \y contain multiple-components for each index. We assume the components to be stored contiguously for each index. Thus, if there are \(C\) components, the function does \( y[i*C + j] = x[d_i*C + j],
i=0,1,2,\ldots,N-1\) and \(j=0,1,2,\ldots,C-1\).
- Template Parameters
-
- Parameters
-
[in] | src | Pointer to the x array (source array) |
[out] | dst | Pointer to the y array (destination array) |
[in] | discontIds | Pointer to array containing the discontiguous indices of the source array ( \(d_i\)'s in the above description) |
[in] | N | Non-negative integer specifying the number of discontiguous indices |
[in] | nComponents | Number of components (i.e., \(C\) in the above description) |
- Note
- The
dst
array is not allocated internally and hence must be pre-allocted appropriately. That is, dst[i*C + j] must be s a valid memory access for a i's and j's
-
No size size consistency is performed on the
src
array and hemce must be pre-allocated appropriately. That is, src[d_i*C + j] must be s a valid memory access for a d_i's and j's
Function to copy a source array x
to a destination array y
, where the source is accessed contiguously but the destination is accessed discontiguously. In other words, \( y[d_i] = x[i],
i=0,1,2,\ldots,N-1\), where \(\{d_0, d_1, d_2, \ldots, d_{N-1}\}\) define a set of discontiguous indices for y
. In practice, we extend the above to multi-component case, wherein both x
and \y contain multiple-components for each index. We assume the components to be stored contiguously for each index. Thus, if there are \(C\) components, the function does \( y[d_i*C + j] = x[i*C + j],
i=0,1,2,\ldots,N-1\) and \(j=0,1,2,\ldots,C-1\).
- Note
- It assumes that
y
preallocated to a size that is atleast N
(i.e., number of discontiguous indices)
- Template Parameters
-
- Parameters
-
[in] | src | Pointer to the x array (source array) |
[out] | dst | Pointer to the y array (destination array) |
[in] | discontIds | Pointer to array containing the discontiguous indices of the destination array ( \(d_i\)'s in the above description) |
[in] | N | Non-negative integer specifying the number of discontiguous indices |
[in] | nComponents | Number of components (i.e., \(C\) in the above description) |
- Note
- The
dst
array is not allocated internally and hence must be pre-allocted appropriately. That is, dst[d_i*C + j] must be a valid memory access for all d_i's and j's
-
No size size consistency is performed on the
src
array and must be pre-allocated appropriately. That is, src[i*C + j] must be a valid memory access for all i's and j's