anchor.diff:          }
   
       [<Literal>]
  -    let scanSize = 2048
  +    let scanSize = 192
   
       [<Literal>]
  -    let halfScanSize = 1024
  +    let halfScanSize = 96
   
       [<LocalSize(X = halfScanSize)>]
  -    let scan2048 (inputOffset : int) (inputDelta : int) (inputSize : int) (input : float[]) (outputOffset : int) (outputDelta : int) (output : float[]) =
  +    let scan2048 (inputOffset : int) (inputDelta : int) (inputSize : int) (inputData : int[]) (outputOffset : int) (outputDelta : int) (outputData : int[]) =
           compute {
  -            let mem : float[] = allocateShared scanSize
  +            let mem : int[] = allocateShared scanSize
               let gid = getGlobalId().X
   
               let gid0 = gid
  
positive.code:             let llid = 2 * lid0
              let rlid = llid + 1
  
              if lgid < inputSize then mem.[llid] <- input.[inputOffset + lgid * inputDelta]
              else mem.[llid] <- 0.0
  
              if rlid < inputSize then mem.[rlid] <- input.[inputOffset + rgid * inputDelta]
              else mem.[rlid] <- 0.0
  
              barrier()
              
  
negative.code:                 d <- d >>> 1
  
              if lgid < inputSize then
                  outputData.[outputOffset + lgid * outputDelta] <- mem.[llid]
              if rgid < inputSize then
                  outputData.[outputOffset + rgid * outputDelta] <- mem.[rlid]
  
          }
          
      [<LocalSize(X = halfScanSize)>]
      let addParentSum (inputData : int[]) (inputOffset : int) (inputDelta : int) (outputData : int[]) (outputOffset : int) (outputDelta : int) (groupSize : int) (count : int) =
          compute {
              let id = getGlobalId().X + groupSize
  
              if id < count then
                  let block = id / groupSize - 1
                
                  let iid = inputOffset + block * inputDelta
                  let oid = outputOffset + id * outputDelta
  
                  if id % groupSize <> groupSize - 1 then
                      outputData.[oid] <- outputData.[oid] + inputData.[iid]
  
          }
  
  