{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Numeric.BLAS.Matrix.Layout where import Control.DeepSeq (NFData, rnf) data Order = RowMajor | ColumnMajor deriving (Eq, Show) instance NFData Order where rnf RowMajor = () rnf ColumnMajor = () flipOrder :: Order -> Order flipOrder RowMajor = ColumnMajor flipOrder ColumnMajor = RowMajor transposeFromOrder :: Order -> Char transposeFromOrder RowMajor = 'T' transposeFromOrder ColumnMajor = 'N'