module Vivant.Common (vectorSize, uncurry3) 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) uncurry3 :: (t1 -> t2 -> t3 -> t4) -> (t1, t2, t3) -> t4 uncurry3 f (a, b, c) = f a b c