- Timestamp:
- 10/11/12 17:48:27 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r8436 r8798 565 565 case OpCodes.Variable: { 566 566 VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode; 567 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array 568 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); 569 // load correct column of the current variable 570 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref); 571 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex 567 572 if (!state.InLaggedContext) { 568 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array569 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0);570 // load correct column of the current variable571 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);572 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex573 573 il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue); 574 574 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight … … 577 577 var nanResult = il.DefineLabel(); 578 578 var normalResult = il.DefineLabel(); 579 var cachedValue = il.DefineLabel();580 var multiplyValue = il.DefineLabel();581 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex582 579 il.Emit(System.Reflection.Emit.OpCodes.Dup); 583 580 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); … … 586 583 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, ds.Rows); 587 584 il.Emit(System.Reflection.Emit.OpCodes.Bge, nanResult); 588 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_3);589 il.Emit(System.Reflection.Emit.OpCodes.Bge, cachedValue);590 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array591 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0);592 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);593 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex594 585 il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue); 595 il.Emit(System.Reflection.Emit.OpCodes.Br, multiplyValue);596 il.MarkLabel(cachedValue);597 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_2); // load cached values array598 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0);599 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);600 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex601 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_3); // startRow602 il.Emit(System.Reflection.Emit.OpCodes.Sub); // startRow603 il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);604 il.MarkLabel(multiplyValue);605 586 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight 606 587 il.Emit(System.Reflection.Emit.OpCodes.Mul); … … 608 589 il.MarkLabel(nanResult); 609 590 il.Emit(System.Reflection.Emit.OpCodes.Pop); // rowIndex 591 il.Emit(System.Reflection.Emit.OpCodes.Pop); // column reference 610 592 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, double.NaN); 611 593 il.MarkLabel(normalResult); … … 616 598 var nanResult = il.DefineLabel(); 617 599 var normalResult = il.DefineLabel(); 618 var cachedValue = il.DefineLabel();619 var multiplyValue = il.DefineLabel();620 600 LaggedVariableTreeNode varNode = (LaggedVariableTreeNode)currentInstr.dynamicNode; 601 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array 602 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); 603 // load correct column of the current variable 604 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref); 621 605 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, varNode.Lag); // lag 622 606 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex … … 628 612 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, ds.Rows); 629 613 il.Emit(System.Reflection.Emit.OpCodes.Bge, nanResult); 630 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_3); // startindex631 il.Emit(System.Reflection.Emit.OpCodes.Bge, cachedValue);632 // normal value633 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array634 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); // load correct column of the current variable635 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);636 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, varNode.Lag); // lag637 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex638 il.Emit(System.Reflection.Emit.OpCodes.Add); // actualRowIndex = rowIndex + sampleOffset639 614 il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue); 640 il.Emit(System.Reflection.Emit.OpCodes.Br, multiplyValue);641 il.MarkLabel(cachedValue);642 // cached value643 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_2); // load cached values644 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); // load correct column of the current variable645 il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);646 il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, varNode.Lag); // lag647 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // rowIndex648 il.Emit(System.Reflection.Emit.OpCodes.Add); // actualRowIndex = rowIndex + sampleOffset649 il.Emit(System.Reflection.Emit.OpCodes.Ldarg_3); // startRow650 il.Emit(System.Reflection.Emit.OpCodes.Sub); // startRow651 il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);652 653 il.MarkLabel(multiplyValue);654 615 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight 655 616 il.Emit(System.Reflection.Emit.OpCodes.Mul); 656 617 il.Emit(System.Reflection.Emit.OpCodes.Br, normalResult); 657 618 il.MarkLabel(nanResult); 658 il.Emit(System.Reflection.Emit.OpCodes.Pop); // pop the row index 619 il.Emit(System.Reflection.Emit.OpCodes.Pop); // sample index 620 il.Emit(System.Reflection.Emit.OpCodes.Pop); // column reference 659 621 il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, double.NaN); 660 622 il.MarkLabel(normalResult); … … 769 731 return alglib.besseli0(x); 770 732 } 771 772 733 } 773 734 }
Note: See TracChangeset
for help on using the changeset viewer.