PrimitiveArray-0.8.0.1: 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

(!) :: (Show sh, Unbox t, Index 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.