iota-0.1.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.CSR

Documentation

data CSR a Source #

Constructors

CSR 

Fields

rowAt :: Unbox a => CSR a -> Int -> Vector a Source #

accumulateToCSR Source #

Arguments

:: Unbox a 
=> Int

num rows

-> Int

buffer size

-> Vector (Int, a) 
-> CSR a 

createCSR Source #

Arguments

:: Unbox a 
=> Int

num rows

-> Int

buffer size

-> (forall s. CSRBuilder s a -> ST s ()) 
-> CSR a 

data CSRBuilder s a Source #

Constructors

CSRBuilder 

Fields

newCSRBuilder Source #

Arguments

:: (Unbox a, PrimMonad m) 
=> Int

num rows

-> Int

buffer size

-> m (CSRBuilder (PrimState m) a) 

buildCSR :: (Unbox a, PrimMonad m) => CSRBuilder (PrimState m) a -> m (CSR a) Source #

pushCSRB :: (Unbox a, PrimMonad m) => (Int, a) -> CSRBuilder (PrimState m) a -> m () Source #