repa-array-4.1.0.1: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Array.Material.Strided

Contents

Synopsis

Documentation

data S Source

Layout for Foreign Strided arrays.

UNSAFE: indexing into foreign strided arrays is not bounds checked. You may want to wrap this with a Checked layout as well.

Constructors

Strided 

Fields

stridedLength :: !Int
 

Instances

Conversions

unsafeCast :: (Storable a, Storable b) => Array S a -> Array S b Source

O(1). Cast a foreign array from one element type to another.

fromForeignPtr Source

Arguments

:: Int

Starting position in bytes.

-> Int

Stride to get to next element, in bytes.

-> Int

Length of array in elements.

-> ForeignPtr a

ForeignPtr holding the data.

-> Array S a 

O(1). Wrap a ForeignPtr as a strided array.

toForeignPtr :: Array S a -> (Int, Int, Int, ForeignPtr a) Source

O(1). Unwrap a ForeignPtr from a strided array.