| Copyright | (c) Artem Chirkin |
|---|---|
| License | MIT |
| Maintainer | chirkin@arch.ethz.ch |
| Safe Haskell | None |
| Language | Haskell2010 |
Numeric.Commons
Contents
Description
- class PrimBytes a where
- class FloatBytes a where
- class DoubleBytes a where
- class IntBytes a where
- class WordBytes a where
Documentation
class PrimBytes a where Source #
Methods
toBytes :: a -> ByteArray# Source #
Store content of a data type in a primitive byte array
fromBytes :: ByteArray# -> a Source #
Load content of a data type from a primitive byte array
byteSize :: a -> Int# Source #
Size of a data type in bytes
byteAlign :: a -> Int# Source #
Alignment of a data type in bytes
Instances
| PrimBytes Double Source # | |
| PrimBytes Float Source # | |
| PrimBytes Int Source # | |
| PrimBytes Int8 Source # | |
| PrimBytes Int16 Source # | |
| PrimBytes Int32 Source # | |
| PrimBytes Int64 Source # | |
| PrimBytes Word Source # | |
| PrimBytes Word8 Source # | |
| PrimBytes Word16 Source # | |
| PrimBytes Word32 Source # | |
| PrimBytes Word64 Source # | |
| PrimBytes (TT t n m) => PrimBytes (Tensor t n m) Source # | |
class FloatBytes a where Source #
Primitive indexing. No checks, no safety.
Minimal complete definition
Instances
| FloatBytes Float Source # | |
| FloatBytes (TT t n m) => FloatBytes (Tensor t n m) Source # | |
class DoubleBytes a where Source #
Primitive indexing. No checks, no safety.
Minimal complete definition
Instances
| DoubleBytes Double Source # | |
| DoubleBytes (TT t n m) => DoubleBytes (Tensor t n m) Source # | |
class WordBytes a where Source #
Primitive indexing. No checks, no safety.
Minimal complete definition