llvm-extra-0.12.0.1: Utility functions for the llvm interface
Safe HaskellSafe-Inferred
LanguageHaskell98

LLVM.Extra.Array

Synopsis

Documentation

size :: Natural n => Value (Array n a) -> Int Source #

assemble :: (Natural n, IsSized a) => [Value a] -> CodeGenFunction r (Value (Array n a)) Source #

construct an array out of single elements

You must assert that the length of the list matches the array size.

This can be considered the inverse of extractAll.

extractAll :: (Natural n, IsSized a) => Value (Array n a) -> CodeGenFunction r [Value a] Source #

provide the elements of an array as a list of individual virtual registers

This can be considered the inverse of assemble.

map :: (Natural n, IsSized a, IsSized b) => (Value a -> CodeGenFunction r (Value b)) -> Value (Array n a) -> CodeGenFunction r (Value (Array n b)) Source #

The loop is unrolled, since insertvalue and extractvalue expect constant indices.