From 2c678a4e1d7f97c862342ee19cf2d6ee6e901d85 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 29 May 2017 14:21:32 -0700 Subject: 3897 - various updates to documentation --- html/072scheduler.cc.html | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'html/072scheduler.cc.html') diff --git a/html/072scheduler.cc.html b/html/072scheduler.cc.html index e6d06129..85f8150b 100644 --- a/html/072scheduler.cc.html +++ b/html/072scheduler.cc.html @@ -145,7 +145,7 @@ if ('onhashchange' in window) { 80 } 81 82 bool all_routines_done() { - 83 for (int i = 0; i < SIZE(Routines); ++i) { + 83 for (int i = 0; i < SIZE(Routines); ++i) { 84 ¦ if (Routines.at(i)->state == RUNNING) 85 ¦ ¦ return false; 86 } @@ -155,7 +155,7 @@ if ('onhashchange' in window) { 90 // skip Current_routine_index past non-RUNNING routines 91 void skip_to_next_routine() { 92 assert(!Routines.empty()); - 93 assert(Current_routine_index < SIZE(Routines)); + 93 assert(Current_routine_index < SIZE(Routines)); 94 for (int i = (Current_routine_index+1)%SIZE(Routines); i != Current_routine_index; i = (i+1)%SIZE(Routines)) { 95 ¦ if (Routines.at(i)->state == RUNNING) { 96 ¦ ¦ Current_routine_index = i; @@ -180,7 +180,7 @@ if ('onhashchange' in window) { 115 } 116 117 :(before "End Teardown") -118 for (int i = 0; i < SIZE(Routines); ++i) +118 for (int i = 0; i < SIZE(Routines); ++i) 119 delete Routines.at(i); 120 Routines.clear(); 121 Current_routine = NULL; @@ -198,7 +198,7 @@ if ('onhashchange' in window) { 133 ¦ vector<double> arg; 134 ¦ arg.push_back(new_mu_text(argv[i])); 135 ¦ assert(get(Memory, arg.back()) == 0); -136 ¦ put(Memory, arg.back(), 1); // update refcount +136 ¦ put(Memory, arg.back(), 1); // update refcount 137 ¦ current_call().ingredient_atoms.push_back(arg); 138 } 139 run(main_routine); @@ -228,7 +228,7 @@ if ('onhashchange' in window) { 163 :(before "End Primitive Recipe Declarations") 164 START_RUNNING, 165 :(before "End Primitive Recipe Numbers") -166 put(Recipe_ordinal, "start-running", START_RUNNING); +166 put(Recipe_ordinal, "start-running", START_RUNNING); 167 :(before "End Primitive Recipe Checks") 168 case START_RUNNING: { 169 if (inst.ingredients.empty()) { @@ -246,7 +246,7 @@ if ('onhashchange' in window) { 181 routine* new_routine = new routine(ingredients.at(0).at(0)); 182 new_routine->parent_index = Current_routine_index; 183 // populate ingredients -184 for (int i = 1; i < SIZE(current_instruction().ingredients); ++i) { +184 for (int i = 1; i < SIZE(current_instruction().ingredients); ++i) { 185 ¦ new_routine->calls.front().ingredient_atoms.push_back(ingredients.at(i)); 186 ¦ reagent/*copy*/ ingredient = current_instruction().ingredients.at(i); 187 ¦ canonize_type(ingredient); @@ -463,7 +463,7 @@ if ('onhashchange' in window) { 398 +error: f2: divide by zero in '3:num <- divide-with-remainder 4, 0' 399 -error: f2: divide by zero in '4:num <- divide-with-remainder 4, 0' 400 -401 :(after "operator<<(ostream& os, unused end)") +401 :(after "operator<<(ostream& os, unused end)") 402 if (Trace_stream && Trace_stream->curr_label == "error" && Current_routine) { 403 ¦ Current_routine->state = COMPLETED; 404 } @@ -481,7 +481,7 @@ if ('onhashchange' in window) { 416 -schedule: f1 417 418 :(before "End Scheduler Cleanup") -419 for (int i = 0; i < SIZE(Routines); ++i) { +419 for (int i = 0; i < SIZE(Routines); ++i) { 420 if (Routines.at(i)->state == COMPLETED) continue; 421 if (Routines.at(i)->parent_index < 0) continue; // root thread 422 // structured concurrency: http://250bpm.com/blog:71 @@ -519,10 +519,10 @@ if ('onhashchange' in window) { 454 :(before "End Primitive Recipe Declarations") 455 ROUTINE_STATE, 456 :(before "End Primitive Recipe Numbers") -457 put(Recipe_ordinal, "routine-state", ROUTINE_STATE); +457 put(Recipe_ordinal, "routine-state", ROUTINE_STATE); 458 :(before "End Primitive Recipe Checks") 459 case ROUTINE_STATE: { -460 if (SIZE(inst.ingredients) != 1) { +460 if (SIZE(inst.ingredients) != 1) { 461 ¦ raise << maybe(get(Recipe, r).name) << "'routine-state' requires exactly one ingredient, but got '" << to_original_string(inst) << "'\n" << end(); 462 ¦ break; 463 } @@ -536,7 +536,7 @@ if ('onhashchange' in window) { 471 case ROUTINE_STATE: { 472 int id = ingredients.at(0).at(0); 473 int result = -1; -474 for (int i = 0; i < SIZE(Routines); ++i) { +474 for (int i = 0; i < SIZE(Routines); ++i) { 475 ¦ if (Routines.at(i)->id == id) { 476 ¦ ¦ result = Routines.at(i)->state; 477 ¦ ¦ break; @@ -552,10 +552,10 @@ if ('onhashchange' in window) { 487 :(before "End Primitive Recipe Declarations") 488 STOP, 489 :(before "End Primitive Recipe Numbers") -490 put(Recipe_ordinal, "stop", STOP); +490 put(Recipe_ordinal, "stop", STOP); 491 :(before "End Primitive Recipe Checks") 492 case STOP: { -493 if (SIZE(inst.ingredients) != 1) { +493 if (SIZE(inst.ingredients) != 1) { 494 ¦ raise << maybe(get(Recipe, r).name) << "'stop' requires exactly one ingredient, but got '" << to_original_string(inst) << "'\n" << end(); 495 ¦ break; 496 } @@ -568,7 +568,7 @@ if ('onhashchange' in window) { 503 :(before "End Primitive Recipe Implementations") 504 case STOP: { 505 int id = ingredients.at(0).at(0); -506 for (int i = 0; i < SIZE(Routines); ++i) { +506 for (int i = 0; i < SIZE(Routines); ++i) { 507 ¦ if (Routines.at(i)->id == id) { 508 ¦ ¦ Routines.at(i)->state = COMPLETED; 509 ¦ ¦ break; @@ -580,14 +580,14 @@ if ('onhashchange' in window) { 515 :(before "End Primitive Recipe Declarations") 516 _DUMP_ROUTINES, 517 :(before "End Primitive Recipe Numbers") -518 put(Recipe_ordinal, "$dump-routines", _DUMP_ROUTINES); +518 put(Recipe_ordinal, "$dump-routines", _DUMP_ROUTINES); 519 :(before "End Primitive Recipe Checks") 520 case _DUMP_ROUTINES: { 521 break; 522 } 523 :(before "End Primitive Recipe Implementations") 524 case _DUMP_ROUTINES: { -525 for (int i = 0; i < SIZE(Routines); ++i) { +525 for (int i = 0; i < SIZE(Routines); ++i) { 526 ¦ cerr << i << ": " << Routines.at(i)->id << ' ' << Routines.at(i)->state << ' ' << Routines.at(i)->parent_index << '\n'; 527 } 528 break; @@ -635,7 +635,7 @@ if ('onhashchange' in window) { 570 571 :(code) 572 bool any_routines_with_error() { -573 for (int i = 0; i < SIZE(Routines); ++i) { +573 for (int i = 0; i < SIZE(Routines); ++i) { 574 ¦ if (Routines.at(i)->state == DISCONTINUED) 575 ¦ ¦ return true; 576 } @@ -650,10 +650,10 @@ if ('onhashchange' in window) { 585 :(before "End Primitive Recipe Declarations") 586 LIMIT_TIME, 587 :(before "End Primitive Recipe Numbers") -588 put(Recipe_ordinal, "limit-time", LIMIT_TIME); +588 put(Recipe_ordinal, "limit-time", LIMIT_TIME); 589 :(before "End Primitive Recipe Checks") 590 case LIMIT_TIME: { -591 if (SIZE(inst.ingredients) != 2) { +591 if (SIZE(inst.ingredients) != 2) { 592 ¦ raise << maybe(get(Recipe, r).name) << "'limit-time' requires exactly two ingredient, but got '" << to_original_string(inst) << "'\n" << end(); 593 ¦ break; 594 } @@ -670,7 +670,7 @@ if ('onhashchange' in window) { 605 :(before "End Primitive Recipe Implementations") 606 case LIMIT_TIME: { 607 int id = ingredients.at(0).at(0); -608 for (int i = 0; i < SIZE(Routines); ++i) { +608 for (int i = 0; i < SIZE(Routines); ++i) { 609 ¦ if (Routines.at(i)->id == id) { 610 ¦ ¦ Routines.at(i)->limit = ingredients.at(1).at(0); 611 ¦ ¦ break; @@ -688,10 +688,10 @@ if ('onhashchange' in window) { 623 :(before "End Primitive Recipe Declarations") 624 NUMBER_OF_INSTRUCTIONS, 625 :(before "End Primitive Recipe Numbers") -626 put(Recipe_ordinal, "number-of-instructions", NUMBER_OF_INSTRUCTIONS); +626 put(Recipe_ordinal, "number-of-instructions", NUMBER_OF_INSTRUCTIONS); 627 :(before "End Primitive Recipe Checks") 628 case NUMBER_OF_INSTRUCTIONS: { -629 if (SIZE(inst.ingredients) != 1) { +629 if (SIZE(inst.ingredients) != 1) { 630 ¦ raise << maybe(get(Recipe, r).name) << "'number-of-instructions' requires exactly one ingredient, but got '" << to_original_string(inst) << "'\n" << end(); 631 ¦ break; 632 } @@ -705,7 +705,7 @@ if ('onhashchange' in window) { 640 case NUMBER_OF_INSTRUCTIONS: { 641 int id = ingredients.at(0).at(0); 642 int result = -1; -643 for (int i = 0; i < SIZE(Routines); ++i) { +643 for (int i = 0; i < SIZE(Routines); ++i) { 644 ¦ if (Routines.at(i)->id == id) { 645 ¦ ¦ result = Routines.at(i)->instructions_run; 646 ¦ ¦ break; -- cgit 1.4.1-2-gfad0