private void Proc_1(Record_Type Pointer_Par_Val) { Record_Type Next_Record = Pointer_Par_Val.Record_Comp; Pointer_Par_Val.Record_Comp = Record_Glob; Pointer_Par_Val.Int_Comp = 5; Next_Record.Int_Comp = Pointer_Par_Val.Int_Comp; Next_Record.Record_Comp = Pointer_Par_Val.Record_Comp; Proc_3(Next_Record.Record_Comp); int[] Int_Ref = new int[1]; if (Next_Record.Discr == Ident_1) { Next_Record.Int_Comp = 6; Int_Ref[0] = Next_Record.Enum_Comp; Proc_6(Pointer_Par_Val.Enum_Comp, Int_Ref); Next_Record.Enum_Comp = Int_Ref[0]; Next_Record.Record_Comp = Record_Glob.Record_Comp; Int_Ref[0] = Next_Record.Int_Comp; Proc_7(Next_Record.Int_Comp, 10, Int_Ref); Next_Record.Int_Comp = Int_Ref[0]; } else { Pointer_Par_Val = Pointer_Par_Val.Record_Comp; } }
private void Proc_3(Record_Type Pointer_Par_Ref) { if (Record_Glob != null) { Pointer_Par_Ref = Record_Glob.Record_Comp; } else { Int_Glob = 100; } int[] Int_Comp_Ref = new int[1]; Int_Comp_Ref[0] = Record_Glob.Int_Comp; Proc_7(10, Int_Glob, Int_Comp_Ref); Record_Glob.Int_Comp = Int_Comp_Ref[0]; }
// implementation based on Java version: http://www.okayan.jp/DhrystoneApplet/dhry_src.jar public override void Run(CancellationToken cancellationToken, ResultCollection results) { bool stopBenchmark = false; int Int_Loc_1; int Int_Loc_2; int Int_Loc_3; int[] Int_Loc_1_Ref = new int[1]; int[] Int_Loc_3_Ref = new int[1]; char Char_Index; int[] Enum_Loc = new int[1]; string String_Loc_1; string String_Loc_2; long total_time; long Run_Index; Next_Record_Glob = Second_Record; Record_Glob = First_Record; Record_Glob.Record_Comp = Next_Record_Glob; Record_Glob.Discr = Ident_1; Record_Glob.Enum_Comp = Ident_3; Record_Glob.Int_Comp = 40; Record_Glob.String_Comp = "DHRYSTONE PROGRAM, SOME STRING"; String_Loc_1 = "DHRYSTONE PROGRAM, 1'ST STRING"; for (int i = 0; i < 128; i++) { Array_Glob_2[i] = new int[128]; } Stopwatch sw = new Stopwatch(); sw.Start(); Run_Index = 1; while (!stopBenchmark) { Proc_5(); Proc_4(); Int_Loc_1 = 2; Int_Loc_2 = 3; String_Loc_2 = "DHRYSTONE PROGRAM, 2'ND STRING"; Enum_Loc[0] = Ident_2; Bool_Glob = !Func_2(String_Loc_1, String_Loc_2); while (Int_Loc_1 < Int_Loc_2) { Int_Loc_3_Ref[0] = 5 * Int_Loc_1 - Int_Loc_2; Proc_7(Int_Loc_1, Int_Loc_2, Int_Loc_3_Ref); Int_Loc_1 += 1; } Int_Loc_3 = Int_Loc_3_Ref[0]; Proc_8(Array_Glob_1, Array_Glob_2, Int_Loc_1, Int_Loc_3); Proc_1(Record_Glob); for (Char_Index = 'A'; Char_Index <= Char_Glob_2; ++Char_Index) { if (Enum_Loc[0] == Func_1(Char_Index, 'C')) Proc_6(Ident_1, Enum_Loc); } Int_Loc_3 = Int_Loc_2 * Int_Loc_1; Int_Loc_2 = Int_Loc_3 / Int_Loc_1; Int_Loc_2 = 7 * (Int_Loc_3 - Int_Loc_2) - Int_Loc_1; Int_Loc_1_Ref[0] = Int_Loc_1; Proc_2(Int_Loc_1_Ref); Int_Loc_1 = Int_Loc_1_Ref[0]; if (cancellationToken.IsCancellationRequested) { throw new OperationCanceledException(cancellationToken); } if ((TimeLimit == null) || (TimeLimit.TotalMilliseconds == 0)) { if (Run_Index > Default_Number_Of_Runs) { stopBenchmark = true; } } else if (sw.Elapsed > TimeLimit) { stopBenchmark = true; } Run_Index++; } sw.Stop(); total_time = sw.ElapsedMilliseconds; results.Add(new Result("DIPS", new DoubleValue(Run_Index * 1000 / total_time))); }
private void Proc_3(Record_Type Pointer_Par_Ref) { if (Record_Glob != null) Pointer_Par_Ref = Record_Glob.Record_Comp; else Int_Glob = 100; int[] Int_Comp_Ref = new int[1]; Int_Comp_Ref[0] = Record_Glob.Int_Comp; Proc_7(10, Int_Glob, Int_Comp_Ref); Record_Glob.Int_Comp = Int_Comp_Ref[0]; }
private void Proc_1(Record_Type Pointer_Par_Val) { Record_Type Next_Record = Pointer_Par_Val.Record_Comp; Pointer_Par_Val.Record_Comp = Record_Glob; Pointer_Par_Val.Int_Comp = 5; Next_Record.Int_Comp = Pointer_Par_Val.Int_Comp; Next_Record.Record_Comp = Pointer_Par_Val.Record_Comp; Proc_3(Next_Record.Record_Comp); int[] Int_Ref = new int[1]; if (Next_Record.Discr == Ident_1) { Next_Record.Int_Comp = 6; Int_Ref[0] = Next_Record.Enum_Comp; Proc_6(Pointer_Par_Val.Enum_Comp, Int_Ref); Next_Record.Enum_Comp = Int_Ref[0]; Next_Record.Record_Comp = Record_Glob.Record_Comp; Int_Ref[0] = Next_Record.Int_Comp; Proc_7(Next_Record.Int_Comp, 10, Int_Ref); Next_Record.Int_Comp = Int_Ref[0]; } else Pointer_Par_Val = Pointer_Par_Val.Record_Comp; }
// implementation based on Java version: http://www.okayan.jp/DhrystoneApplet/dhry_src.jar public override void Run(CancellationToken cancellationToken, ResultCollection results) { bool stopBenchmark = false; int Int_Loc_1; int Int_Loc_2; int Int_Loc_3; int[] Int_Loc_1_Ref = new int[1]; int[] Int_Loc_3_Ref = new int[1]; char Char_Index; int[] Enum_Loc = new int[1]; string String_Loc_1; string String_Loc_2; long total_time; long Run_Index; Next_Record_Glob = Second_Record; Record_Glob = First_Record; Record_Glob.Record_Comp = Next_Record_Glob; Record_Glob.Discr = Ident_1; Record_Glob.Enum_Comp = Ident_3; Record_Glob.Int_Comp = 40; Record_Glob.String_Comp = "DHRYSTONE PROGRAM, SOME STRING"; String_Loc_1 = "DHRYSTONE PROGRAM, 1'ST STRING"; for (int i = 0; i < 128; i++) { Array_Glob_2[i] = new int[128]; } Stopwatch sw = new Stopwatch(); sw.Start(); Run_Index = 1; while (!stopBenchmark) { Proc_5(); Proc_4(); Int_Loc_1 = 2; Int_Loc_2 = 3; String_Loc_2 = "DHRYSTONE PROGRAM, 2'ND STRING"; Enum_Loc[0] = Ident_2; Bool_Glob = !Func_2(String_Loc_1, String_Loc_2); while (Int_Loc_1 < Int_Loc_2) { Int_Loc_3_Ref[0] = 5 * Int_Loc_1 - Int_Loc_2; Proc_7(Int_Loc_1, Int_Loc_2, Int_Loc_3_Ref); Int_Loc_1 += 1; } Int_Loc_3 = Int_Loc_3_Ref[0]; Proc_8(Array_Glob_1, Array_Glob_2, Int_Loc_1, Int_Loc_3); Proc_1(Record_Glob); for (Char_Index = 'A'; Char_Index <= Char_Glob_2; ++Char_Index) { if (Enum_Loc[0] == Func_1(Char_Index, 'C')) { Proc_6(Ident_1, Enum_Loc); } } Int_Loc_3 = Int_Loc_2 * Int_Loc_1; Int_Loc_2 = Int_Loc_3 / Int_Loc_1; Int_Loc_2 = 7 * (Int_Loc_3 - Int_Loc_2) - Int_Loc_1; Int_Loc_1_Ref[0] = Int_Loc_1; Proc_2(Int_Loc_1_Ref); Int_Loc_1 = Int_Loc_1_Ref[0]; if (cancellationToken.IsCancellationRequested) { throw new OperationCanceledException(cancellationToken); } if ((TimeLimit == null) || (TimeLimit.TotalMilliseconds == 0)) { if (Run_Index > Default_Number_Of_Runs) { stopBenchmark = true; } } else if (sw.Elapsed > TimeLimit) { stopBenchmark = true; } Run_Index++; } sw.Stop(); total_time = sw.ElapsedMilliseconds; results.Add(new Result("DIPS", new DoubleValue(Run_Index * 1000 / total_time))); }