anchor.diff:    FContext := plat.CreateContext([FDevice]);
     FCmdQueue := FContext.CreateCommandQueue(FDevice);
     FMemReadQueue := FContext.CreateCommandQueue(FDevice);
  -  FMemWriteQueue := FContext.CreateCommandQueue(FDevice);
  +  // AMD dev suggests using two queues only (exec/mem), Intel is broken with separate read/write queues
  +  // so for now, use same queue for read/write
  +  //FMemWriteQueue := FContext.CreateCommandQueue(FDevice);
  +  FMemWriteQueue := FMemReadQueue;
  +  FKernelCache := TDictionaryImpl<string, CLKernel>.Create;
   end;
   
   function TComputeAlgorithmsOpenCLImpl.Transform(const Input,
  
positive.code:   i: UInt32;
  begin
    numInputs := Length(InputBuffers);
    vectorWidth := Max(1, Device.PreferredVectorWidthDouble);
    inputSize := NumElements * SizeOf(double);
    inputLength := NumElements;
    vectorSize := SizeOf(double) * vectorWidth;
  
negative.code: 
    kernelSrc := kernelGen.GenerateDoubleTransformKernel(Expression, numInputs);
  
    if not FKernelCache.Contains[kernelSrc] then
    begin
      WriteLn(kernelSrc);
  
      prog := Context.CreateProgram(kernelSrc);
      if not prog.Build([Device]) then
      begin
        raise Exception.Create('Error building OpenCL kernel:' + #13#10 + prog.BuildLog);
      end;
  
      WriteLn(prog.BuildLog);
  
      kernel := prog.CreateKernel('transform_double_' + IntToStr(numInputs));
      FKernelCache[kernelSrc] := kernel;
    end
    else
    begin
      kernel := FKernelCache[kernelSrc];
    end;
  
    for i := 0 to numInputs-1 do
    begin
  