anchor.diff:          loop 0)
   
   type Host() =
  -
  -    let makeAllocateMsg a =
  -        {
  -            new AllocateCrate with
  -                member __.Apply e = e.Eval a
  -        }
  -        |> MsgAllocate
  -
  -    let makeToHostMsg a =
  -        {
  -            new ToHostCrate with
  -                member __.Apply e = e.Eval a
  -        }
  -        |> MsgToHost
  -
  -    let makeToGPUMsg a =
  -        {
  -            new ToGPUCrate with
  -                member __.Apply e = e.Eval a
  -        }
  -        |> MsgToGPU
  -
       member this.Do () =
           let devices = Device.getDevices "*" DeviceType.Gpu
           printfn "Device: %A" devices.[0]
  
positive.code:                             | Some ch -> ch.Reply res
                              0
                  }
      member this.GetNewProcessor () = MailboxProcessor.Start(fun inbox ->
  
          let commandQueue = new Brahma.OpenCL.CommandQueue(clContext, device)
  
          printfn "MB is started"
          let rec loop i = async {
              printfn "In loop"
              let! msg = inbox.Receive()
              printfn "Message: %A" msg
              match msg with
              | MsgAllocate a ->
                  printfn "Allocation"
                  this.HandleAllocate a
  
              | MsgToHost a ->
                  printf "ToHost"
                  this.HandleToHost(commandQueue, a) |> ignore
  
              | MsgToGPU a ->
                  printf "ToGPU"
                  this.HandleToGPU(commandQueue, a) |> ignore
  
              return! loop 0
  
negative.code:                             let length = a.Size
                              let buf = new Brahma.OpenCL.Buffer<_>(clContext, Brahma.OpenCL.Operations.ReadWrite, true, length)
                              let res = new GpuArray<'a>(buf,a.Size)
                              result <- res
                  }
              result
  
      member private this.HandleToGPU (queue:Brahma.OpenCL.CommandQueue, toGpu:ToGPUCrate) =
          toGpu.Apply
  