anchor.diff:          // generate random data
           let cnt = 1 <<< 24
           let rand = RandomSystem()
  -        let inputData = Array.init cnt (fun _ -> M44f.Rotation(rand.UniformV3dDirection() |> V3f, rand.UniformFloat() * float32 Constant.PiTimesTwo))
  +        let inputData = Array.init cnt (fun _ -> M44f.Rotation(V3f(rand.UniformV3dDirection()), float32 <| rand.UniformDouble() * Constant.PiTimesTwo))
   
           // compile a scan using (+) as accumulation function
           let scanner = app.Runtime.CompileScan <@ (*) @>
   
           // create buffers holding the in-/output
  -        let input   = device.CreateBuffer<M44f>(inputData)
  -        let output  = device.CreateBuffer<M44f>(int64 cnt)
  +        let input   = device.CreateBuffer(inputData)
  +        let output  = device.CreateBuffer(int64 cnt)
   
           // perform the scan once
           device.perform {
  
positive.code:                 member x.Dispose() = x.Dispose()
  
  
      [<AbstractClass; Sealed; Extension>]
      type DeviceScanExtensions private() =
          [<Extension>]
  
negative.code: 
              do device.OnDispose.Add (fun _ -> release())
  
              member x.Invoke(input : IBufferVector<'a>, output : IBufferVector<'a>) =
                  let rec build (input : IBufferVector<'a>) (output : IBufferVector<'a>) =
                      command {
                          let cnt = int input.Size
                          let args0 = ComputeShader.newInputBinding scan pool
  
                          try
                              args0.["inputOffset"] <- input.Offset |> int
                              args0.["inputDelta"] <- input.Delta |> int
                              args0.["inputSize"] <- input.Size |> int
                              args0.["inputData"] <- input.Buffer
                              args0.["outputOffset"] <- output.Offset |> int
                              args0.["outputDelta"] <- output.Delta |> int
                              args0.["outputData"] <- output.Buffer
                              args0.Flush()
  
                              do! Command.Bind scan
                              do! Command.SetInputs args0
                              do! Command.Dispatch(ceilDiv (int input.Size) scanSize)
                              do! Command.SyncWrite(output.Buffer)
  
                              let oSums = output.[int64 scanSize - 1L .. ].Strided(scanSize)
                              if oSums.Size > 1L then
                              
                                  do! build oSums oSums
  
                                  let args1 = ComputeShader.newInputBinding fixup pool
                                  try
                                      args1.["inputData"] <- oSums.Buffer
                                      args1.["inputOffset"] <- oSums.Offset |> int
                                      args1.["inputDelta"] <- oSums.Delta |> int
                                      args1.["outputData"] <- output.Buffer
                                      args1.["outputOffset"] <- output.Offset |> int
                                      args1.["outputDelta"] <- output.Delta |> int
                                      args1.["count"] <- output.Size |> int
                                      args1.["groupSize"] <- scanSize
                                      args1.Flush()
  
                                      do! Command.Bind fixup
                                      do! Command.SetInputs args1
                                      do! Command.Dispatch(ceilDiv (int output.Size - scanSize) halfScanSize)
                                      do! Command.SyncWrite(output.Buffer)
                                  finally
                                      args1.Dispose()
  
  
                          finally
                              args0.Dispose()
                      }
  
                  if input.Size > 1L then
                      build input output
                  else
                      Command.Nop
  
              member x.Compile(input : Buffer<'a>, output : Buffer<'a>) =
                  let cmd = device.GraphicsFamily.DefaultCommandPool.CreateCommandBuffer(CommandBufferLevel.Primary)
  