feldspar-language-0.4.0.2: A functional embedded language for DSP and parallelism

Feldspar.Core.Functions.Array

Description

Core language array operations

Synopsis

Documentation

arrayLen :: Type a => Data Length -> [a] -> Data [a]

Constructs an array of the given length and initialization.

getIx :: Type a => Data [a] -> Data Index -> Data a

Look up an index in an array (see also !)

setIx

Arguments

:: Type a 
=> Data [a]

Source array

-> Data Index

Index to replace

-> Data a

New value

-> Data [a] 

Array update

getLength :: Type a => Data [a] -> Data Length

Array length

class RandomAccess a where

Associated Types

type Element a

The type of elements in a random access structure

Methods

(!) :: a -> Data Index -> Element a

Index lookup in a random access structure

Instances