anchor.diff:          let times = stopwatches.Download()
   
           Map.ofList [
  -            "dct", MicroTime times.[0]
  +            "dct",  MicroTime times.[0]
               "code", MicroTime times.[1]
  -            "asm", MicroTime times.[2]
  -            "scan", MicroTime times.[3]
  -        ]
  +            "scan", MicroTime times.[2]
  +            "zero", MicroTime times.[3]
  +            "asm",  MicroTime times.[4]
  +        ] 
   
   
       member x.DownloadStream() =
  
positive.code:         i.Flush()
          i
  
      let stopwatches = parent.DescriptorPool.CreateStopwatchPool(4)
  
      let dctCommand =
          command {
  
negative.code: 
      [<GLSLIntrinsic("fma({0}, {1}, {2})")>]
      let fma (a : float) (b : float) (c : float) : float = failwith ""
  
  
      let C = Array.init 8 (fun i -> cos (Constant.Pi / 16.0 * float i))
      let S = C |> Array.mapi (fun i c -> if i = 0 then 1.0 / (2.0 * Constant.Sqrt2) else 1.0 / (4.0 * c))
      let A = [| 0.0; C.[4]; C.[2] - C.[6]; C.[4]; C.[6] + C.[2]; C.[6] |]
  
      [<LocalSize(X = 32)>]
      let fdct (target : V4i[]) =
          compute {
              let values : V3d[] = allocateShared 256
              let lid = getLocalId().X
              let wid = getWorkGroupId().X
  
              let vOffset = wid * 64
  
  
  
              let s = inputImage.Size
              let totalBlocks = V2i((if s.X % 8 = 0 then s.X / 8 else 1 + s.X / 8), (if s.Y % 8 = 0 then s.Y / 8 else 1 + s.Y/ 8))
  
              let bid = 4 * wid + (lid / 8)
              let bCoord = V2i(bid % totalBlocks.X, bid / totalBlocks.X)
              
  
              let li = lid % 8
              let iOff = 8 * bCoord
              let rOffset = vOffset + 8 * li
              let v0 = ycbcr inputImage.[iOff + V2i(0, li), 0].XYZ
              let v1 = ycbcr inputImage.[iOff + V2i(1, li), 0].XYZ
              let v2 = ycbcr inputImage.[iOff + V2i(2, li), 0].XYZ
              let v3 = ycbcr inputImage.[iOff + V2i(3, li), 0].XYZ
              let v4 = ycbcr inputImage.[iOff + V2i(4, li), 0].XYZ
              let v5 = ycbcr inputImage.[iOff + V2i(5, li), 0].XYZ
              let v6 = ycbcr inputImage.[iOff + V2i(6, li), 0].XYZ
              let v7 = ycbcr inputImage.[iOff + V2i(7, li), 0].XYZ
  
              // dct on [rOffset .. rOffset + 7]
              let v8 = v0 + v3
              let v9 = v1 + v2
              let v10 = v1 - v2
              let v11 = v0 - v3
              let v12 = -v4 - v5
              let v13 = (v5 + v6) * A.[3]
              let v14 = v6 + v7
  
              let v15 = v8 + v9;
              let v16 = v8 - v9;
              let v17 = (v10 + v11) * A.[1]
              let v18 = (v12 + v14) * A.[5]
  
              let v19 = -v12 * A.[2] - v18
              let v20 = v14 * A.[4] - v18
  
              let v21 = v17 + v11
              let v22 = v11 - v17
              let v23 = v13 + v7
              let v24 = v7 - v13
  
              let v25 = v19 + v24
              let v26 = v23 + v20
              let v27 = v23 - v20
              let v28 = v24 - v19
  
              values.[rOffset + 0] <- S.[0] * v15
              values.[rOffset + 1] <- S.[1] * v26
              values.[rOffset + 2] <- S.[2] * v21
              values.[rOffset + 3] <- S.[3] * v28
              values.[rOffset + 4] <- S.[4] * v16
              values.[rOffset + 5] <- S.[5] * v25
              values.[rOffset + 6] <- S.[6] * v22
              values.[rOffset + 7] <- S.[7] * v27
              barrier()
  
              let cOffset = vOffset + li
              // dct on [cOffset .. 8 .. cOffset + ??]
              let w0 = values.[cOffset + 0]  + values.[cOffset + 56]
              let w1 = values.[cOffset + 8]  + values.[cOffset + 48]
              let w2 = values.[cOffset + 16] + values.[cOffset + 40]
              let w3 = values.[cOffset + 24] + values.[cOffset + 32]
              let w4 = values.[cOffset + 24] - values.[cOffset + 32]
              let w5 = values.[cOffset + 16] - values.[cOffset + 40]
              let w6 = values.[cOffset + 8]  - values.[cOffset + 48]
              let w7 = values.[cOffset + 0]  - values.[cOffset + 56]
  
              let w8 = w0 + w3
              let w9 = w1 + w2
              let w10 = w1 - w2
              let w11 = w0 - w3
              let w12 = -w4 - w5
              let w13 = (w5 + w6) * A.[3]
              let w14 = w6 + w7
  
              let w15 = w8 + w9;
              let w16 = w8 - w9;
              let w17 = (w10 + w11) * A.[1]
              let w18 = (w12 + w14) * A.[5]
  
              let w19 = -w12 * A.[2] - w18
              let w20 = w14 * A.[4] - w18
  
              let w21 = w17 + w11
              let w22 = w11 - w17
              let w23 = w13 + w7
              let w24 = w7 - w13
  
              let w25 = w19 + w24
              let w26 = w23 + w20
              let w27 = w23 - w20
              let w28 = w24 - w19
  
              values.[cOffset + 0]  <- S.[0] * w15
              values.[cOffset + 8]  <- S.[1] * w26
              values.[cOffset + 16] <- S.[2] * w21
              values.[cOffset + 24] <- S.[3] * w28
              values.[cOffset + 32] <- S.[4] * w16
              values.[cOffset + 40] <- S.[5] * w25
              values.[cOffset + 48] <- S.[6] * w22
              values.[cOffset + 56] <- S.[7] * w27
              barrier()
  
              if bCoord.X < totalBlocks.X && bCoord.Y < totalBlocks.Y then
                  // write rows to output
                  let tid = bid * 64 + li * 8
                  for i in 0 .. 7 do
                      let res = quantify (8 * li + i) values.[rOffset + i]
                      target.[tid + i] <- V4i(res,0)
          }
  
      [<LocalSize(X = 8, Y = 8)>]
      let dct (target : V4i[]) =
  