PrimitiveArray-0.7.1.0: Efficient multidimensional arrays

Safe HaskellNone
LanguageHaskell2010

Data.PrimitiveArray.Checked

Description

This module exports everything that Data.PrimitiveArray exports, but it will do some bounds-checking on certain operations.

Checked are: (!)

Synopsis

Documentation

(!) :: (Index sh, Unbox t, Show sh) => Unboxed sh t -> sh -> t Source #

Bounds-checked version of indexing.

First, we check via inBounds, second we check if the linear index is outside of the allocated area.