anchor.diff:                                  else [| int noLbl; int LblState.Conflict |] // new LabelWithState(noLbl, LblState.Conflict)
                       
                           let processRule rule ruleIndex i k l =
  -                            let rule = getRuleStruct rule
  -                            if rule.R2 <> 0us then
  +                            let r2 = getR2 rule
  +                            if r2 <> 0us then
                                   let leftStart = ( k * rowSize + i - calcDiff k ) * nTermsCount
                                   let rightStart = ( (l-k-1) * rowSize + k+i+1 - (calcDiff (l-k-1)) ) * nTermsCount
   
                                   for m in 0..nTermsCount - 1 do
                                       let leftCell:CellData = recTable.[leftStart + m]
  -                                    if not (isCellDataEmpty (leftCell)) && getCellRuleTop leftCell rules = rule.R1 then
  -                                        let cellData1 = getCellDataStruct leftCell
  +                                    let r1 = getR1 rule
  +                                    if not (isCellDataEmpty (leftCell)) && getCellRuleTop leftCell rules = r1 then
                                           for n in 0..nTermsCount - 1 do
                                               let rightCell = recTable.[rightStart + n]
  -                                            if not (isCellDataEmpty (rightCell)) && getCellRuleTop rightCell rules = rule.R2 then
  -                                                let cellData2 = getCellDataStruct rightCell
  -                                                let lblWithState = chooseNewLabel rule.Label cellData1.Label cellData2.Label cellData1.LabelState cellData2.LabelState
  -                                                let newWeight = 0uy//weightCalcFun rule.Weight cellData1.Weight cellData2.Weight
  +                                            if not (isCellDataEmpty (rightCell)) && getCellRuleTop rightCell rules = r2 then
  +                                                let label = getRuleLabel rule
  +                                                let label1 = getCellLabel leftCell.rData
  +                                                let lState1 = getLblState leftCell.rData
  +                                                let label2 = getCellLabel rightCell.rData
  +                                                let lState2 = getLblState rightCell.rData
  +                                                let lblWithState = chooseNewLabel label label1 label2 lState1 lState2
  +                                                
  +                                                let weight = getRuleWeight rule
  +                                                let weight1 = getCellWeight leftCell.rData
  +                                                let weight2 = getCellWeight rightCell.rData
  +                                                let newWeight = 0uy // weightCalcFun weight weight1 weight2
  +                                                
                                                   let currentElem = buildData ruleIndex (toState (lblWithState.[1])) (byte lblWithState.[0]) newWeight
  -                                                recTable.[( l * rowSize + i - calcDiff l ) * nTermsCount + int rule.RuleName - 1].rData <- currentElem
  -                                                recTable.[( l * rowSize + i - calcDiff l ) * nTermsCount + int rule.RuleName - 1]._k <- uint32 k
  -                                                    // <- new CellData(currentElem, uint32 k) |> Some
  +                                                let ruleName = int (getRuleName rule)
  +                                                let index = ( l * rowSize + i - calcDiff l ) * nTermsCount + ruleName - 1 
  +                                                recTable.[index].rData <- currentElem
  +                                                recTable.[index]._k <- uint32 k
   
                           for k in 0..(len-1) do
                               let curRule:RuleIndexed = rulesIndexed.[k]
  -                        
  -                            let h = ref 0
  -                            h := 9
  -                            
  -                            //processRule curRule.Rule curRule.Index i k len
  +                                                    
  +                            processRule curRule.Rule curRule.Index i k len
                       
               @>
       
  
positive.code: open Brahma.FSharp.OpenCL.Extensions
  
  open System.Collections.Generic
  
  
  type GPUWork(extRowSize, extNTermsCount, extRecTable:_[], extRules, extRulesIndexed:_[]) =
  
  
negative.code:         // computation grid configuration: 2D grid with size = rows*columns and local block with size=localWorkSize*localWorkSize
          let d =(new _3D(rulesIndexed.Length, recTable.Length, recTable.Length, maxLocalWorkSize, maxLocalWorkSize, maxLocalWorkSize))
          // Prepare kernel. Pass actual parameters for computation:
          kernelPrepare d rulesIndexed recTable rules
          // Add command into queue and finish it
          let _ = commandQueue.Add(kernelRun()).Finish()
      
  