dph-prim-seq-0.7.0.1: Data Parallel Haskell segmented arrays. (sequential implementation)

Safe HaskellNone

Data.Array.Parallel.Unlifted.Sequential.USel

Contents

Description

Selectors.

See Data.Array.Parallel.Unlifted for how this works.

Synopsis

Types

data USel2 Source

Selector.

Constructors

USel2 

Fields

usel2_tags :: !(Vector Tag)
 
usel2_indices :: !(Vector Int)
 
usel2_elements0 :: !Int

Number of tags with value 0.

usel2_elements1 :: !Int

Number of tags with value 1.

Operations on selectors

mkUSel2Source

Arguments

:: Vector Tag

Tags array.

-> Vector Int

Indices array

-> Int

Number of elements taken from first array.

-> Int

Number of elements taken from second array.

-> USel2 

O(1). Construct a selector.

lengthUSel2 :: USel2 -> IntSource

O(1). Get the number of elements represented by this selector. This is the length of the array returned by combine.

tagsUSel2 :: USel2 -> Vector TagSource

O(1). Get the tags array of a selector.

indicesUSel2 :: USel2 -> Vector IntSource

O(1). Get the indices array of a selector.

elementsUSel2_0 :: USel2 -> IntSource

O(1). Get the number of elements that will be taken from the first array.

elementsUSel2_1 :: USel2 -> IntSource

O(1). Get the number of elements that will be taken from the second array.

tagsToIndices2 :: Vector Tag -> Vector IntSource

O(n). Compute the source index for each element of the result array.