anchor.diff:                      else maxBits
                   | None ->
                       //todo: do something 
  -                    failwith "not enough information"
  -
  -            let bufferSize = maxMatrixSize * maxMatrixSize * ntsCount
  -            
  +                    0
  +//                    failwith "not enough information"
  +
  +            let bufferSize = maxAllocatedBitsForVar
  +            
  +            let floorToPowerOf2 x = 
  +                let exp = (log (double x)) / (log 2.) |> ceil |> int
  +                1 <<< exp
  +
               let wgSizeRestriction = 
                   match maxWGSize with
                       | Some size -> size
  
positive.code:             fullTasks
              |> (if isParallel then Array.Parallel.iter else Array.iter) doOne 
  
          let _1DDoBrahmaMultiplications (getMatrix: NonTerminal -> ProbabilityMatrix.T) flushSubMatrix matricesCount matricesSize fullTasks helpers = 
              let matricesCellCount = matricesSize * matricesSize
              
              let cellGetter (from: SubMatrix.T) isTransponed = 
  
negative.code:             let ldc = matricesSize
          
              let dalpha = 1.
              helpers.mult1.Scatter(from1) 
              helpers.mult2.Scatter(from2) 
              let dbeta = 0.
  
              let doOne i =
                  let ptrShift = i * matricesCellCount
                  CUBLAS.Default.Dgemm(transa, transb, matricesSize, matricesSize, matricesSize, dalpha, helpers.mult2.Ptr + ptrShift, ldb, helpers.mult1.Ptr + ptrShift, lda, dbeta, helpers.result.Ptr + ptrShift, ldc)
  
              [|0..matricesCount - 1|]
              |> Array.iter doOne      
              
              let multiplicationResult = helpers.result.Gather()         
  
              let flushOneMatrix num = 
                  let matrix = 
  