Copyright | (c) Sam Stites 2017 |
---|---|

License | BSD3 |

Maintainer | sam@stites.io |

Stability | experimental |

Portability | non-portable |

Safe Haskell | None |

Language | Haskell2010 |

Redundant version of `Torch.Indef.{Dynamic/Static}.Tensor`

for Byte tensors.

This comes with the same fixme as `Index`

:

FIXME: in the future, there could be a smaller subset of Torch which could
be compiled to to keep the code dry. Alternatively, if backpack one day
supports recursive indefinites, we could use this feature to possibly remove
this package and `Mask`

.

## Synopsis

- newMask :: forall d. Dimensions d => MaskTensor d
- newMaskDyn :: Dims (d :: [Nat]) -> MaskDynamic
- newMaskDyn' :: SomeDims -> MaskDynamic
- withMask :: MaskDynamic -> (Ptr CMaskTensor -> IO x) -> IO x
- allOf :: IsMask t => t -> Bool

# Documentation

newMask :: forall d. Dimensions d => MaskTensor d Source #

build a new mask tensor with any known Dimension list.

newMaskDyn :: Dims (d :: [Nat]) -> MaskDynamic Source #

build a new dynamic mask tensor with any known Nat list.

newMaskDyn' :: SomeDims -> MaskDynamic Source #

withMask :: MaskDynamic -> (Ptr CMaskTensor -> IO x) -> IO x Source #

run a function with access to a dynamic index tensor's raw c-pointer.