numerical-0.0.0.0: core package for Numerical Haskell project

Safe HaskellNone
LanguageHaskell2010

Numerical.Array.Layout.Base

Contents

Description

Comments for this modules

Synopsis

Documentation

class Layout form (rank :: Nat) | form -> rank where Source #

the Layout type class

Methods

basicLogicalShape :: form -> Shape rank Int Source #

basicLogicalShape gives the extent of the format

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat form => form -> logicalForm Source #

basicLogicalForm converts a given format into its "contiguous" analogue this is useful for supporting various address translation manipulation tricks efficiently. Note that any valid simple format should strive to ensure this is an O(1) operation. though certain composite Layout instances may provide a slower implementation.

transposedLayout :: (form ~ Transposed transform, transform ~ Transposed form) => form -> transform Source #

transposedLayout transposes the format data type

basicCompareIndex :: p form -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicCompareIndex lets you compare where two (presumably inbounds) Index values are in a formats ordering. The logical Shape of the array is not needed

basicAddressRange :: address ~ LayoutAddress form => form -> Maybe (Range address) Source #

the (possibly empty) min and max of the valid addresses for a given format. minAddress = fmap _RangeMin . rangedFormatAddress and maxAddress = fmap _RangeMax . rangedFormatAddress FIXME : This also is a terrible name

basicToAddress :: address ~ LayoutAddress form => form -> Index rank -> Maybe address Source #

basicToAddress takes an Index, and tries to translate it to an address if its in bounds

basicToIndex :: address ~ LayoutAddress form => form -> address -> Index rank Source #

basicToIndex takes an address, and always successfully translates it to a valid index. Behavior of invalid addresses constructed by a library user is unspecified.

basicNextAddress :: address ~ LayoutAddress form => form -> address -> Maybe address Source #

basicNextAddress takes an address, and tries to compute the next valid address, or returns Nothing if there is no subsequent valid address.

basicNextIndex :: address ~ LayoutAddress form => form -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicNextIndex form ix mbeAddress computes the next valid index after ix if it exists. It takes a Maybe address as a hint for where to do the search for the successor. If the index is in bounds and not the last index, it returns both the index and the associated address.

basicAddressPopCount :: address ~ LayoutAddress form => form -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress form => form -> address -> Int Source #

This operation is REALLY unsafe This should ONLY be used on Formats that are directly paired with a Buffer or Mutable Buffer (ie a Vector) This operation being in this class is also kinda a hack but lets leave it here for now

basicAffineAddressShift :: address ~ LayoutAddress form => form -> address -> Int -> Maybe address Source #

The semantics of basicAffineAddressShift form addr step is that when step > 0, its equivalent to iteratively computing basicNextAddress step times. However, the step size can be negative, which means it can

Instances
(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Column Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Column Contiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Column Contiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Column Contiguous rank rep)) => Format Column Contiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Column Contiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Column Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Column Strided rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Column Strided rank rep) => Format Column Strided rank rep -> logicalForm Source #

transposedLayout :: (Format Column Strided rank rep ~ Transposed transform, transform ~ Transposed (Format Column Strided rank rep)) => Format Column Strided rank rep -> transform Source #

basicCompareIndex :: p (Format Column Strided rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Column InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Column InnerContiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Column InnerContiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Column InnerContiguous rank rep)) => Format Column InnerContiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Column InnerContiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Row Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Row Contiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Row Contiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Row Contiguous rank rep)) => Format Row Contiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Row Contiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Row Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Row Strided rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Row Strided rank rep) => Format Row Strided rank rep -> logicalForm Source #

transposedLayout :: (Format Row Strided rank rep ~ Transposed transform, transform ~ Transposed (Format Row Strided rank rep)) => Format Row Strided rank rep -> transform Source #

basicCompareIndex :: p (Format Row Strided rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Row InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Row InnerContiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Row InnerContiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Row InnerContiguous rank rep)) => Format Row InnerContiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Row InnerContiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Int -> Maybe address Source #

Vector (BufferPure rep) Int => Layout (Format DirectSparse Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Methods

basicLogicalShape :: Format DirectSparse Contiguous (S Z) rep -> Shape (S Z) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> logicalForm Source #

transposedLayout :: (Format DirectSparse Contiguous (S Z) rep ~ Transposed transform, transform ~ Transposed (Format DirectSparse Contiguous (S Z) rep)) => Format DirectSparse Contiguous (S Z) rep -> transform Source #

basicCompareIndex :: p (Format DirectSparse Contiguous (S Z) rep) -> Shape (S Z) Int -> Shape (S Z) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Index (S Z) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Index (S Z) Source #

basicNextAddress :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Index (S Z) -> Maybe address -> Maybe (Index (S Z), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Int -> Maybe address Source #

Vector (BufferPure rep) Int => Layout (Format CompressedSparseRow Contiguous (S (S Z)) rep) (S (S Z)) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Methods

basicLogicalShape :: Format CompressedSparseRow Contiguous (S (S Z)) rep -> Shape (S (S Z)) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> logicalForm Source #

transposedLayout :: (Format CompressedSparseRow Contiguous (S (S Z)) rep ~ Transposed transform, transform ~ Transposed (Format CompressedSparseRow Contiguous (S (S Z)) rep)) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> transform Source #

basicCompareIndex :: p (Format CompressedSparseRow Contiguous (S (S Z)) rep) -> Shape (S (S Z)) Int -> Shape (S (S Z)) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Index (S (S Z)) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Index (S (S Z)) Source #

basicNextAddress :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Index (S (S Z)) -> Maybe address -> Maybe (Index (S (S Z)), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Int -> Maybe address Source #

Layout (Format Direct Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Direct Contiguous (S Z) rep -> Shape (S Z) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> logicalForm Source #

transposedLayout :: (Format Direct Contiguous (S Z) rep ~ Transposed transform, transform ~ Transposed (Format Direct Contiguous (S Z) rep)) => Format Direct Contiguous (S Z) rep -> transform Source #

basicCompareIndex :: p (Format Direct Contiguous (S Z) rep) -> Shape (S Z) Int -> Shape (S Z) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Index (S Z) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Index (S Z) Source #

basicNextAddress :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Index (S Z) -> Maybe address -> Maybe (Index (S Z), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Int -> Maybe address Source #

Layout (Format Direct Strided (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Direct Strided (S Z) rep -> Shape (S Z) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> logicalForm Source #

transposedLayout :: (Format Direct Strided (S Z) rep ~ Transposed transform, transform ~ Transposed (Format Direct Strided (S Z) rep)) => Format Direct Strided (S Z) rep -> transform Source #

basicCompareIndex :: p (Format Direct Strided (S Z) rep) -> Shape (S Z) Int -> Shape (S Z) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Index (S Z) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Index (S Z) Source #

basicNextAddress :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Index (S Z) -> Maybe address -> Maybe (Index (S Z), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Int -> Maybe address Source #

class Layout form rank => DenseLayout form (rank :: Nat) | form -> rank where Source #

DenseLayout only has instances for Dense array formats. this class will need some sprucing up for the beta, but its ok for now. NB that DenseLayout is really strictly meant to be used for optimization purposes, and not meant as a default api

Instances
(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Column Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Column Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Column InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Row Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Row Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Row InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

DenseLayout (Format Direct Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

DenseLayout (Format Direct Strided (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

class Layout form rank => RectilinearLayout form (rank :: Nat) (oriented :: MajorOrientation) | form -> rank oriented where Source #

RectilinearLayout is the type class that supports the modle widely usable class of slicing operations in Numerical. for every instance RectilinearLayout format rank orientation, a corresponding RectOrientationForm form , RectDownRankForm form and InnerContigForm form type family instance should be defined

The purpose of RectilinearLayout class is to provide

Methods

formRectOrientation :: p form -> SMajorOrientation oriented Source #

formRectOrientation provides a runtime mechanism for reflecting the orientation of the format

rectlinearShape :: form -> Index rank Source #

For rectlinearShape form==shp, we always have that basicLogicalShape form weaklyDominates shp. when strictlyDominates holds, that implies that the underlying array format is a rectilinear layout whose "elements" are tiles of a fixed size array format. For this initial release and initial set of applicable rectilinear array formats, the following is always true basicLogicalShape form == basicLogicalShape' form Should be O(1) always. Or more precisely O(rank)

unconsOuter :: S down ~ rank => p form -> Shape rank a -> (a, Shape down a) Source #

consOuter :: S down ~ rank => p form -> a -> Shape down a -> Shape rank a Source #

majorAxisSlice :: form -> (Int, Int) -> form Source #

majorAxisSlice fm (x,y) requires that y-x>=1, ie that more than one sub range wrt the major axis be selected, so that the logical rank of the selected array stays the same. This operation also preserves memory locality as applicable. O(1) / O(rank)

majorAxisProject :: (RectilinearLayout downForm subRank oriented, rank ~ S subRank, downForm ~ RectDownRankForm form) => form -> Int -> downForm Source #

majorAxixProject form x picks a "row" with respect to the outer most dimension of the array format. This will O(1) or O(rank)

rectlinearSlice :: (RectilinearLayout icForm rank oriented, icForm ~ InnerContigForm form) => form -> Index rank -> Index rank -> icForm Source #

this is the nonstrided subset of general array slice notation. Invoke as rectilinearSlice form leastCorner greatestCorner, where the least and greatest corners of the sub array are determined by the strictlyDominates partial order on the bounds of the sub array. For Dense array formats, this should be O(1) or more precisely O(rank) For the basic Sparse array formats thus far the complexity should be O(size of outermost dimension), which could be computed by fst . unconsOuter [form] . rectilinearShape $ form

type family LayoutAddress (form :: *) :: * Source #

Instances
type LayoutAddress (Format DirectSparse Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type LayoutAddress (Format Column locality rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format Column locality rank rep) = Address
type LayoutAddress (Format Row locality rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format Row locality rank rep) = Address
type LayoutAddress (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format Direct Strided (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type family LayoutLogicalFormat (form :: *) :: * Source #

every format has a "logical" sibling, that represents the address translation when the underlying buffer layer is contiguous and packed. So it could be claimed that any type that obeys a~LayoutLogicalFormat a is one that an be a legal instance of LayoutBuilder?

Instances
type LayoutLogicalFormat (Format Column cont n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Row cont n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Direct cont (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type family Transposed (form :: *) :: * Source #

Instances
type Transposed (Format DirectSparse Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type Transposed (Format CompressedSparseRow Contiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type Transposed (Format Column Contiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Column Strided rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Column Strided rank rep) = Format Row Strided rank rep
type Transposed (Format Column InnerContiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Row Contiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Row Strided rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Row Strided rank rep) = Format Column Strided rank rep
type Transposed (Format Row InnerContiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Direct Strided (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type family FormatStorageRep (a :: *) :: * Source #

Instances
type FormatStorageRep (Format lay ctg rnk rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

type FormatStorageRep (Format lay ctg rnk rep) = rep

type family RectOrientationForm form :: MajorOrientation Source #

Every instance of RectilinearLayout needs to have a corresponding RectOrientationForm, RectDownRankForm, and InnerContigForm

type family RectDownRankForm form :: * Source #

type family InnerContigForm form :: * Source #

data family Format lay (contiguity :: Locality) (rank :: Nat) rep Source #

Instances
Eq (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Data (Shape n Int), Typeable n, Typeable rep) => Data (Format Column Strided n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Format Column Strided n rep -> c (Format Column Strided n rep) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Format Column Strided n rep) #

toConstr :: Format Column Strided n rep -> Constr #

dataTypeOf :: Format Column Strided n rep -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Format Column Strided n rep)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Format Column Strided n rep)) #

gmapT :: (forall b. Data b => b -> b) -> Format Column Strided n rep -> Format Column Strided n rep #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Format Column Strided n rep -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Format Column Strided n rep -> r #

gmapQ :: (forall d. Data d => d -> u) -> Format Column Strided n rep -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Format Column Strided n rep -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Format Column Strided n rep -> m (Format Column Strided n rep) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Format Column Strided n rep -> m (Format Column Strided n rep) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Format Column Strided n rep -> m (Format Column Strided n rep) #

(Data (Shape n Int), Typeable n, Typeable rep) => Data (Format Column InnerContiguous n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Format Column InnerContiguous n rep -> c (Format Column InnerContiguous n rep) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Format Column InnerContiguous n rep) #

toConstr :: Format Column InnerContiguous n rep -> Constr #

dataTypeOf :: Format Column InnerContiguous n rep -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Format Column InnerContiguous n rep)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Format Column InnerContiguous n rep)) #

gmapT :: (forall b. Data b => b -> b) -> Format Column InnerContiguous n rep -> Format Column InnerContiguous n rep #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Format Column InnerContiguous n rep -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Format Column InnerContiguous n rep -> r #

gmapQ :: (forall d. Data d => d -> u) -> Format Column InnerContiguous n rep -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Format Column InnerContiguous n rep -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Format Column InnerContiguous n rep -> m (Format Column InnerContiguous n rep) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Format Column InnerContiguous n rep -> m (Format Column InnerContiguous n rep) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Format Column InnerContiguous n rep -> m (Format Column InnerContiguous n rep) #

Data rep => Data (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Format Direct Contiguous (S Z) rep -> c (Format Direct Contiguous (S Z) rep) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Format Direct Contiguous (S Z) rep) #

toConstr :: Format Direct Contiguous (S Z) rep -> Constr #

dataTypeOf :: Format Direct Contiguous (S Z) rep -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Format Direct Contiguous (S Z) rep)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Format Direct Contiguous (S Z) rep)) #

gmapT :: (forall b. Data b => b -> b) -> Format Direct Contiguous (S Z) rep -> Format Direct Contiguous (S Z) rep #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Format Direct Contiguous (S Z) rep -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Format Direct Contiguous (S Z) rep -> r #

gmapQ :: (forall d. Data d => d -> u) -> Format Direct Contiguous (S Z) rep -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Format Direct Contiguous (S Z) rep -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Format Direct Contiguous (S Z) rep -> m (Format Direct Contiguous (S Z) rep) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Format Direct Contiguous (S Z) rep -> m (Format Direct Contiguous (S Z) rep) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Format Direct Contiguous (S Z) rep -> m (Format Direct Contiguous (S Z) rep) #

Show (BufferPure rep Int) => Show (Format DirectSparse Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Show (ContiguousCompressedSparseMatrix rep) => Show (Format CompressedSparseColumn Contiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Show (InnerContiguousCompressedSparseMatrix rep) => Show (Format CompressedSparseColumn InnerContiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Show (ContiguousCompressedSparseMatrix rep) => Show (Format CompressedSparseRow Contiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Show (InnerContiguousCompressedSparseMatrix rep) => Show (Format CompressedSparseRow InnerContiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Show (Shape n Int) => Show (Format Column Strided n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Show (Shape n Int) => Show (Format Column InnerContiguous n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Show (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Column Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Column Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Column InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Row Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Row Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Foldable (Shape rank), Traversable (Shape rank)) => DenseLayout (Format Row InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Column Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Column Contiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Column Contiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Column Contiguous rank rep)) => Format Column Contiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Column Contiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Column Contiguous rank rep) => Format Column Contiguous rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Column Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Column Strided rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Column Strided rank rep) => Format Column Strided rank rep -> logicalForm Source #

transposedLayout :: (Format Column Strided rank rep ~ Transposed transform, transform ~ Transposed (Format Column Strided rank rep)) => Format Column Strided rank rep -> transform Source #

basicCompareIndex :: p (Format Column Strided rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Column Strided rank rep) => Format Column Strided rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Column InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Column InnerContiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Column InnerContiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Column InnerContiguous rank rep)) => Format Column InnerContiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Column InnerContiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Column InnerContiguous rank rep) => Format Column InnerContiguous rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Row Contiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Row Contiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Row Contiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Row Contiguous rank rep)) => Format Row Contiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Row Contiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Row Contiguous rank rep) => Format Row Contiguous rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Row Strided rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Row Strided rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Row Strided rank rep) => Format Row Strided rank rep -> logicalForm Source #

transposedLayout :: (Format Row Strided rank rep ~ Transposed transform, transform ~ Transposed (Format Row Strided rank rep)) => Format Row Strided rank rep -> transform Source #

basicCompareIndex :: p (Format Row Strided rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Row Strided rank rep) => Format Row Strided rank rep -> address -> Int -> Maybe address Source #

(Applicative (Shape rank), Traversable (Shape rank)) => Layout (Format Row InnerContiguous rank rep) rank Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Row InnerContiguous rank rep -> Shape rank Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> logicalForm Source #

transposedLayout :: (Format Row InnerContiguous rank rep ~ Transposed transform, transform ~ Transposed (Format Row InnerContiguous rank rep)) => Format Row InnerContiguous rank rep -> transform Source #

basicCompareIndex :: p (Format Row InnerContiguous rank rep) -> Shape rank Int -> Shape rank Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Index rank -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Index rank Source #

basicNextAddress :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Index rank -> Maybe address -> Maybe (Index rank, address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Row InnerContiguous rank rep) => Format Row InnerContiguous rank rep -> address -> Int -> Maybe address Source #

(Foldable (Shape r), Traversable (Shape r), Applicative (Shape r)) => LayoutBuilder (Format Column Contiguous r rep) r Source # 
Instance details

Defined in Numerical.Array.Layout.Builder

Methods

buildFormatM :: (store ~ FormatStorageRep (Format Column Contiguous r rep), Buffer store Int, Buffer store a, PrimMonad m) => Index r -> proxy (Format Column Contiguous r rep) -> a -> Maybe (BatchInit (Index r, a)) -> m (Format Column Contiguous r rep, BufferMut store (PrimState m) a) Source #

(Foldable (Shape r), Traversable (Shape r), Applicative (Shape r)) => LayoutBuilder (Format Row Contiguous r rep) r Source # 
Instance details

Defined in Numerical.Array.Layout.Builder

Methods

buildFormatM :: (store ~ FormatStorageRep (Format Row Contiguous r rep), Buffer store Int, Buffer store a, PrimMonad m) => Index r -> proxy (Format Row Contiguous r rep) -> a -> Maybe (BatchInit (Index r, a)) -> m (Format Row Contiguous r rep, BufferMut store (PrimState m) a) Source #

DenseLayout (Format Direct Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

DenseLayout (Format Direct Strided (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Vector (BufferPure rep) Int => Layout (Format DirectSparse Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Methods

basicLogicalShape :: Format DirectSparse Contiguous (S Z) rep -> Shape (S Z) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> logicalForm Source #

transposedLayout :: (Format DirectSparse Contiguous (S Z) rep ~ Transposed transform, transform ~ Transposed (Format DirectSparse Contiguous (S Z) rep)) => Format DirectSparse Contiguous (S Z) rep -> transform Source #

basicCompareIndex :: p (Format DirectSparse Contiguous (S Z) rep) -> Shape (S Z) Int -> Shape (S Z) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Index (S Z) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Index (S Z) Source #

basicNextAddress :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Index (S Z) -> Maybe address -> Maybe (Index (S Z), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format DirectSparse Contiguous (S Z) rep) => Format DirectSparse Contiguous (S Z) rep -> address -> Int -> Maybe address Source #

Vector (BufferPure rep) Int => Layout (Format CompressedSparseRow Contiguous (S (S Z)) rep) (S (S Z)) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

Methods

basicLogicalShape :: Format CompressedSparseRow Contiguous (S (S Z)) rep -> Shape (S (S Z)) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> logicalForm Source #

transposedLayout :: (Format CompressedSparseRow Contiguous (S (S Z)) rep ~ Transposed transform, transform ~ Transposed (Format CompressedSparseRow Contiguous (S (S Z)) rep)) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> transform Source #

basicCompareIndex :: p (Format CompressedSparseRow Contiguous (S (S Z)) rep) -> Shape (S (S Z)) Int -> Shape (S (S Z)) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Index (S (S Z)) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Index (S (S Z)) Source #

basicNextAddress :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Index (S (S Z)) -> Maybe address -> Maybe (Index (S (S Z)), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) => Format CompressedSparseRow Contiguous (S (S Z)) rep -> address -> Int -> Maybe address Source #

Layout (Format Direct Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Direct Contiguous (S Z) rep -> Shape (S Z) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> logicalForm Source #

transposedLayout :: (Format Direct Contiguous (S Z) rep ~ Transposed transform, transform ~ Transposed (Format Direct Contiguous (S Z) rep)) => Format Direct Contiguous (S Z) rep -> transform Source #

basicCompareIndex :: p (Format Direct Contiguous (S Z) rep) -> Shape (S Z) Int -> Shape (S Z) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Index (S Z) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Index (S Z) Source #

basicNextAddress :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Index (S Z) -> Maybe address -> Maybe (Index (S Z), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Direct Contiguous (S Z) rep) => Format Direct Contiguous (S Z) rep -> address -> Int -> Maybe address Source #

Layout (Format Direct Strided (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

Methods

basicLogicalShape :: Format Direct Strided (S Z) rep -> Shape (S Z) Int Source #

basicLogicalForm :: logicalForm ~ LayoutLogicalFormat (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> logicalForm Source #

transposedLayout :: (Format Direct Strided (S Z) rep ~ Transposed transform, transform ~ Transposed (Format Direct Strided (S Z) rep)) => Format Direct Strided (S Z) rep -> transform Source #

basicCompareIndex :: p (Format Direct Strided (S Z) rep) -> Shape (S Z) Int -> Shape (S Z) Int -> Ordering Source #

basicAddressRange :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Maybe (Range address) Source #

basicToAddress :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Index (S Z) -> Maybe address Source #

basicToIndex :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Index (S Z) Source #

basicNextAddress :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Maybe address Source #

basicNextIndex :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Index (S Z) -> Maybe address -> Maybe (Index (S Z), address) Source #

basicAddressPopCount :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> Range address -> Int Source #

basicAddressAsInt :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Int Source #

basicAffineAddressShift :: address ~ LayoutAddress (Format Direct Strided (S Z) rep) => Format Direct Strided (S Z) rep -> address -> Int -> Maybe address Source #

Buffer rep Int => LayoutBuilder (Format DirectSparse Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Builder

Methods

buildFormatM :: (store ~ FormatStorageRep (Format DirectSparse Contiguous (S Z) rep), Buffer store Int, Buffer store a, PrimMonad m) => Index (S Z) -> proxy (Format DirectSparse Contiguous (S Z) rep) -> a -> Maybe (BatchInit (Index (S Z), a)) -> m (Format DirectSparse Contiguous (S Z) rep, BufferMut store (PrimState m) a) Source #

Buffer rep Int => LayoutBuilder (Format CompressedSparseRow Contiguous (S (S Z)) rep) (S (S Z)) Source # 
Instance details

Defined in Numerical.Array.Layout.Builder

Methods

buildFormatM :: (store ~ FormatStorageRep (Format CompressedSparseRow Contiguous (S (S Z)) rep), Buffer store Int, Buffer store a, PrimMonad m) => Index (S (S Z)) -> proxy (Format CompressedSparseRow Contiguous (S (S Z)) rep) -> a -> Maybe (BatchInit (Index (S (S Z)), a)) -> m (Format CompressedSparseRow Contiguous (S (S Z)) rep, BufferMut store (PrimState m) a) Source #

LayoutBuilder (Format Direct Contiguous (S Z) rep) (S Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Builder

Methods

buildFormatM :: (store ~ FormatStorageRep (Format Direct Contiguous (S Z) rep), Buffer store Int, Buffer store a, PrimMonad m) => Index (S Z) -> proxy (Format Direct Contiguous (S Z) rep) -> a -> Maybe (BatchInit (Index (S Z), a)) -> m (Format Direct Contiguous (S Z) rep, BufferMut store (PrimState m) a) Source #

data Format Column Contiguous n rep Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

data Format Column Strided n rep Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

data Format Column InnerContiguous n rep Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

data Format Row Contiguous n rep Source #

Format Row Contiguous n is a rank n Array

Instance details

Defined in Numerical.Array.Layout.Dense

data Format Row Strided n rep Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

data Format Row InnerContiguous n rep Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

data Format DirectSparse Contiguous (S Z) rep Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

data Format CompressedSparseColumn Contiguous (S (S Z)) rep Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

data Format CompressedSparseColumn InnerContiguous (S (S Z)) rep Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

data Format CompressedSparseRow Contiguous (S (S Z)) rep Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

data Format CompressedSparseRow InnerContiguous (S (S Z)) rep Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

data Format Direct Contiguous (S Z) rep Source #

Format Direct Contiguous (S Z) is a 1dim array Layout with unit stride

Instance details

Defined in Numerical.Array.Layout.Dense

data Format Direct Strided (S Z) rep Source #

Format Direct Strided (S Z) is a 1dim array Layout with a regular stride >= 1

Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Column cont n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Row cont n rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Direct cont (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutLogicalFormat (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format DirectSparse Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type LayoutAddress (Format CompressedSparseRow Contiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type LayoutAddress (Format Column locality rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format Column locality rank rep) = Address
type LayoutAddress (Format Row locality rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format Row locality rank rep) = Address
type LayoutAddress (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type LayoutAddress (Format Direct Strided (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format DirectSparse Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type Transposed (Format CompressedSparseRow Contiguous (S (S Z)) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Sparse

type Transposed (Format Column Contiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Column Strided rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Column Strided rank rep) = Format Row Strided rank rep
type Transposed (Format Column InnerContiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Row Contiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Row Strided rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Row Strided rank rep) = Format Column Strided rank rep
type Transposed (Format Row InnerContiguous rank rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Direct Contiguous (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type Transposed (Format Direct Strided (S Z) rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Dense

type FormatStorageRep (Format lay ctg rnk rep) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

type FormatStorageRep (Format lay ctg rnk rep) = rep

newtype TaggedShape (form :: *) (rank :: Nat) Source #

this is kinda a hack

Constructors

TaggedShape 

Fields

Instances
Eq (Shape rank Int) => Eq (TaggedShape f rank) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

Methods

(==) :: TaggedShape f rank -> TaggedShape f rank -> Bool #

(/=) :: TaggedShape f rank -> TaggedShape f rank -> Bool #

(Eq (Shape rank Int), Layout form rank) => Ord (TaggedShape form rank) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

Methods

compare :: TaggedShape form rank -> TaggedShape form rank -> Ordering #

(<) :: TaggedShape form rank -> TaggedShape form rank -> Bool #

(<=) :: TaggedShape form rank -> TaggedShape form rank -> Bool #

(>) :: TaggedShape form rank -> TaggedShape form rank -> Bool #

(>=) :: TaggedShape form rank -> TaggedShape form rank -> Bool #

max :: TaggedShape form rank -> TaggedShape form rank -> TaggedShape form rank #

min :: TaggedShape form rank -> TaggedShape form rank -> TaggedShape form rank #

Show (Shape rank Int) => Show (TaggedShape f rank) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

Methods

showsPrec :: Int -> TaggedShape f rank -> ShowS #

show :: TaggedShape f rank -> String #

showList :: [TaggedShape f rank] -> ShowS #

data GDSlice (from :: Nat) (to :: Nat) :: * where Source #

Generalized Dense Slice Projection notation, not sure if it should be defined in this module or elsewhere This provides a type safe interface for the classical general array slice notation. That said, its only useful for dense array formats, at least in general. For formats that aren't "rectilinear dense", this COULD be used as a description format for traversing over various rectilinear subsets of points though?

Constructors

GDNil :: GDSlice Z Z 
GDPick :: Int -> !(GDSlice from to) -> GDSlice (S from) to 
GDRange :: (Int, Int, Int) -> !(GDSlice from to) -> GDSlice (S from) (S to) 
GDAll :: !(GDSlice from to) -> GDSlice (S from) (S to) 
Instances
Show (GDSlice f Z) => Show (GDSlice (S f) Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

Methods

showsPrec :: Int -> GDSlice (S f) Z -> ShowS #

show :: GDSlice (S f) Z -> String #

showList :: [GDSlice (S f) Z] -> ShowS #

(Show (GDSlice f (S t)), Show (GDSlice f t)) => Show (GDSlice (S f) (S t)) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

Methods

showsPrec :: Int -> GDSlice (S f) (S t) -> ShowS #

show :: GDSlice (S f) (S t) -> String #

showList :: [GDSlice (S f) (S t)] -> ShowS #

Show (GDSlice Z Z) Source # 
Instance details

Defined in Numerical.Array.Layout.Base

data MajorOrientation Source #

these names aren't ideal, but lets punt on bikeshedding till theres >= 2 serious users

Instances
Data MajorOrientation Source # 
Instance details

Defined in Numerical.Array.Layout.Base

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MajorOrientation -> c MajorOrientation #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MajorOrientation #

toConstr :: MajorOrientation -> Constr #

dataTypeOf :: MajorOrientation -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MajorOrientation) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MajorOrientation) #

gmapT :: (forall b. Data b => b -> b) -> MajorOrientation -> MajorOrientation #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MajorOrientation -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MajorOrientation -> r #

gmapQ :: (forall d. Data d => d -> u) -> MajorOrientation -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MajorOrientation -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MajorOrientation -> m MajorOrientation #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MajorOrientation -> m MajorOrientation #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MajorOrientation -> m MajorOrientation #

All the various helper types