-- Create an array from its representation function, uploading the result to the
-- device
--
newArray :: (Shape sh, Elt e) => sh -> (sh -> e) -> CIO (Array sh e)
newArray sh f =
  let arr = Sugar.newArray sh f
  in do
      useArray arr
      return arr


-- Allocate a new, uninitialised Accelerate array on host and device
--
newArray :: (Shape sh, Elt e) => sh -> (sh -> e) -> CIO (Array sh e)
newArray sh f =
  let arr = Sugar.newArray sh f
  in do
      useArray arr
      return arr


-- Allocate a new, uninitialised Accelerate array on host and device
--
newArray sh f =
  let arr = Sugar.newArray sh f
  in do
      useArray arr
      return arr


-- Allocate a new, uninitialised Accelerate array on host and device
--