aboutsummaryrefslogtreecommitdiffstats
path: root/src/Vivant/Common.hs
blob: fd90233a880ef1790aad5df0042a920bc438c158 (plain)
1
2
3
4
5
6
7
8
9
module Vivant.Common
  (vectorSize)
where

import qualified Data.Vector.Storable as V
import Foreign.Storable (sizeOf)

vectorSize :: (Num b, V.Storable a) => V.Vector a -> b
vectorSize array = fromIntegral $ V.length array * sizeOf (1.0 :: Float)