Changeset 136ccd7


Ignore:
Timestamp:
Nov 3, 2017, 3:01:31 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
4ee36bf0
Parents:
4ee1efb (diff), 760ba67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into cleanup-dtors

Files:
33 added
9 deleted
56 edited
2 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    r4ee1efb r136ccd7  
    5252tools/prettyprinter/pretty
    5353tools/pretty
     54tools/catchsig
     55tools/repeat
    5456
    5557# generated by xfig for user manual
  • configure

    r4ee1efb r136ccd7  
    62816281
    62826282
    6283 ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/benchmark/Makefile src/examples/Makefile src/tests/Makefile src/tests/preempt_longrun/Makefile src/prelude/Makefile src/libcfa/Makefile tools/prettyprinter/Makefile"
     6283ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/benchmark/Makefile src/examples/Makefile src/tests/Makefile src/tests/preempt_longrun/Makefile src/prelude/Makefile src/libcfa/Makefile tools/Makefile tools/prettyprinter/Makefile"
    62846284
    62856285
     
    70487048    "src/prelude/Makefile") CONFIG_FILES="$CONFIG_FILES src/prelude/Makefile" ;;
    70497049    "src/libcfa/Makefile") CONFIG_FILES="$CONFIG_FILES src/libcfa/Makefile" ;;
     7050    "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
    70507051    "tools/prettyprinter/Makefile") CONFIG_FILES="$CONFIG_FILES tools/prettyprinter/Makefile" ;;
    70517052
  • configure.ac

    r4ee1efb r136ccd7  
    238238        src/prelude/Makefile
    239239        src/libcfa/Makefile
     240        tools/Makefile
    240241        tools/prettyprinter/Makefile
    241242        ])
  • src/CodeGen/CodeGenerator.cc

    r4ee1efb r136ccd7  
    288288                assertf( ! genC, "TypeDecls should not reach code generation." );
    289289                output << typeDecl->genTypeString() << " " << typeDecl->name;
    290                 if ( typeDecl->get_kind() != TypeDecl::Any && typeDecl->sized ) {
     290                if ( typeDecl->sized ) {
    291291                        output << " | sized(" << typeDecl->name << ")";
    292292                }
  • src/GenPoly/InstantiateGeneric.cc

    r4ee1efb r136ccd7  
    238238                                        assertf( false, "Ttype parameters are not currently allowed as parameters to generic types." );
    239239                                        break;
    240                                 case TypeDecl::Any:
    241                                         assertf( false, "otype parameters handled by baseParam->isComplete()." );
     240                                default:
     241                                        assertf( false, "Unhandled type parameter kind" );
    242242                                        break;
    243243                        }
     
    278278                substituteMembers( base->get_members(), baseParams, typeSubs );
    279279
    280                 deleteAll( baseParams );
     280                // xxx - can't delete type parameters because they may have assertions that are used
     281                // deleteAll( baseParams );
    281282                baseParams.clear();
    282283
  • src/GenPoly/ScrubTyVars.cc

    r4ee1efb r136ccd7  
    4040                if ( tyVar != tyVars->end() ) {
    4141                        switch ( tyVar->second.kind ) {
    42                           case TypeDecl::Any:
    4342                          case TypeDecl::Dtype:
    4443                          case TypeDecl::Ttype:
  • src/InitTweak/FixInit.cc

    r4ee1efb r136ccd7  
    504504                }
    505505
     506                // to prevent warnings (‘_unq0’ may be used uninitialized in this function),
     507                // insert an appropriate zero initializer for UniqueExpr temporaries.
     508                Initializer * makeInit( Type * t ) {
     509                        if ( StructInstType * inst = dynamic_cast< StructInstType * >( t ) ) {
     510                                // initizer for empty struct must be empty
     511                                if ( inst->baseStruct->members.empty() ) return new ListInit({});
     512                        } else if ( UnionInstType * inst = dynamic_cast< UnionInstType * >( t ) ) {
     513                                // initizer for empty union must be empty
     514                                if ( inst->baseUnion->members.empty() ) return new ListInit({});
     515                        }
     516
     517                        return new ListInit( { new SingleInit( new ConstantExpr( Constant::from_int( 0 ) ) ) } );
     518                }
     519
    506520                void ResolveCopyCtors::postvisit( UniqueExpr * unqExpr ) {
    507521                        if ( vars.count( unqExpr->get_id() ) ) {
     
    518532                        } else {
    519533                                // expr isn't a call expr, so create a new temporary variable to use to hold the value of the unique expression
    520                                 unqExpr->set_object( ObjectDecl::newObject( toString("_unq", unqExpr->get_id()), unqExpr->get_result()->clone(), nullptr ) );
     534                                unqExpr->set_object( ObjectDecl::newObject( toString("_unq", unqExpr->get_id()), unqExpr->get_result()->clone(), makeInit( unqExpr->get_result() ) ) );
    521535                                unqExpr->set_var( new VariableExpr( unqExpr->get_object() ) );
    522536                        }
  • src/Parser/DeclarationNode.cc

    r4ee1efb r136ccd7  
    10311031
    10321032        if ( variable.tyClass != NoTypeClass ) {
    1033                 static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Dtype, TypeDecl::Ftype, TypeDecl::Ttype };
    1034                 assertf( sizeof(kindMap)/sizeof(kindMap[0] == NoTypeClass-1), "DeclarationNode::build: kindMap is out of sync." );
     1033                // otype is internally converted to dtype + otype parameters
     1034                static const TypeDecl::Kind kindMap[] = { TypeDecl::Dtype, TypeDecl::Dtype, TypeDecl::Ftype, TypeDecl::Ttype };
     1035                assertf( sizeof(kindMap)/sizeof(kindMap[0]) == NoTypeClass, "DeclarationNode::build: kindMap is out of sync." );
    10351036                assertf( variable.tyClass < sizeof(kindMap)/sizeof(kindMap[0]), "Variable's tyClass is out of bounds." );
    1036                 TypeDecl * ret = new TypeDecl( *name, Type::StorageClasses(), nullptr, kindMap[ variable.tyClass ], variable.initializer ? variable.initializer->buildType() : nullptr );
     1037                TypeDecl * ret = new TypeDecl( *name, Type::StorageClasses(), nullptr, kindMap[ variable.tyClass ], variable.tyClass == Otype, variable.initializer ? variable.initializer->buildType() : nullptr );
    10371038                buildList( variable.assertions, ret->get_assertions() );
    10381039                return ret;
  • src/Parser/TypeData.cc

    r4ee1efb r136ccd7  
    406406void buildForall( const DeclarationNode * firstNode, ForallList &outputList ) {
    407407        buildList( firstNode, outputList );
    408         for ( typename ForallList::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
     408        auto n = firstNode;
     409        for ( typename ForallList::iterator i = outputList.begin(); i != outputList.end(); ++i, n = (DeclarationNode*)n->get_next() ) {
    409410                TypeDecl * td = static_cast<TypeDecl *>(*i);
    410                 if ( td->get_kind() == TypeDecl::Any ) {
     411                if ( n->variable.tyClass == DeclarationNode::Otype ) {
    411412                        // add assertion parameters to `type' tyvars in reverse order
    412413                        // add dtor:  void ^?{}(T *)
     
    798799                ret = new TypedefDecl( name, scs, typebuild( td->base ), linkage );
    799800        } else {
    800                 ret = new TypeDecl( name, scs, typebuild( td->base ), TypeDecl::Any );
     801                ret = new TypeDecl( name, scs, typebuild( td->base ), TypeDecl::Dtype, true );
    801802        } // if
    802803        buildList( td->symbolic.params, ret->get_parameters() );
  • src/Parser/lex.ll

    r4ee1efb r136ccd7  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sat Sep 23 17:29:28 2017
    13  * Update Count     : 632
     12 * Last Modified On : Wed Oct 25 13:53:56 2017
     13 * Update Count     : 634
    1414 */
    1515
     
    233233__extension__   { KEYWORD_RETURN(EXTENSION); }                  // GCC
    234234extern                  { KEYWORD_RETURN(EXTERN); }
    235 fallthrough             { KEYWORD_RETURN(FALLTHRU); }                   // CFA
    236235fallthru                { KEYWORD_RETURN(FALLTHRU); }                   // CFA
     236fallthrough             { KEYWORD_RETURN(FALLTHROUGH); }                // CFA
    237237finally                 { KEYWORD_RETURN(FINALLY); }                    // CFA
    238238float                   { KEYWORD_RETURN(FLOAT); }
  • src/Parser/parser.yy

    r4ee1efb r136ccd7  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Oct 16 11:07:29 2017
    13 // Update Count     : 2892
     12// Last Modified On : Wed Oct 25 12:28:54 2017
     13// Update Count     : 2893
    1414//
    1515
     
    180180%token ATTRIBUTE EXTENSION                                                              // GCC
    181181%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
    182 %token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH WHEN WAITFOR // CFA
     182%token CHOOSE DISABLE ENABLE FALLTHRU FALLTHROUGH TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH WHEN WAITFOR // CFA
    183183%token ASM                                                                                              // C99, extension ISO/IEC 9899:1999 Section J.5.10(1)
    184184%token ALIGNAS ALIGNOF GENERIC STATICASSERT                             // C11
     
    362362%precedence ELSE        // token precedence for start of else clause in IF/WAITFOR statement
    363363
    364 %locations
     364%locations                      // support location tracking for error messages
    365365
    366366%start translation_unit                                                                 // parse-tree root
     
    458458                { $$ = new ExpressionNode( new StmtExpr( dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >($2) ) ) ); }
    459459        | type_name '.' no_attr_identifier                                      // CFA, nested type
    460                 { $$ = nullptr; }                                                               // FIX ME
     460                { throw SemanticError("Qualified names are currently unimplemented."); $$ = nullptr; }                                                          // FIX ME
    461461        | type_name '.' '[' push field_list pop ']'                     // CFA, nested type / tuple field selector
    462                 { $$ = nullptr; }                                                               // FIX ME
     462                { throw SemanticError("Qualified names are currently unimplemented."); $$ = nullptr; }                                                          // FIX ME
    463463        ;
    464464
     
    974974        ;
    975975
     976fall_through_name:                                                                              // CFA
     977        FALLTHRU
     978        | FALLTHROUGH
     979        ;
     980
    976981fall_through:                                                                                   // CFA
    977         FALLTHRU
     982        fall_through_name
    978983                { $$ = nullptr; }
    979         | FALLTHRU ';'
     984        | fall_through_name ';'
    980985                { $$ = nullptr; }
    981986        ;
     
    24862491        | TYPEDEFname
    24872492        | TYPEGENname
     2493        | FALLTHROUGH
     2494                { $$ = Token{ new string( "fallthrough" ), { nullptr, -1 } }; }
    24882495        | CONST
    24892496                { $$ = Token{ new string( "__const__" ), { nullptr, -1 } }; }
     
    27512758//
    27522759//              typedef int foo;
    2753 //              forall( otype T ) foo( T );
     2760//              forall( otype T ) struct foo;
    27542761//              int f( int foo ); // redefine typedef name in new scope
    27552762//
  • src/ResolvExpr/AlternativeFinder.cc

    r4ee1efb r136ccd7  
    122122                                                )
    123123                                                mapPlace->second.isAmbiguous = true;
     124                                        } else {
     125                                                PRINT(
     126                                                        std::cerr << "cost " << candidate->cost << " loses to " << mapPlace->second.candidate->cost << std::endl;
     127                                                )
    124128                                        }
    125129                                } else {
     
    127131                                }
    128132                        }
    129 
    130                         PRINT(
    131                                 std::cerr << "there are " << selected.size() << " alternatives before elimination" << std::endl;
    132                         )
    133133
    134134                        // accept the alternatives that were unambiguous
     
    181181                }
    182182                if ( prune ) {
     183                        auto oldsize = alternatives.size();
    183184                        PRINT(
    184185                                std::cerr << "alternatives before prune:" << std::endl;
     
    198199                        }
    199200                        alternatives.erase( oldBegin, alternatives.end() );
     201                        PRINT(
     202                                std::cerr << "there are " << oldsize << " alternatives before elimination" << std::endl;
     203                        )
    200204                        PRINT(
    201205                                std::cerr << "there are " << alternatives.size() << " alternatives after elimination" << std::endl;
  • src/ResolvExpr/CommonType.cc

    r4ee1efb r136ccd7  
    6161        };
    6262
    63         Type * handleReference( ReferenceType * refType, Type * other, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment & env, const OpenVarSet &openVars ) {
    64                 Type * result = nullptr, * common = nullptr;
     63        Type * handleReference( Type * t1, Type * t2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment & env, const OpenVarSet &openVars ) {
     64                Type * common = nullptr;
    6565                AssertionSet have, need;
    6666                OpenVarSet newOpen( openVars );
    6767                // need unify to bind type variables
    68                 if ( unify( refType->get_base(), other, env, have, need, newOpen, indexer, common ) ) {
    69                         // std::cerr << "unify success" << std::endl;
    70                         if ( widenSecond ) {
    71                                 // std::cerr << "widen second" << std::endl;
    72                                 if ( widenFirst || other->get_qualifiers() <= refType->get_qualifiers() ) {
    73                                         result = new ReferenceType( refType->get_qualifiers(), common ); // refType->clone();
    74                                         result->get_qualifiers() |= other->get_qualifiers();
    75                                 }
    76                         } else if ( widenFirst ) {
    77                                 // std::cerr << "widen first" << std::endl;
    78                                 if ( widenSecond || refType->get_qualifiers() <= other->get_qualifiers() ) {
    79                                         result = common;
    80                                         result->get_qualifiers() |= refType->get_qualifiers();
    81                                 }
    82                         }
    83                 } else {
    84                         // std::cerr << "exact unify failed: " << refType << " " << other << std::endl;
    85                 }
    86                 // std::cerr << "common type of reference [" << refType << "] and non-reference [" << other << "] is [" << result << "]" << std::endl;
    87                 return result;
     68                if ( unify( t1, t2, env, have, need, newOpen, indexer, common ) ) {
     69                        // std::cerr << "unify success: " << widenFirst << " " << widenSecond << std::endl;
     70                        if ( (widenFirst || t2->get_qualifiers() <= t1->get_qualifiers()) && (widenSecond || t1->get_qualifiers() <= t2->get_qualifiers()) ) {
     71                                // std::cerr << "widen okay" << std::endl;
     72                                common->get_qualifiers() |= t1->get_qualifiers();
     73                                common->get_qualifiers() |= t2->get_qualifiers();
     74                                return common;
     75                        }
     76                }
     77                // std::cerr << "exact unify failed: " << t1 << " " << t2 << std::endl;
     78                return nullptr;
    8879        }
    8980
     
    9990
    10091                        // special case where one type has a reference depth of 1 larger than the other
    101                         if ( diff > 0 ) {
    102                                 return handleReference( strict_dynamic_cast<ReferenceType *>( type1 ), type2, widenFirst, widenSecond, indexer, env, openVars );
    103                         } else if ( diff < 0 ) {
    104                                 return handleReference( strict_dynamic_cast<ReferenceType *>( type2 ), type1, widenSecond, widenFirst, indexer, env, openVars );
     92                        if ( diff > 0 || diff < 0 ) {
     93                                Type * result = nullptr;
     94                                if ( ReferenceType * ref1 = dynamic_cast< ReferenceType * >( type1 ) ) {
     95                                        // formal is reference, so result should be reference
     96                                        result = handleReference( ref1->base, type2, widenFirst, widenSecond, indexer, env, openVars );
     97                                        if ( result ) result = new ReferenceType( ref1->get_qualifiers(), result );
     98                                } else {
     99                                        // formal is value, so result should be value
     100                                        ReferenceType * ref2 = strict_dynamic_cast< ReferenceType * > ( type2 );
     101                                        result = handleReference( type1, ref2->base, widenFirst, widenSecond, indexer, env, openVars );
     102                                }
     103                                // std::cerr << "common type of reference [" << type1 << "] and [" << type2 << "] is [" << result << "]" << std::endl;
     104                                return result;
    105105                        }
    106106                        // otherwise, both are reference types of the same depth and this is handled by the CommonType visitor.
  • src/ResolvExpr/ConversionCost.cc

    r4ee1efb r136ccd7  
    2828
    2929namespace ResolvExpr {
    30         const Cost Cost::zero = Cost( 0, 0, 0, 0 );
    31         const Cost Cost::infinity = Cost( -1, -1, -1, -1 );
    32         const Cost Cost::unsafe = Cost( 1, 0, 0, 0 );
    33         const Cost Cost::poly = Cost( 0, 1, 0, 0 );
    34         const Cost Cost::safe = Cost( 0, 0, 1, 0 );
    35         const Cost Cost::reference = Cost( 0, 0, 0, 1 );
     30        const Cost Cost::zero =      Cost(  0,  0,  0, 0 );
     31        const Cost Cost::infinity =  Cost( -1, -1, -1, -1 );
     32        const Cost Cost::unsafe =    Cost(  1,  0,  0, 0 );
     33        const Cost Cost::poly =      Cost(  0,  1,  0, 0 );
     34        const Cost Cost::safe =      Cost(  0,  0,  1, 0 );
     35        const Cost Cost::reference = Cost(  0,  0,  0, 1 );
    3636
    3737#if 0
     
    113113                                        int assignResult = func( srcAsRef->get_base(), destAsRef->get_base(), env, indexer );
    114114                                        PRINT( std::cerr << "comparing references: " << assignResult << " " << srcAsRef << " " << destAsRef << std::endl; )
    115                                         if ( assignResult < 0 ) {
     115                                        if ( assignResult > 0 ) {
    116116                                                return Cost::safe;
    117                                         } else if ( assignResult > 0 ) {
     117                                        } else if ( assignResult < 0 ) {
    118118                                                return Cost::unsafe;
    119119                                        } // if
     
    269269        }
    270270
    271         void ConversionCost::visit(PointerType *pointerType) {
     271        void ConversionCost::visit( PointerType * pointerType ) {
    272272                if ( PointerType *destAsPtr = dynamic_cast< PointerType* >( dest ) ) {
    273273                        PRINT( std::cerr << pointerType << " ===> " << destAsPtr; )
     
    284284                                }
    285285                        } else {  // xxx - this discards qualifiers from consideration -- reducing qualifiers is a safe conversion; is this right?
    286                                 int assignResult = ptrsAssignable( pointerType->get_base(), destAsPtr->get_base(), env );
     286                                int assignResult = ptrsAssignable( pointerType->base, destAsPtr->base, env );
    287287                                PRINT( std::cerr << " :: " << assignResult << std::endl; )
    288                                 if ( assignResult < 0 && pointerType->get_base()->get_qualifiers() <= destAsPtr->get_qualifiers() ) {
     288                                if ( assignResult > 0 && pointerType->get_base()->get_qualifiers() <= destAsPtr->get_qualifiers() ) {
    289289                                        cost = Cost::safe;
    290                                 } else if ( assignResult > 0 ) {
     290                                } else if ( assignResult < 0 ) {
    291291                                        cost = Cost::unsafe;
    292292                                } // if
    293293                                // assignResult == 0 means Cost::Infinity
    294294                        } // if
    295                 } else if ( dynamic_cast< ZeroType* >( dest ) != nullptr || dynamic_cast< OneType* >( dest ) != nullptr ) {
     295                } else if ( dynamic_cast< ZeroType * >( dest ) ) {
    296296                        cost = Cost::unsafe;
    297297                } // if
    298298        }
    299299
    300         void ConversionCost::visit(__attribute((unused)) ArrayType *arrayType) {}
    301 
    302         void ConversionCost::visit(ReferenceType *refType) {
     300        void ConversionCost::visit( ArrayType * ) {}
     301
     302        void ConversionCost::visit( ReferenceType * refType ) {
    303303                // Note: dest can never be a reference, since it would have been caught in an earlier check
    304304                assert( ! dynamic_cast< ReferenceType * >( dest ) );
     
    317317        }
    318318
    319         void ConversionCost::visit(__attribute((unused)) FunctionType *functionType) {}
    320 
    321         void ConversionCost::visit(StructInstType *inst) {
     319        void ConversionCost::visit( FunctionType * ) {}
     320
     321        void ConversionCost::visit( StructInstType * inst ) {
    322322                if ( StructInstType *destAsInst = dynamic_cast< StructInstType* >( dest ) ) {
    323323                        if ( inst->name == destAsInst->name ) {
     
    327327        }
    328328
    329         void ConversionCost::visit(UnionInstType *inst) {
     329        void ConversionCost::visit( UnionInstType * inst ) {
    330330                if ( UnionInstType *destAsInst = dynamic_cast< UnionInstType* >( dest ) ) {
    331331                        if ( inst->name == destAsInst->name ) {
     
    335335        }
    336336
    337         void ConversionCost::visit( __attribute((unused)) EnumInstType *inst ) {
     337        void ConversionCost::visit( EnumInstType * ) {
    338338                static Type::Qualifiers q;
    339339                static BasicType integer( q, BasicType::SignedInt );
     
    344344        }
    345345
    346         void ConversionCost::visit( __attribute((unused)) TraitInstType *inst) {
    347         }
    348 
    349         void ConversionCost::visit(TypeInstType *inst) {
     346        void ConversionCost::visit( TraitInstType * ) {}
     347
     348        void ConversionCost::visit( TypeInstType *inst ) {
    350349                EqvClass eqvClass;
    351350                NamedTypeDecl *namedType;
     
    366365        }
    367366
    368         void ConversionCost::visit( __attribute((unused)) TupleType *tupleType) {
     367        void ConversionCost::visit( TupleType * tupleType ) {
    369368                Cost c = Cost::zero;
    370                 if ( TupleType *destAsTuple = dynamic_cast< TupleType* >( dest ) ) {
    371                         std::list< Type* >::const_iterator srcIt = tupleType->get_types().begin();
    372                         std::list< Type* >::const_iterator destIt = destAsTuple->get_types().begin();
     369                if ( TupleType * destAsTuple = dynamic_cast< TupleType * >( dest ) ) {
     370                        std::list< Type * >::const_iterator srcIt = tupleType->get_types().begin();
     371                        std::list< Type * >::const_iterator destIt = destAsTuple->get_types().begin();
    373372                        while ( srcIt != tupleType->get_types().end() && destIt != destAsTuple->get_types().end() ) {
    374373                                Cost newCost = conversionCost( *srcIt++, *destIt++, indexer, env );
     
    386385        }
    387386
    388         void ConversionCost::visit( __attribute((unused)) VarArgsType *varArgsType) {
     387        void ConversionCost::visit( VarArgsType * ) {
    389388                if ( dynamic_cast< VarArgsType* >( dest ) ) {
    390389                        cost = Cost::zero;
     
    392391        }
    393392
    394         void ConversionCost::visit( __attribute((unused)) ZeroType *zeroType) {
    395                 if ( dynamic_cast< ZeroType* >( dest ) ) {
     393        void ConversionCost::visit( ZeroType * ) {
     394                if ( dynamic_cast< ZeroType * >( dest ) ) {
    396395                        cost = Cost::zero;
    397396                } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {
     
    409408        }
    410409
    411         void ConversionCost::visit( __attribute((unused)) OneType *oneType) {
    412                 if ( dynamic_cast< OneType* >( dest ) ) {
     410        void ConversionCost::visit( OneType * ) {
     411                if ( dynamic_cast< OneType * >( dest ) ) {
    413412                        cost = Cost::zero;
    414413                } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {
  • src/ResolvExpr/PolyCost.cc

    r4ee1efb r136ccd7  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PolyCost.cc -- 
     7// PolyCost.cc --
    88//
    99// Author           : Richard C. Bilson
     
    3131        };
    3232
    33         int polyCost( Type *type, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
     33        int polyCost( Type *type, const TypeEnvironment & env, const SymTab::Indexer &indexer ) {
    3434                PolyCost coster( env, indexer );
    3535                type->accept( coster );
     
    3737        }
    3838
    39         PolyCost::PolyCost( const TypeEnvironment &env, const SymTab::Indexer &indexer ) : result( 0 ), env( env ), indexer( indexer ) {
     39        PolyCost::PolyCost( const TypeEnvironment & env, const SymTab::Indexer & indexer ) : result( 0 ), env( env ), indexer( indexer ) {
    4040        }
    4141
    42         void PolyCost::visit(TypeInstType *typeInst) {
     42        void PolyCost::visit(TypeInstType * typeInst) {
    4343                EqvClass eqvClass;
    44                 if ( env.lookup( typeInst->get_name(), eqvClass ) ) {
     44                if ( env.lookup( typeInst->name, eqvClass ) ) {
    4545                        if ( eqvClass.type ) {
    46                                 if ( TypeInstType *otherTypeInst = dynamic_cast< TypeInstType* >( eqvClass.type ) ) {
    47                                         if ( indexer.lookupType( otherTypeInst->get_name() ) ) {
     46                                if ( TypeInstType * otherTypeInst = dynamic_cast< TypeInstType* >( eqvClass.type ) ) {
     47                                        if ( indexer.lookupType( otherTypeInst->name ) ) {
     48                                                // bound to opaque type
    4849                                                result += 1;
    4950                                        } // if
    5051                                } else {
     52                                        // bound to concrete type
    5153                                        result += 1;
    5254                                } // if
  • src/ResolvExpr/PtrsAssignable.cc

    r4ee1efb r136ccd7  
    4747
    4848        int ptrsAssignable( Type *src, Type *dest, const TypeEnvironment &env ) {
     49                // std::cerr << "assignable: " << src << " | " << dest << std::endl;
    4950                if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) {
    5051                        EqvClass eqvClass;
     
    5455                } // if
    5556                if ( dynamic_cast< VoidType* >( dest ) ) {
    56                         return 1;
     57                        // void * = T * for any T is unsafe
     58                        // xxx - this should be safe, but that currently breaks the build
     59                        return -1;
    5760                } else {
    5861                        PtrsAssignable ptrs( dest, env );
     
    6568
    6669        void PtrsAssignable::visit( __attribute((unused)) VoidType *voidType ) {
    67                 if ( dynamic_cast< FunctionType* >( dest ) ) {
    68                         result = 0;
    69                 } else {
    70                         result = -1;
     70                if ( ! dynamic_cast< FunctionType* >( dest ) ) {
     71                        // T * = void * is safe for any T that is not a function type.
     72                        // xxx - this should be unsafe...
     73                        result = 1;
    7174                } // if
    7275        }
     
    7578        void PtrsAssignable::visit( __attribute__((unused)) PointerType *pointerType ) {}
    7679        void PtrsAssignable::visit( __attribute__((unused)) ArrayType *arrayType ) {}
    77         void PtrsAssignable::visit( __attribute__((unused)) FunctionType *functionType ) {
    78                 result = -1;
    79         }
     80        void PtrsAssignable::visit( __attribute__((unused)) FunctionType *functionType ) {}
    8081
    8182        void PtrsAssignable::visit(  __attribute__((unused)) StructInstType *inst ) {}
     
    8384
    8485        void PtrsAssignable::visit( EnumInstType * ) {
    85                 if ( dynamic_cast< EnumInstType* >( dest ) ) {
     86                if ( dynamic_cast< BasicType* >( dest ) ) {
     87                        // int * = E *, etc. is safe. This isn't technically correct, as each
     88                        // enum has one basic type that it is compatible with, an that type can
     89                        // differ from enum to enum. Without replicating GCC's internal logic,
     90                        // there is no way to know which type this particular enum is compatible
     91                        // with, so punt on this for now.
    8692                        result = 1;
    87                 } else if ( BasicType *bt = dynamic_cast< BasicType* >( dest ) ) {
    88                         result = bt->get_kind() == BasicType::SignedInt;
    8993                }
    9094        }
     
    9498                EqvClass eqvClass;
    9599                if ( env.lookup( inst->get_name(), eqvClass ) && eqvClass.type ) {
     100                        // T * = S * for any S depends on the type bound to T
    96101                        result = ptrsAssignable( eqvClass.type, dest, env );
    97                 } else {
    98                         result = 0;
    99102                } // if
    100103        }
  • src/ResolvExpr/PtrsCastable.cc

    r4ee1efb r136ccd7  
    5050        };
    5151
    52         int objectCast( Type *src, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
    53                 if ( dynamic_cast< FunctionType* >( src ) ) {
    54                         return -1;
    55                 } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( src ) ) {
    56                         EqvClass eqvClass;
    57                         if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
    58                                 if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) {
    59                                         if ( tyDecl->get_kind() == TypeDecl::Ftype ) {
     52        namespace {
     53                int objectCast( Type *src, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
     54                        if ( dynamic_cast< FunctionType* >( src ) ) {
     55                                return -1;
     56                        } else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( src ) ) {
     57                                EqvClass eqvClass;
     58                                if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
     59                                        if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) {
     60                                                if ( tyDecl->get_kind() == TypeDecl::Ftype ) {
     61                                                        return -1;
     62                                                } // if
     63                                        } //if
     64                                } else if ( env.lookup( typeInst->get_name(), eqvClass ) ) {
     65                                        if ( eqvClass.data.kind == TypeDecl::Ftype ) {
    6066                                                return -1;
    6167                                        } // if
    62                                 } //if
    63                         } else if ( env.lookup( typeInst->get_name(), eqvClass ) ) {
    64                                 if ( eqvClass.data.kind == TypeDecl::Ftype ) {
    65                                         return -1;
    6668                                } // if
    67                         } // if
    68                 } //if
    69                 return 1;
    70         }
    71         int functionCast( Type *src, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
    72                 return -1 * objectCast( src, env, indexer );  // reverse the sense of objectCast
     69                        } //if
     70                        return 1;
     71                }
     72                int functionCast( Type *src, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
     73                        return -1 * objectCast( src, env, indexer );  // reverse the sense of objectCast
     74                }
    7375        }
    7476
     
    9395        }
    9496
    95         void PtrsCastable::visit( __attribute__((unused)) VoidType *voidType) {
     97        void PtrsCastable::visit( VoidType * ) {
    9698                result = objectCast( dest, env, indexer );
    9799        }
    98100
    99         void PtrsCastable::visit( __attribute__((unused)) BasicType *basicType) {
     101        void PtrsCastable::visit( BasicType * ) {
    100102                result = objectCast( dest, env, indexer );
    101103        }
    102104
    103         void PtrsCastable::visit( __attribute__((unused)) PointerType *pointerType) {
     105        void PtrsCastable::visit( PointerType * ) {
    104106                result = objectCast( dest, env, indexer );
    105107        }
    106108
    107         void PtrsCastable::visit( __attribute__((unused)) ArrayType *arrayType) {
     109        void PtrsCastable::visit( ArrayType * ) {
    108110                result = objectCast( dest, env, indexer );
    109111        }
    110112
    111         void PtrsCastable::visit( __attribute__((unused)) FunctionType *functionType) {
     113        void PtrsCastable::visit( FunctionType * ) {
    112114                // result = -1;
    113115                result = functionCast( dest, env, indexer );
    114116        }
    115117
    116         void PtrsCastable::visit( __attribute__((unused)) StructInstType *inst) {
     118        void PtrsCastable::visit( StructInstType * ) {
    117119                result = objectCast( dest, env, indexer );
    118120        }
    119121
    120         void PtrsCastable::visit( __attribute__((unused)) UnionInstType *inst) {
     122        void PtrsCastable::visit( UnionInstType * ) {
    121123                result = objectCast( dest, env, indexer );
    122124        }
    123125
    124         void PtrsCastable::visit( __attribute__((unused)) EnumInstType *inst) {
     126        void PtrsCastable::visit( EnumInstType * ) {
    125127                if ( dynamic_cast< EnumInstType* >( dest ) ) {
    126128                        result = 1;
     
    136138        }
    137139
    138         void PtrsCastable::visit( __attribute__((unused)) TraitInstType *inst ) {}
     140        void PtrsCastable::visit( TraitInstType * ) {}
    139141
    140142        void PtrsCastable::visit(TypeInstType *inst) {
     
    143145        }
    144146
    145         void PtrsCastable::visit( __attribute__((unused)) TupleType *tupleType) {
     147        void PtrsCastable::visit( TupleType * ) {
    146148                result = objectCast( dest, env, indexer );
    147149        }
    148150
    149         void PtrsCastable::visit( __attribute__((unused)) VarArgsType *varArgsType) {
     151        void PtrsCastable::visit( VarArgsType * ) {
    150152                result = objectCast( dest, env, indexer );
    151153        }
    152154
    153         void PtrsCastable::visit( __attribute__((unused)) ZeroType *zeroType) {
     155        void PtrsCastable::visit( ZeroType * ) {
    154156                result = objectCast( dest, env, indexer );
    155157        }
    156158
    157         void PtrsCastable::visit( __attribute__((unused)) OneType *oneType) {
     159        void PtrsCastable::visit( OneType * ) {
    158160                result = objectCast( dest, env, indexer );
    159161        }
  • src/ResolvExpr/Unify.cc

    r4ee1efb r136ccd7  
    138138        bool tyVarCompatible( const TypeDecl::Data & data, Type *type ) {
    139139                switch ( data.kind ) {
    140                   case TypeDecl::Any:
    141140                  case TypeDecl::Dtype:
    142141                        // to bind to an object type variable, the type must not be a function type.
  • src/SymTab/Autogen.cc

    r4ee1efb r136ccd7  
    699699                        if ( TypeInstType * ty = dynamic_cast< TypeInstType * >( t ) ) {
    700700                                if ( ! done.count( ty->get_baseType() ) ) {
    701                                         TypeDecl * newDecl = new TypeDecl( ty->get_baseType()->get_name(), Type::StorageClasses(), nullptr, TypeDecl::Any );
     701                                        TypeDecl * newDecl = new TypeDecl( ty->get_baseType()->get_name(), Type::StorageClasses(), nullptr, TypeDecl::Dtype, true );
    702702                                        TypeInstType * inst = new TypeInstType( Type::Qualifiers(), newDecl->get_name(), newDecl );
    703703                                        newDecl->get_assertions().push_back( new FunctionDecl( "?=?", Type::StorageClasses(), LinkageSpec::Cforall, genAssignType( inst ), nullptr,
  • src/SymTab/Mangler.cc

    r4ee1efb r136ccd7  
    214214                        numStream << varNum->second.first;
    215215                        switch ( (TypeDecl::Kind )varNum->second.second ) {
    216                           case TypeDecl::Any:
    217                                 mangleName << "t";
    218                                 break;
    219216                          case TypeDecl::Dtype:
    220217                                mangleName << "d";
     
    274271                        for ( Type::ForallList::iterator i = type->forall.begin(); i != type->forall.end(); ++i ) {
    275272                                switch ( (*i)->get_kind() ) {
    276                                   case TypeDecl::Any:
    277                                         tcount++;
    278                                         break;
    279273                                  case TypeDecl::Dtype:
    280274                                        dcount++;
  • src/SynTree/Declaration.h

    r4ee1efb r136ccd7  
    200200        typedef NamedTypeDecl Parent;
    201201  public:
    202         enum Kind { Any, Dtype, Ftype, Ttype };
     202        enum Kind { Dtype, Ftype, Ttype };
    203203
    204204        Type * init;
     
    216216        };
    217217
    218         TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init = nullptr );
     218        TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, bool sized, Type * init = nullptr );
    219219        TypeDecl( const TypeDecl &other );
    220220        virtual ~TypeDecl();
     
    225225        TypeDecl * set_init( Type * newValue ) { init = newValue; return this; }
    226226
    227         bool isComplete() const { return kind == Any || sized; }
     227        bool isComplete() const { return sized; }
    228228        bool get_sized() const { return sized; }
    229229        TypeDecl * set_sized( bool newValue ) { sized = newValue; return this; }
  • src/SynTree/TypeDecl.cc

    r4ee1efb r136ccd7  
    2121#include "Type.h"            // for Type, Type::StorageClasses
    2222
    23 TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), init( init ), sized( kind == Any || kind == Ttype ), kind( kind ) {
     23TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, bool sized, Type * init ) : Parent( name, scs, type ), init( init ), sized( kind == Ttype || sized ), kind( kind ) {
    2424}
    2525
     
    3232
    3333std::string TypeDecl::typeString() const {
    34         static const std::string kindNames[] = { "type", "incomplete type", "function type", "tuple type" };
    35         return (kind != Any && isComplete() ? "sized " : "") + kindNames[ kind ];
     34        static const std::string kindNames[] = { "object type", "function type", "tuple type" };
     35        assertf( sizeof(kindNames)/sizeof(kindNames[0]) == DeclarationNode::NoTypeClass-1, "typeString: kindNames is out of sync." );
     36        assertf( kind < sizeof(kindNames)/sizeof(kindNames[0]), "TypeDecl's kind is out of bounds." );
     37        return (isComplete() ? "sized " : "") + kindNames[ kind ];
    3638}
    3739
    3840std::string TypeDecl::genTypeString() const {
    39         static const std::string kindNames[] = { "otype", "dtype", "ftype", "ttype" };
     41        static const std::string kindNames[] = { "dtype", "ftype", "ttype" };
     42        assertf( sizeof(kindNames)/sizeof(kindNames[0]) == DeclarationNode::NoTypeClass-1, "genTypeString: kindNames is out of sync." );
     43        assertf( kind < sizeof(kindNames)/sizeof(kindNames[0]), "TypeDecl's kind is out of bounds." );
    4044        return kindNames[ kind ];
    4145}
  • src/Tuples/TupleExpansion.cc

    r4ee1efb r136ccd7  
    204204                        decl->set_body( true );
    205205                        for ( size_t i = 0; i < tupleSize; ++i ) {
    206                                 TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", tupleSize, "_", i ), Type::StorageClasses(), nullptr, TypeDecl::Any );
     206                                TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", tupleSize, "_", i ), Type::StorageClasses(), nullptr, TypeDecl::Dtype, true );
    207207                                decl->get_members().push_back( new ObjectDecl( toString("field_", i ), Type::StorageClasses(), LinkageSpec::C, nullptr, new TypeInstType( Type::Qualifiers(), tyParam->get_name(), tyParam ), nullptr ) );
    208208                                decl->get_parameters().push_back( tyParam );
  • src/benchmark/Makefile.am

    r4ee1efb r136ccd7  
    1919AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    2020CC = @CFA_BINDIR@/@CFA_NAME@
     21TOOLSDIR = ${abs_top_srcdir}/tools/
     22REPEAT   = ${TOOLSDIR}repeat
     23STATS    = ${TOOLSDIR}stat.py
     24repeats  = 30
    2125
    22 noinst_PROGRAMS = bench$(EXEEXT) ctxswitch-coroutine$(EXEEXT) ctxswitch-thread$(EXEEXT) sched-int$(EXEEXT) monitor$(EXEEXT) csv-data$(EXEEXT)
     26.NOTPARALLEL:
     27
     28noinst_PROGRAMS =
    2329
    2430bench$(EXEEXT) :
     
    3036        rm -f ./a.out ;
    3137
    32 ctxswitch-coroutine$(EXEEXT):
    33         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 CorCtxSwitch.c
    34         @rm -f .result.log
    35         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    36                 ./a.out | tee -a .result.log ; \
    37         done
    38         @./stat.py .result.log
    39         @rm -f a.out .result.log
    40 
    41 ctxswitch-thread$(EXEEXT):
    42         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 ThrdCtxSwitch.c
    43         @rm -f .result.log
    44         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    45                 ./a.out | tee -a .result.log ; \
    46         done
    47         @./stat.py .result.log
    48         @rm -f a.out .result.log
    49 
    50 ctxswitch-pthread$(EXEEXT):
    51         @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
    52         @rm -f .result.log
    53         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    54                 ./a.out | tee -a .result.log ; \
    55         done
    56         @./stat.py .result.log
    57         @rm -f a.out .result.log
    58 
    59 sched-int$(EXEEXT):
    60         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
    61         @rm -f .result.log
    62         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    63                 ./a.out | tee -a .result.log ; \
    64         done
    65         @./stat.py .result.log
    66         @rm -f a.out .result.log
    67 
    68 monitor$(EXEEXT):
    69         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
    70         @rm -f .result.log
    71         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    72                 ./a.out | tee -a .result.log ; \
    73         done
    74         @./stat.py .result.log
    75         @rm -f a.out .result.log
    76 
    7738csv-data$(EXEEXT):
    7839        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=50000000 csv-data.c
    7940        @./a.out
    8041        @rm -f ./a.out
     42
     43## =========================================================================================================
     44ctxswitch$(EXEEXT): \
     45        ctxswitch-pthread.run           \
     46        ctxswitch-cfa_coroutine.run     \
     47        ctxswitch-cfa_thread.run        \
     48        ctxswitch-upp_coroutine.run     \
     49        ctxswitch-upp_thread.run
     50
     51ctxswitch-cfa_coroutine$(EXEEXT):
     52        ${CC}        ctxswitch/cfa_cor.c   -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     53
     54ctxswitch-cfa_thread$(EXEEXT):
     55        ${CC}        ctxswitch/cfa_thrd.c  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     56
     57ctxswitch-upp_coroutine$(EXEEXT):
     58        u++          ctxswitch/upp_cor.cc  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     59
     60ctxswitch-upp_thread$(EXEEXT):
     61        u++          ctxswitch/upp_thrd.cc -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     62
     63ctxswitch-pthread$(EXEEXT):
     64        @BACKEND_CC@ ctxswitch/pthreads.c  -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     65
     66## =========================================================================================================
     67creation$(EXEEXT) :\
     68        creation-pthread.run            \
     69        creation-cfa_coroutine.run      \
     70        creation-cfa_thread.run         \
     71        creation-upp_coroutine.run      \
     72        creation-upp_thread.run
     73
     74creation-cfa_coroutine$(EXEEXT):
     75        ${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     76
     77creation-cfa_thread$(EXEEXT):
     78        ${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     79
     80creation-upp_coroutine$(EXEEXT):
     81        u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     82
     83creation-upp_thread$(EXEEXT):
     84        u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     85
     86creation-pthread$(EXEEXT):
     87        @BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     88
     89## =========================================================================================================
     90mutex$(EXEEXT) :\
     91        mutex-function.run      \
     92        mutex-pthread_lock.run  \
     93        mutex-upp.run           \
     94        mutex-cfa1.run          \
     95        mutex-cfa2.run          \
     96        mutex-cfa4.run
     97
     98mutex-function$(EXEEXT):
     99        @BACKEND_CC@ mutex/function.c    -DBENCH_N=500000000   -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     100
     101mutex-pthread_lock$(EXEEXT):
     102        @BACKEND_CC@ mutex/pthreads.c    -DBENCH_N=50000000    -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     103
     104mutex-upp$(EXEEXT):
     105        u++          mutex/upp.cc        -DBENCH_N=50000000    -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     106
     107mutex-cfa1$(EXEEXT):
     108        ${CC}        mutex/cfa1.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     109
     110mutex-cfa2$(EXEEXT):
     111        ${CC}        mutex/cfa2.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     112
     113mutex-cfa4$(EXEEXT):
     114        ${CC}        mutex/cfa4.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     115
     116## =========================================================================================================
     117signal$(EXEEXT) :\
     118        signal-upp.run          \
     119        signal-cfa1.run         \
     120        signal-cfa2.run         \
     121        signal-cfa4.run
     122
     123signal-upp$(EXEEXT):
     124        u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     125
     126signal-cfa1$(EXEEXT):
     127        ${CC}        schedint/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     128
     129signal-cfa2$(EXEEXT):
     130        ${CC}        schedint/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     131
     132signal-cfa4$(EXEEXT):
     133        ${CC}        schedint/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     134
     135## =========================================================================================================
     136waitfor$(EXEEXT) :\
     137        waitfor-upp.run         \
     138        waitfor-cfa1.run                \
     139        waitfor-cfa2.run                \
     140        waitfor-cfa4.run
     141
     142waitfor-upp$(EXEEXT):
     143        u++          schedext/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     144
     145waitfor-cfa1$(EXEEXT):
     146        ${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     147
     148waitfor-cfa2$(EXEEXT):
     149        ${CC}        schedext/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     150
     151waitfor-cfa4$(EXEEXT):
     152        ${CC}        schedext/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     153
     154## =========================================================================================================
     155
     156%.run : %$(EXEEXT) ${REPEAT}
     157        @rm -f .result.log
     158        @echo "------------------------------------------------------"
     159        @echo $<
     160        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
     161        @${STATS} .result.log
     162        @echo "------------------------------------------------------"
     163        @rm -f a.out .result.log
     164
     165${REPEAT} :
     166        @+make -C ${TOOLSDIR} repeat
  • src/benchmark/Makefile.in

    r4ee1efb r136ccd7  
    9292build_triplet = @build@
    9393host_triplet = @host@
     94noinst_PROGRAMS =
    9495subdir = src/benchmark
    9596ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     
    103104CONFIG_CLEAN_VPATH_FILES =
    104105PROGRAMS = $(noinst_PROGRAMS)
    105 bench_SOURCES = bench.c
    106 bench_OBJECTS = bench.$(OBJEXT)
    107 bench_LDADD = $(LDADD)
    108 csv_data_SOURCES = csv-data.c
    109 csv_data_OBJECTS = csv-data.$(OBJEXT)
    110 csv_data_LDADD = $(LDADD)
    111 ctxswitch_coroutine_SOURCES = ctxswitch-coroutine.c
    112 ctxswitch_coroutine_OBJECTS = ctxswitch-coroutine.$(OBJEXT)
    113 ctxswitch_coroutine_LDADD = $(LDADD)
    114 ctxswitch_thread_SOURCES = ctxswitch-thread.c
    115 ctxswitch_thread_OBJECTS = ctxswitch-thread.$(OBJEXT)
    116 ctxswitch_thread_LDADD = $(LDADD)
    117 monitor_SOURCES = monitor.c
    118 monitor_OBJECTS = monitor.$(OBJEXT)
    119 monitor_LDADD = $(LDADD)
    120 sched_int_SOURCES = sched-int.c
    121 sched_int_OBJECTS = sched-int.$(OBJEXT)
    122 sched_int_LDADD = $(LDADD)
    123106AM_V_P = $(am__v_P_@AM_V@)
    124107am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
     
    133116am__v_at_0 = @
    134117am__v_at_1 =
    135 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
    136 depcomp = $(SHELL) $(top_srcdir)/automake/depcomp
    137 am__depfiles_maybe = depfiles
    138 am__mv = mv -f
    139 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
    140         $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    141 AM_V_CC = $(am__v_CC_@AM_V@)
    142 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
    143 am__v_CC_0 = @echo "  CC      " $@;
    144 am__v_CC_1 =
    145 CCLD = $(CC)
    146 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
    147 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
    148 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
    149 am__v_CCLD_0 = @echo "  CCLD    " $@;
    150 am__v_CCLD_1 =
    151 SOURCES = bench.c csv-data.c ctxswitch-coroutine.c ctxswitch-thread.c \
    152         monitor.c sched-int.c
    153 DIST_SOURCES = bench.c csv-data.c ctxswitch-coroutine.c \
    154         ctxswitch-thread.c monitor.c sched-int.c
     118SOURCES =
     119DIST_SOURCES =
    155120am__can_run_installinfo = \
    156121  case $$AM_UPDATE_INFO_DIR in \
     
    159124  esac
    160125am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
    161 # Read a list of newline-separated strings from the standard input,
    162 # and print each of them once, without duplicates.  Input order is
    163 # *not* preserved.
    164 am__uniquify_input = $(AWK) '\
    165   BEGIN { nonempty = 0; } \
    166   { items[$$0] = 1; nonempty = 1; } \
    167   END { if (nonempty) { for (i in items) print i; }; } \
    168 '
    169 # Make sure the list of sources is unique.  This is necessary because,
    170 # e.g., the same source file might be shared among _SOURCES variables
    171 # for different programs/libraries.
    172 am__define_uniq_tagged_files = \
    173   list='$(am__tagged_files)'; \
    174   unique=`for i in $$list; do \
    175     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
    176   done | $(am__uniquify_input)`
    177 ETAGS = etags
    178 CTAGS = ctags
    179 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/automake/depcomp
     126am__DIST_COMMON = $(srcdir)/Makefile.in
    180127DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    181128ACLOCAL = @ACLOCAL@
     
    302249top_srcdir = @top_srcdir@
    303250AM_CFLAGS = -g -Wall -Wno-unused-function -O2
    304 noinst_PROGRAMS = bench$(EXEEXT) ctxswitch-coroutine$(EXEEXT) ctxswitch-thread$(EXEEXT) sched-int$(EXEEXT) monitor$(EXEEXT) csv-data$(EXEEXT)
     251TOOLSDIR = ${abs_top_srcdir}/tools/
     252REPEAT = ${TOOLSDIR}repeat
     253STATS = ${TOOLSDIR}stat.py
     254repeats = 30
    305255all: all-am
    306256
    307257.SUFFIXES:
    308 .SUFFIXES: .c .o .obj
    309258$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
    310259        @for dep in $?; do \
     
    339288clean-noinstPROGRAMS:
    340289        -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
    341 
    342 mostlyclean-compile:
    343         -rm -f *.$(OBJEXT)
    344 
    345 distclean-compile:
    346         -rm -f *.tab.c
    347 
    348 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench.Po@am__quote@
    349 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csv-data.Po@am__quote@
    350 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxswitch-coroutine.Po@am__quote@
    351 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctxswitch-thread.Po@am__quote@
    352 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Po@am__quote@
    353 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched-int.Po@am__quote@
    354 
    355 .c.o:
    356 @am__fastdepCC_TRUE@    $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
    357 @am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
    358 @am__fastdepCC_TRUE@    $(am__mv) $$depbase.Tpo $$depbase.Po
    359 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    360 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    361 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
    362 
    363 .c.obj:
    364 @am__fastdepCC_TRUE@    $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
    365 @am__fastdepCC_TRUE@    $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
    366 @am__fastdepCC_TRUE@    $(am__mv) $$depbase.Tpo $$depbase.Po
    367 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    368 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    369 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    370 
    371 ID: $(am__tagged_files)
    372         $(am__define_uniq_tagged_files); mkid -fID $$unique
    373 tags: tags-am
    374 TAGS: tags
    375 
    376 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
    377         set x; \
    378         here=`pwd`; \
    379         $(am__define_uniq_tagged_files); \
    380         shift; \
    381         if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
    382           test -n "$$unique" || unique=$$empty_fix; \
    383           if test $$# -gt 0; then \
    384             $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    385               "$$@" $$unique; \
    386           else \
    387             $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    388               $$unique; \
    389           fi; \
    390         fi
    391 ctags: ctags-am
    392 
    393 CTAGS: ctags
    394 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
    395         $(am__define_uniq_tagged_files); \
    396         test -z "$(CTAGS_ARGS)$$unique" \
    397           || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
    398              $$unique
    399 
    400 GTAGS:
    401         here=`$(am__cd) $(top_builddir) && pwd` \
    402           && $(am__cd) $(top_srcdir) \
    403           && gtags -i $(GTAGS_ARGS) "$$here"
    404 cscopelist: cscopelist-am
    405 
    406 cscopelist-am: $(am__tagged_files)
    407         list='$(am__tagged_files)'; \
    408         case "$(srcdir)" in \
    409           [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
    410           *) sdir=$(subdir)/$(srcdir) ;; \
    411         esac; \
    412         for i in $$list; do \
    413           if test -f "$$i"; then \
    414             echo "$(subdir)/$$i"; \
    415           else \
    416             echo "$$sdir/$$i"; \
    417           fi; \
    418         done >> $(top_builddir)/cscope.files
    419 
    420 distclean-tags:
    421         -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
     290tags TAGS:
     291
     292ctags CTAGS:
     293
     294cscope cscopelist:
     295
    422296
    423297distdir: $(DISTFILES)
     
    490364
    491365distclean: distclean-am
    492         -rm -rf ./$(DEPDIR)
    493366        -rm -f Makefile
    494 distclean-am: clean-am distclean-compile distclean-generic \
    495         distclean-tags
     367distclean-am: clean-am distclean-generic
    496368
    497369dvi: dvi-am
     
    536408
    537409maintainer-clean: maintainer-clean-am
    538         -rm -rf ./$(DEPDIR)
    539410        -rm -f Makefile
    540411maintainer-clean-am: distclean-am maintainer-clean-generic
     
    542413mostlyclean: mostlyclean-am
    543414
    544 mostlyclean-am: mostlyclean-compile mostlyclean-generic
     415mostlyclean-am: mostlyclean-generic
    545416
    546417pdf: pdf-am
     
    556427.MAKE: install-am install-strip
    557428
    558 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
    559         clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
    560         distclean-compile distclean-generic distclean-tags distdir dvi \
    561         dvi-am html html-am info info-am install install-am \
    562         install-data install-data-am install-dvi install-dvi-am \
    563         install-exec install-exec-am install-html install-html-am \
    564         install-info install-info-am install-man install-pdf \
    565         install-pdf-am install-ps install-ps-am install-strip \
    566         installcheck installcheck-am installdirs maintainer-clean \
    567         maintainer-clean-generic mostlyclean mostlyclean-compile \
    568         mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
     429.PHONY: all all-am check check-am clean clean-generic \
     430        clean-noinstPROGRAMS cscopelist-am ctags-am distclean \
     431        distclean-generic distdir dvi dvi-am html html-am info info-am \
     432        install install-am install-data install-data-am install-dvi \
     433        install-dvi-am install-exec install-exec-am install-html \
     434        install-html-am install-info install-info-am install-man \
     435        install-pdf install-pdf-am install-ps install-ps-am \
     436        install-strip installcheck installcheck-am installdirs \
     437        maintainer-clean maintainer-clean-generic mostlyclean \
     438        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
    569439        uninstall-am
    570440
    571441.PRECIOUS: Makefile
    572442
     443
     444.NOTPARALLEL:
    573445
    574446bench$(EXEEXT) :
     
    580452        rm -f ./a.out ;
    581453
    582 ctxswitch-coroutine$(EXEEXT):
    583         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 CorCtxSwitch.c
    584         @rm -f .result.log
    585         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    586                 ./a.out | tee -a .result.log ; \
    587         done
    588         @./stat.py .result.log
    589         @rm -f a.out .result.log
    590 
    591 ctxswitch-thread$(EXEEXT):
    592         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 ThrdCtxSwitch.c
    593         @rm -f .result.log
    594         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    595                 ./a.out | tee -a .result.log ; \
    596         done
    597         @./stat.py .result.log
    598         @rm -f a.out .result.log
    599 
    600 ctxswitch-pthread$(EXEEXT):
    601         @BACKEND_CC@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -lrt -pthread -DN=50000000 PthrdCtxSwitch.c
    602         @rm -f .result.log
    603         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    604                 ./a.out | tee -a .result.log ; \
    605         done
    606         @./stat.py .result.log
    607         @rm -f a.out .result.log
    608 
    609 sched-int$(EXEEXT):
    610         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 SchedInt.c
    611         @rm -f .result.log
    612         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    613                 ./a.out | tee -a .result.log ; \
    614         done
    615         @./stat.py .result.log
    616         @rm -f a.out .result.log
    617 
    618 monitor$(EXEEXT):
    619         ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=50000000 Monitor.c
    620         @rm -f .result.log
    621         @for number in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do \
    622                 ./a.out | tee -a .result.log ; \
    623         done
    624         @./stat.py .result.log
    625         @rm -f a.out .result.log
    626 
    627454csv-data$(EXEEXT):
    628455        @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=50000000 csv-data.c
     
    630457        @rm -f ./a.out
    631458
     459ctxswitch$(EXEEXT): \
     460        ctxswitch-pthread.run           \
     461        ctxswitch-cfa_coroutine.run     \
     462        ctxswitch-cfa_thread.run        \
     463        ctxswitch-upp_coroutine.run     \
     464        ctxswitch-upp_thread.run
     465
     466ctxswitch-cfa_coroutine$(EXEEXT):
     467        ${CC}        ctxswitch/cfa_cor.c   -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     468
     469ctxswitch-cfa_thread$(EXEEXT):
     470        ${CC}        ctxswitch/cfa_thrd.c  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     471
     472ctxswitch-upp_coroutine$(EXEEXT):
     473        u++          ctxswitch/upp_cor.cc  -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     474
     475ctxswitch-upp_thread$(EXEEXT):
     476        u++          ctxswitch/upp_thrd.cc -DBENCH_N=50000000  -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     477
     478ctxswitch-pthread$(EXEEXT):
     479        @BACKEND_CC@ ctxswitch/pthreads.c  -DBENCH_N=50000000  -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     480
     481creation$(EXEEXT) :\
     482        creation-pthread.run            \
     483        creation-cfa_coroutine.run      \
     484        creation-cfa_thread.run         \
     485        creation-upp_coroutine.run      \
     486        creation-upp_thread.run
     487
     488creation-cfa_coroutine$(EXEEXT):
     489        ${CC}        creation/cfa_cor.c   -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     490
     491creation-cfa_thread$(EXEEXT):
     492        ${CC}        creation/cfa_thrd.c  -DBENCH_N=10000000   -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     493
     494creation-upp_coroutine$(EXEEXT):
     495        u++          creation/upp_cor.cc  -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     496
     497creation-upp_thread$(EXEEXT):
     498        u++          creation/upp_thrd.cc -DBENCH_N=50000000   -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     499
     500creation-pthread$(EXEEXT):
     501        @BACKEND_CC@ creation/pthreads.c  -DBENCH_N=250000     -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     502
     503mutex$(EXEEXT) :\
     504        mutex-function.run      \
     505        mutex-pthread_lock.run  \
     506        mutex-upp.run           \
     507        mutex-cfa1.run          \
     508        mutex-cfa2.run          \
     509        mutex-cfa4.run
     510
     511mutex-function$(EXEEXT):
     512        @BACKEND_CC@ mutex/function.c    -DBENCH_N=500000000   -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     513
     514mutex-pthread_lock$(EXEEXT):
     515        @BACKEND_CC@ mutex/pthreads.c    -DBENCH_N=50000000    -I. -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     516
     517mutex-upp$(EXEEXT):
     518        u++          mutex/upp.cc        -DBENCH_N=50000000    -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     519
     520mutex-cfa1$(EXEEXT):
     521        ${CC}        mutex/cfa1.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     522
     523mutex-cfa2$(EXEEXT):
     524        ${CC}        mutex/cfa2.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     525
     526mutex-cfa4$(EXEEXT):
     527        ${CC}        mutex/cfa4.c        -DBENCH_N=5000000     -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     528
     529signal$(EXEEXT) :\
     530        signal-upp.run          \
     531        signal-cfa1.run         \
     532        signal-cfa2.run         \
     533        signal-cfa4.run
     534
     535signal-upp$(EXEEXT):
     536        u++          schedint/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     537
     538signal-cfa1$(EXEEXT):
     539        ${CC}        schedint/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     540
     541signal-cfa2$(EXEEXT):
     542        ${CC}        schedint/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     543
     544signal-cfa4$(EXEEXT):
     545        ${CC}        schedint/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     546
     547waitfor$(EXEEXT) :\
     548        waitfor-upp.run         \
     549        waitfor-cfa1.run                \
     550        waitfor-cfa2.run                \
     551        waitfor-cfa4.run
     552
     553waitfor-upp$(EXEEXT):
     554        u++          schedext/upp.cc     -DBENCH_N=5000000     -I. -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     555
     556waitfor-cfa1$(EXEEXT):
     557        ${CC}        schedext/cfa1.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     558
     559waitfor-cfa2$(EXEEXT):
     560        ${CC}        schedext/cfa2.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     561
     562waitfor-cfa4$(EXEEXT):
     563        ${CC}        schedext/cfa4.c     -DBENCH_N=500000      -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
     564
     565%.run : %$(EXEEXT) ${REPEAT}
     566        @rm -f .result.log
     567        @echo "------------------------------------------------------"
     568        @echo $<
     569        @${REPEAT} ${repeats} ./a.out | tee -a .result.log
     570        @${STATS} .result.log
     571        @echo "------------------------------------------------------"
     572        @rm -f a.out .result.log
     573
     574${REPEAT} :
     575        @+make -C ${TOOLSDIR} repeat
     576
    632577# Tell versions [3.59,3.63) of GNU make to not export all variables.
    633578# Otherwise a system limit (for SysV at least) may be exceeded.
  • src/benchmark/bench.h

    r4ee1efb r136ccd7  
    11#pragma once
    22
    3 #ifdef __CFORALL__
     3#if defined(__CFORALL__)
    44extern "C" {
    55#endif
     6        #include <stdlib.h>
    67        #include <unistd.h>                                     // sysconf
    78        #include <sys/times.h>                                  // times
    89        #include <time.h>
    9 #ifdef __CFORALL__
     10#if defined(__CFORALL__)
    1011}
    1112#endif
     
    2728} // Time
    2829
    29 #ifndef N
    30 #define N 10000000
     30#ifndef BENCH_N
     31#define BENCH_N 500 //10000000
    3132#endif
     33
     34#define BENCH(statement, output)                \
     35        size_t n = BENCH_N;                     \
     36        if( argc > 2 ) return 1;                \
     37        if( argc == 2 ) {                               \
     38                n = atoi(argv[1]);              \
     39        }                                               \
     40        long long int StartTime, EndTime;       \
     41        StartTime = Time();                     \
     42        statement;                                      \
     43        EndTime = Time();                               \
     44        unsigned long long int output =         \
     45        ( EndTime - StartTime ) / n;
    3246
    3347unsigned int default_preemption() {
  • src/driver/cfa.cc

    r4ee1efb r136ccd7  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Sep 26 23:12:38 2017
    13 // Update Count     : 159
     12// Last Modified On : Tue Oct 31 11:40:44 2017
     13// Update Count     : 160
    1414//
    1515
     
    305305        } // if
    306306
     307        shuffle( args, sargs, nargs, 1 );                                       // make room at front of argument list
     308        nargs += 1;
    307309        if ( CFA_flag ) {
     310                args[sargs] = "-D__CFA_FLAG__=-N";
    308311                args[nargs] = "-D__CFA_PREPROCESS_";
    309312                nargs += 1;
    310         } // if
     313        } else {
     314                args[sargs] = "-D__CFA_FLAG__=-L";
     315        } // if
     316        sargs += 1;
    311317
    312318        if ( debug ) {
  • src/libcfa/concurrency/kernel.c

    r4ee1efb r136ccd7  
    548548
    549549        int len = snprintf( abort_text, abort_text_size, "Error occurred while executing task %.256s (%p)", thrd->self_cor.name, thrd );
    550         __lib_debug_write( STDERR_FILENO, abort_text, len );
     550        __lib_debug_write( abort_text, len );
    551551
    552552        if ( thrd != this_coroutine ) {
    553553                len = snprintf( abort_text, abort_text_size, " in coroutine %.256s (%p).\n", this_coroutine->name, this_coroutine );
    554                 __lib_debug_write( STDERR_FILENO, abort_text, len );
     554                __lib_debug_write( abort_text, len );
    555555        }
    556556        else {
    557                 __lib_debug_write( STDERR_FILENO, ".\n", 2 );
     557                __lib_debug_write( ".\n", 2 );
    558558        }
    559559}
  • src/libcfa/concurrency/monitor.c

    r4ee1efb r136ccd7  
    2121#include "kernel_private.h"
    2222
     23#include "bits/algorithms.h"
     24
    2325//-----------------------------------------------------------------------------
    2426// Forward declarations
     
    9597                else if( this->owner == thrd) {
    9698                        // We already have the monitor, just note how many times we took it
    97                         verify( this->recursion > 0 );
    9899                        this->recursion += 1;
    99100
     
    207208                // it means we don't need to do anything
    208209                if( this->recursion != 0) {
     210                        LIB_DEBUG_PRINT_SAFE("Kernel :  recursion still %d\n", this->recursion);
    209211                        unlock( &this->lock );
    210212                        return;
     
    291293
    292294        // Sort monitors based on address -> TODO use a sort specialized for small numbers
    293         qsort(this.m, count);
     295        __libcfa_small_sort(this.m, count);
    294296
    295297        // Save previous thread context
     
    492494        set_owner( monitors, count, signallee );
    493495
     496        LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : signal_block condition %p (s: %p)\n", this, signallee );
     497
    494498        //Everything is ready to go to sleep
    495499        BlockInternal( locks, count, &signallee, 1 );
     
    498502        // WE WOKE UP
    499503
     504
     505        LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel :   signal_block returned\n" );
    500506
    501507        //We are back, restore the masks and recursions
     
    536542        short actual_count = aggregate( mon_storage, mask );
    537543
    538         LIB_DEBUG_PRINT_SAFE("Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (short)max);
     544        LIB_DEBUG_PRINT_BUFFER_DECL( "Kernel : waitfor %d (s: %d, m: %d)\n", actual_count, mask.size, (short)max);
    539545
    540546        if(actual_count == 0) return;
    541547
    542         LIB_DEBUG_PRINT_SAFE("Kernel : waitfor internal proceeding\n");
     548        LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : waitfor internal proceeding\n");
    543549
    544550        // Create storage for monitor context
     
    556562                        *mask.accepted = index;
    557563                        if( mask.clauses[index].is_dtor ) {
    558                                 LIB_DEBUG_PRINT_SAFE("Kernel : dtor already there\n");
     564                                LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : dtor already there\n");
    559565                                verifyf( mask.clauses[index].size == 1        , "ERROR: Accepted dtor has more than 1 mutex parameter." );
    560566
     
    568574                        }
    569575                        else {
    570                                 LIB_DEBUG_PRINT_SAFE("Kernel : thread present, baton-passing\n");
     576                                LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : thread present, baton-passing\n");
    571577
    572578                                // Create the node specific to this wait operation
     
    576582                                monitor_save;
    577583
     584                                LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel :  baton of %d monitors : ", count );
     585                                #ifdef __CFA_DEBUG_PRINT__
     586                                        for( int i = 0; i < count; i++) {
     587                                                LIB_DEBUG_PRINT_BUFFER_LOCAL( "%p %p ", monitors[i], monitors[i]->signal_stack.top );
     588                                        }
     589                                #endif
     590                                LIB_DEBUG_PRINT_BUFFER_LOCAL( "\n");
     591
    578592                                // Set the owners to be the next thread
    579593                                set_owner( monitors, count, next );
     
    585599                                monitor_restore;
    586600
    587                                 LIB_DEBUG_PRINT_SAFE("Kernel : thread present, returned\n");
     601                                LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : thread present, returned\n");
    588602                        }
    589603
    590                         LIB_DEBUG_PRINT_SAFE("Kernel : accepted %d\n", *mask.accepted);
     604                        LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted);
    591605
    592606                        return;
     
    596610
    597611        if( duration == 0 ) {
    598                 LIB_DEBUG_PRINT_SAFE("Kernel : non-blocking, exiting\n");
     612                LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : non-blocking, exiting\n");
    599613
    600614                unlock_all( locks, count );
    601615
    602                 LIB_DEBUG_PRINT_SAFE("Kernel : accepted %d\n", *mask.accepted);
     616                LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted);
    603617                return;
    604618        }
     
    607621        verifyf( duration < 0, "Timeout on waitfor statments not supported yet.");
    608622
    609         LIB_DEBUG_PRINT_SAFE("Kernel : blocking waitfor\n");
     623        LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : blocking waitfor\n");
    610624
    611625        // Create the node specific to this wait operation
     
    629643        monitor_restore;
    630644
    631         LIB_DEBUG_PRINT_SAFE("Kernel : exiting\n");
    632 
    633         LIB_DEBUG_PRINT_SAFE("Kernel : accepted %d\n", *mask.accepted);
     645        LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : exiting\n");
     646
     647        LIB_DEBUG_PRINT_BUFFER_LOCAL( "Kernel : accepted %d\n", *mask.accepted);
    634648}
    635649
     
    648662
    649663static inline void set_owner( monitor_desc ** monitors, short count, thread_desc * owner ) {
    650         for( int i = 0; i < count; i++ ) {
    651                 set_owner( monitors[i], owner );
     664        monitors[0]->owner     = owner;
     665        monitors[0]->recursion = 1;
     666        for( int i = 1; i < count; i++ ) {
     667                monitors[i]->owner     = owner;
     668                monitors[i]->recursion = 0;
    652669        }
    653670}
     
    667684static inline thread_desc * next_thread( monitor_desc * this ) {
    668685        //Check the signaller stack
     686        LIB_DEBUG_PRINT_SAFE("Kernel :  mon %p AS-stack top %p\n", this, this->signal_stack.top);
    669687        __condition_criterion_t * urgent = pop( &this->signal_stack );
    670688        if( urgent ) {
     
    718736        for(int i = 0; i < count; i++) {
    719737                (criteria[i]){ monitors[i], waiter };
     738                LIB_DEBUG_PRINT_SAFE( "Kernel :  target %p = %p\n", criteria[i].target, &criteria[i] );
    720739                push( &criteria[i].target->signal_stack, &criteria[i] );
    721740        }
     
    788807        }
    789808
    790         // LIB_DEBUG_PRINT_SAFE( "Runing %i\n", ready2run );
     809        LIB_DEBUG_PRINT_SAFE( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL );
    791810        return ready2run ? node->waiting_thread : NULL;
    792811}
     
    856875        short size = 0;
    857876        for( int i = 0; i < mask.size; i++ ) {
     877                __libcfa_small_sort( mask.clauses[i].list, mask.clauses[i].size );
    858878                for( int j = 0; j < mask.clauses[i].size; j++) {
    859879                        insert_unique( storage, size, mask.clauses[i].list[j] );
    860880                }
    861881        }
    862         qsort( storage, size );
     882        // TODO insertion sort instead of this
     883        __libcfa_small_sort( storage, size );
    863884        return size;
    864885}
  • src/libcfa/concurrency/preemption.c

    r4ee1efb r136ccd7  
    380380
    381381        if ( sigaction( sig, &act, NULL ) == -1 ) {
    382                 LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO,
     382                LIB_DEBUG_PRINT_BUFFER_DECL(
    383383                        " __kernel_sigaction( sig:%d, handler:%p, flags:%d ), problem installing signal handler, error(%d) %s.\n",
    384384                        sig, handler, flags, errno, strerror( errno )
     
    397397
    398398        if ( sigaction( sig, &act, NULL ) == -1 ) {
    399                 LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO,
     399                LIB_DEBUG_PRINT_BUFFER_DECL(
    400400                        " __kernel_sigdefault( sig:%d ), problem reseting signal handler, error(%d) %s.\n",
    401401                        sig, errno, strerror( errno )
  • src/libcfa/interpose.c

    r4ee1efb r136ccd7  
    127127                        va_end( args );
    128128
    129                         __lib_debug_write( STDERR_FILENO, abort_text, len );
    130                         __lib_debug_write( STDERR_FILENO, "\n", 1 );
     129                        __lib_debug_write( abort_text, len );
     130                        __lib_debug_write( "\n", 1 );
    131131                }
    132132
    133133                len = snprintf( abort_text, abort_text_size, "Cforall Runtime error (UNIX pid:%ld)\n", (long int)getpid() ); // use UNIX pid (versus getPid)
    134                 __lib_debug_write( STDERR_FILENO, abort_text, len );
     134                __lib_debug_write( abort_text, len );
    135135
    136136
  • src/libcfa/libhdr/libdebug.c

    r4ee1efb r136ccd7  
    99// Author           : Thierry Delisle
    1010// Created On       : Thu Mar 30 12:30:01 2017
    11 // Last Modified By : 
    12 // Last Modified On : 
     11// Last Modified By :
     12// Last Modified On :
    1313// Update Count     : 0
    1414//
     
    2828extern "C" {
    2929
    30         void __lib_debug_write( int fd, const char *in_buffer, int len ) {
     30        void __lib_debug_write( const char *in_buffer, int len ) {
    3131                // ensure all data is written
    32                 for ( int count = 0, retcode; count < len; count += retcode ) { 
     32                for ( int count = 0, retcode; count < len; count += retcode ) {
    3333                        in_buffer += count;
    3434
    3535                        for ( ;; ) {
    36                                 retcode = write( fd, in_buffer, len - count );
     36                                retcode = write( STDERR_FILENO, in_buffer, len - count );
    3737
    3838                                // not a timer interrupt ?
    39                                 if ( retcode != -1 || errno != EINTR ) break; 
     39                                if ( retcode != -1 || errno != EINTR ) break;
    4040                        }
    4141
     
    5252                va_start( args, fmt );
    5353                __lib_debug_acquire();
    54                
     54
    5555                int len = vsnprintf( buffer, buffer_size, fmt, args );
    56                 __lib_debug_write( STDERR_FILENO, buffer, len );
     56                __lib_debug_write( buffer, len );
    5757
    5858                __lib_debug_release();
     
    6464
    6565                va_start( args, fmt );
    66                
     66
    6767                int len = vsnprintf( buffer, buffer_size, fmt, args );
    68                 __lib_debug_write( STDERR_FILENO, buffer, len );
     68                __lib_debug_write( buffer, len );
    6969
    7070                va_end( args );
     
    7373        void __lib_debug_print_vararg( const char fmt[], va_list args ) {
    7474                int len = vsnprintf( buffer, buffer_size, fmt, args );
    75                 __lib_debug_write( STDERR_FILENO, buffer, len );
     75                __lib_debug_write( buffer, len );
    7676        }
    7777
     
    8080
    8181                va_start( args, fmt );
    82                
     82
    8383                int len = vsnprintf( in_buffer, in_buffer_size, fmt, args );
    84                 __lib_debug_write( STDERR_FILENO, in_buffer, len );
     84                __lib_debug_write( in_buffer, len );
    8585
    8686                va_end( args );
  • src/libcfa/libhdr/libdebug.h

    r4ee1efb r136ccd7  
    4444extern "C" {
    4545#endif
    46       #include <stdarg.h>
     46        #include <stdarg.h>
     47        #include <stdio.h>
    4748
    48       extern void __lib_debug_write( int fd, const char *buffer, int len );
     49      extern void __lib_debug_write( const char *buffer, int len );
    4950      extern void __lib_debug_acquire();
    5051      extern void __lib_debug_release();
     
    5859
    5960#ifdef __CFA_DEBUG_PRINT__
    60         #define LIB_DEBUG_WRITE( fd, buffer, len )     __lib_debug_write( fd, buffer, len )
     61        #define LIB_DEBUG_WRITE( buffer, len )         __lib_debug_write( buffer, len )
    6162        #define LIB_DEBUG_ACQUIRE()                    __lib_debug_acquire()
    6263        #define LIB_DEBUG_RELEASE()                    __lib_debug_release()
     
    6465        #define LIB_DEBUG_PRINT_NOLOCK(...)            __lib_debug_print_nolock (__VA_ARGS__)
    6566        #define LIB_DEBUG_PRINT_BUFFER(...)            __lib_debug_print_buffer (__VA_ARGS__)
    66         #define LIB_DEBUG_PRINT_BUFFER_DECL(fd, ...)   char text[256]; int len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text, len );
    67         #define LIB_DEBUG_PRINT_BUFFER_LOCAL(fd, ...)  len = snprintf( text, 256, __VA_ARGS__ ); __lib_debug_write( fd, text, len );
     67        #define LIB_DEBUG_PRINT_BUFFER_DECL(...)       char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __lib_debug_write( __dbg_text, __dbg_len );
     68        #define LIB_DEBUG_PRINT_BUFFER_LOCAL(...)      __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __lib_debug_write( __dbg_text, __dbg_len );
    6869#else
    6970        #define LIB_DEBUG_WRITE(...)               ((void)0)
  • src/libcfa/stdlib

    r4ee1efb r136ccd7  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 23 20:29:47 2017
    13 // Update Count     : 224
     12// Last Modified On : Tue Oct 31 13:47:24 2017
     13// Update Count     : 245
    1414//
    1515
     
    2727// allocation, non-array types
    2828static inline forall( dtype T | sized(T) ) T * malloc( void ) {
    29         //printf( "X1\n" );
     29        // printf( "* malloc\n" );
    3030        return (T *)(void *)malloc( (size_t)sizeof(T) );        // C malloc
    3131} // malloc
     32
     33// static inline forall( dtype T | sized(T) ) T & malloc( void ) {
     34//      int & p = *(T *)(void *)malloc( (size_t)sizeof(T) ); // C malloc
     35//      printf( "& malloc %p\n", &p );
     36//      return p;
     37// //   return (T &)*(T *)(void *)malloc( (size_t)sizeof(T) ); // C malloc
     38// } // malloc
    3239
    3340extern "C" { void * calloc( size_t dim, size_t size ); } // default C routine
     
    206213//---------------------------------------
    207214
    208 void rand48seed( long int s );
    209 char rand48( void );
    210 int rand48( void );
    211 unsigned int rand48( void );
    212 long int rand48( void );
    213 unsigned long int rand48( void );
    214 float rand48( void );
    215 double rand48( void );
    216 float _Complex rand48( void );
    217 double _Complex rand48( void );
    218 long double _Complex rand48( void );
     215void random_seed( long int s );
     216char random( void );
     217char random( char l, char u );
     218int random( void );
     219unsigned int random( void );
     220unsigned int random( unsigned int u );
     221unsigned int random( unsigned int l, unsigned int u );
     222//long int random( void );
     223unsigned long int random( void );
     224unsigned long int random( unsigned long int u );
     225unsigned long int random( unsigned long int l, unsigned long int u );
     226float random( void );
     227double random( void );
     228float _Complex random( void );
     229double _Complex random( void );
     230long double _Complex random( void );
    219231
    220232//---------------------------------------
  • src/libcfa/stdlib.c

    r4ee1efb r136ccd7  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 23 20:30:44 2017
    13 // Update Count     : 292
     12// Last Modified On : Mon Oct 30 22:43:02 2017
     13// Update Count     : 297
    1414//
    1515
     
    275275//---------------------------------------
    276276
    277 void rand48seed( long int s ) { srand48( s ); }
    278 char rand48( void ) { return mrand48(); }
    279 int rand48( void ) { return mrand48(); }
    280 unsigned int rand48( void ) { return lrand48(); }
    281 long int rand48( void ) { return mrand48(); }
    282 unsigned long int rand48( void ) { return lrand48(); }
    283 float rand48( void ) { return (float)drand48(); }               // otherwise float uses lrand48
    284 double rand48( void ) { return drand48(); }
    285 float _Complex rand48( void ) { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
    286 double _Complex rand48( void ) { return drand48() + (double _Complex)(drand48() * _Complex_I); }
    287 long double _Complex rand48( void) { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
     277void random_seed( long int s ) { srand48( s ); }
     278char random( void ) { return mrand48(); }
     279char random( char l, char u ) { return lrand48() % (u - l) + l; }
     280int random( void ) { return mrand48(); }
     281unsigned int random( void ) { return lrand48(); }
     282unsigned int random( unsigned int u ) { return lrand48() % u; }
     283unsigned int random( unsigned int l, unsigned int u ) { return lrand48() % (u - l) + l; }
     284//long int random( void ) { return mrand48(); }
     285unsigned long int random( void ) { return lrand48(); }
     286unsigned long int random( unsigned long int u ) { return lrand48() % u; }
     287unsigned long int random( unsigned long int l, unsigned long int u ) { return lrand48() % (u - l) + l; }
     288float random( void ) { return (float)drand48(); }               // otherwise float uses lrand48
     289double random( void ) { return drand48(); }
     290float _Complex random( void ) { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
     291double _Complex random( void ) { return drand48() + (double _Complex)(drand48() * _Complex_I); }
     292long double _Complex random( void) { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
    288293
    289294//---------------------------------------
  • src/main.cc

    r4ee1efb r136ccd7  
    1010// Author           : Richard C. Bilson
    1111// Created On       : Fri May 15 23:12:02 2015
    12 // Last Modified By : Andrew Beach
    13 // Last Modified On : Wed Jul 26 14:38:00 2017
    14 // Update Count     : 443
     12// Last Modified By : Peter A. Buhr
     13// Last Modified On : Tue Oct 31 12:22:40 2017
     14// Update Count     : 445
    1515//
    1616
     
    9393        codegenp = false,
    9494        prettycodegenp = false,
    95         nolinemarks = false;
     95        linemarks = false;
    9696
    9797static void parse_cmdline( int argc, char *argv[], const char *& filename );
     
    340340
    341341                CodeTools::fillLocations( translationUnit );
    342                 CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, ! nolinemarks );
     342                CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks );
    343343
    344344                CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
     
    378378
    379379void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    380         enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
     380        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
    381381
    382382        static struct option long_opts[] = {
     
    390390                { "grammar", no_argument, 0, Grammar },
    391391                { "libcfa", no_argument, 0, LibCFA },
     392                { "line-marks", no_argument, 0, Linemarks },
     393                { "no-line-marks", no_argument, 0, Nolinemarks },
    392394                { "no-preamble", no_argument, 0, Nopreamble },
    393395                { "parse", no_argument, 0, Parse },
     
    405407
    406408        int c;
    407         while ( (c = getopt_long( argc, argv, "abBcCdefglLmnpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
     409        while ( (c = getopt_long( argc, argv, "abBcCdefglLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
    408410                switch ( c ) {
    409411                  case Ast:
     
    445447                        libcfap = true;
    446448                        break;
    447                   case 'L':                                                                             // surpress lines marks
    448                         nolinemarks = true;
     449                  case Linemarks:
     450                  case 'L':                                                                             // print lines marks
     451                        linemarks = true;
    449452                        break;
    450453                  case Nopreamble:
    451454                  case 'n':                                                                             // do not read preamble
    452455                        nopreludep = true;
     456                        break;
     457                  case Nolinemarks:
     458                  case 'N':                                                                             // suppress line marks
     459                        linemarks = false;
    453460                        break;
    454461                  case Prototypes:
  • src/prelude/Makefile.am

    r4ee1efb r136ccd7  
    5757
    5858bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
    59         ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
     59        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpm bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
    6060
    6161maintainer-clean-local :
  • src/prelude/Makefile.in

    r4ee1efb r136ccd7  
    526526
    527527bootloader.c : bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp
    528         ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpmL bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
     528        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpm bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
    529529
    530530maintainer-clean-local :
  • src/prelude/prelude.cf

    r4ee1efb r136ccd7  
    77// Created On       : Sat Nov 29 07:23:41 2014
    88// Last Modified By : Peter A. Buhr
    9 // Last Modified On : Sun Oct  8 12:21:33 2017
    10 // Update Count     : 97
     9// Last Modified On : Sat Oct 28 16:33:09 2017
     10// Update Count     : 102
    1111//
    1212
     
    4141_Bool                   ?++( _Bool & ),                         ?++( volatile _Bool & );
    4242_Bool                   ?--( _Bool & ),                         ?--( volatile _Bool & );
    43 unsigned char           ?++( unsigned char & ),                 ?++( volatile unsigned char & );
    4443signed short            ?++( signed short & ),                  ?++( volatile signed short & );
    4544signed short            ?--( signed short & ),                  ?--( volatile signed short & );
     
    196195long double _Complex    ?+?( long double _Complex, long double _Complex ),      ?-?( long double _Complex, long double _Complex );
    197196
    198 forall( dtype T | sized(T) ) T *                        ?+?(                T *,          ptrdiff_t );
    199 forall( dtype T | sized(T) ) T *                        ?+?(          ptrdiff_t,                T * );
     197forall( dtype T | sized(T) ) T *                ?+?(                T *,          ptrdiff_t );
     198forall( dtype T | sized(T) ) T *                ?+?(          ptrdiff_t,                T * );
    200199forall( dtype T | sized(T) ) const T *          ?+?( const          T *,          ptrdiff_t );
    201200forall( dtype T | sized(T) ) const T *          ?+?(          ptrdiff_t, const          T * );
    202 forall( dtype T | sized(T) ) volatile T *               ?+?(       volatile T *,          ptrdiff_t );
    203 forall( dtype T | sized(T) ) volatile T *               ?+?(          ptrdiff_t,       volatile T * );
     201forall( dtype T | sized(T) ) volatile T *       ?+?(       volatile T *,          ptrdiff_t );
     202forall( dtype T | sized(T) ) volatile T *       ?+?(          ptrdiff_t,       volatile T * );
    204203forall( dtype T | sized(T) ) const volatile T * ?+?( const volatile T *,          ptrdiff_t );
    205204forall( dtype T | sized(T) ) const volatile T * ?+?(          ptrdiff_t, const volatile T * );
    206 forall( dtype T | sized(T) ) T *                        ?-?(                T *,          ptrdiff_t );
     205forall( dtype T | sized(T) ) T *                ?-?(                T *,          ptrdiff_t );
    207206forall( dtype T | sized(T) ) const T *          ?-?( const          T *,          ptrdiff_t );
    208 forall( dtype T | sized(T) ) volatile T *               ?-?(       volatile T *,          ptrdiff_t );
     207forall( dtype T | sized(T) ) volatile T *       ?-?(       volatile T *,          ptrdiff_t );
    209208forall( dtype T | sized(T) ) const volatile T * ?-?( const volatile T *,          ptrdiff_t );
    210209forall( dtype T | sized(T) ) ptrdiff_t          ?-?( const volatile T *, const volatile T * );
     
    232231signed int ?<?( _Bool, _Bool ),                                         ?<=?( _Bool, _Bool ),
    233232           ?>?( _Bool, _Bool ),                                         ?>=?( _Bool, _Bool );
    234 signed int ?<?( char, char ),                           ?<=?( char, char ),
    235            ?>?( char, char ),                           ?>=?( char, char );
     233signed int ?<?( char, char ),                                           ?<=?( char, char ),
     234           ?>?( char, char ),                                           ?>=?( char, char );
    236235signed int ?<?( signed char, signed char ),                             ?<=?( signed char, signed char ),
    237236           ?>?( signed char, signed char ),                             ?>=?( signed char, signed char );
     
    241240           ?>?( signed short, signed short ),                           ?>=?( signed short, signed short );
    242241signed int ?<?( unsigned short, unsigned short ),                       ?<=?( unsigned short, unsigned short ),
    243            ?>?( unsigned short, unsigned short ),                               ?>=?( unsigned short, unsigned short );
     242           ?>?( unsigned short, unsigned short ),                       ?>=?( unsigned short, unsigned short );
    244243signed int ?<?( signed int, signed int ),                               ?<=?( signed int, signed int ),
    245244           ?>?( signed int, signed int ),                               ?>=?( signed int, signed int );
     
    474473forall( ftype FT ) FT *                 ?=?( FT * volatile &, zero_t );
    475474
    476 forall( dtype T | sized(T) ) T *                        ?+=?(                T *          &, ptrdiff_t );
    477 forall( dtype T | sized(T) ) T *                        ?+=?(                T * volatile &, ptrdiff_t );
     475forall( dtype T | sized(T) ) T *                ?+=?(                T *          &, ptrdiff_t );
     476forall( dtype T | sized(T) ) T *                ?+=?(                T * volatile &, ptrdiff_t );
    478477forall( dtype T | sized(T) ) const T *          ?+=?( const          T *          &, ptrdiff_t );
    479478forall( dtype T | sized(T) ) const T *          ?+=?( const          T * volatile &, ptrdiff_t );
    480 forall( dtype T | sized(T) ) volatile T *               ?+=?(       volatile T *          &, ptrdiff_t );
    481 forall( dtype T | sized(T) ) volatile T *               ?+=?(       volatile T * volatile &, ptrdiff_t );
     479forall( dtype T | sized(T) ) volatile T *       ?+=?(       volatile T *          &, ptrdiff_t );
     480forall( dtype T | sized(T) ) volatile T *       ?+=?(       volatile T * volatile &, ptrdiff_t );
    482481forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T *          &, ptrdiff_t );
    483482forall( dtype T | sized(T) ) const volatile T * ?+=?( const volatile T * volatile &, ptrdiff_t );
    484 forall( dtype T | sized(T) ) T *                        ?-=?(                T *          &, ptrdiff_t );
    485 forall( dtype T | sized(T) ) T *                        ?-=?(                T * volatile &, ptrdiff_t );
     483forall( dtype T | sized(T) ) T *                ?-=?(                T *          &, ptrdiff_t );
     484forall( dtype T | sized(T) ) T *                ?-=?(                T * volatile &, ptrdiff_t );
    486485forall( dtype T | sized(T) ) const T *          ?-=?( const          T *          &, ptrdiff_t );
    487486forall( dtype T | sized(T) ) const T *          ?-=?( const          T * volatile &, ptrdiff_t );
    488 forall( dtype T | sized(T) ) volatile T *               ?-=?(       volatile T *          &, ptrdiff_t );
    489 forall( dtype T | sized(T) ) volatile T *               ?-=?(       volatile T * volatile &, ptrdiff_t );
     487forall( dtype T | sized(T) ) volatile T *       ?-=?(       volatile T *          &, ptrdiff_t );
     488forall( dtype T | sized(T) ) volatile T *       ?-=?(       volatile T * volatile &, ptrdiff_t );
    490489forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T *          &, ptrdiff_t );
    491490forall( dtype T | sized(T) ) const volatile T * ?-=?( const volatile T * volatile &, ptrdiff_t );
     
    503502signed long long int    ?=?( signed long long int &, signed long long int ),    ?=?( volatile signed long long int &, signed long long int );
    504503unsigned long long int  ?=?( unsigned long long int &, unsigned long long int ), ?=?( volatile unsigned long long int &, unsigned long long int );
    505 zero_t          ?=?( zero_t &, zero_t );
     504zero_t                  ?=?( zero_t &, zero_t );
    506505one_t                   ?=?( one_t &, one_t );
    507506
     
    674673                        ?+=?( long double _Complex &, long double _Complex ), ?+=?( volatile long double _Complex &, long double _Complex ),
    675674                        ?-=?( long double _Complex &, long double _Complex ), ?-=?( volatile long double _Complex &, long double _Complex );
    676 
    677 
    678 
    679675
    680676
     
    846842forall( dtype DT ) void ^?{}( const volatile  DT *         &);
    847843
    848 void    ^?{}(               void *          &);
    849 void    ^?{}( const         void *          &);
    850 void    ^?{}(      volatile void *          &);
    851 void    ^?{}( const volatile void *         &);
     844void ^?{}(                  void *          &);
     845void ^?{}( const            void *          &);
     846void ^?{}(         volatile void *          &);
     847void ^?{}( const  volatile void *          &);
    852848
    853849// Local Variables: //
  • src/tests/.expect/64/literals.txt

    r4ee1efb r136ccd7  
    55__attribute__ ((__nothrow__,__leaf__,__noreturn__)) extern void exit(signed int __status);
    66extern signed int printf(const char *__restrict __format, ...);
    7 void __for_each__A2_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_assign__PFt1_Rt1t1____constructor__PF_Rt1____constructor__PF_Rt1t1____destructor__PF_Rt1____operator_preincr__PFt0_Rt0____operator_predecr__PFt0_Rt0____operator_equal__PFi_t0t0____operator_notequal__PFi_t0t0____operator_deref__PFRt1_t0__F_t0t0PF_t1___1(__attribute__ ((unused)) void (*_adapterF_9telt_type__P)(void (*__anonymous_object0)(), void *__anonymous_object1), __attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object2)(), void *__anonymous_object3), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object4)(), void *__anonymous_object5, void *__anonymous_object6), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object7)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object8), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object9)(), void *__anonymous_object10, void *__anonymous_object11), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object12)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object13, void *__anonymous_object14), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object15)(), void *__anonymous_object16, void *__anonymous_object17), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object18)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object19, void *__anonymous_object20), __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object21, void *__anonymous_object22), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object23), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object24, void *__anonymous_object25), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object26), __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object27, void *__anonymous_object28), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object29), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object30, void *__anonymous_object31), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object32), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object33), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object34), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object35, void *__anonymous_object36), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object37, void *__anonymous_object38), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object39), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void (*__func__PF_9telt_type__1)(void *__anonymous_object40));
    8 void __for_each_reverse__A2_0_0_0____operator_assign__PFt0_Rt0t0____constructor__PF_Rt0____constructor__PF_Rt0t0____destructor__PF_Rt0____operator_assign__PFt1_Rt1t1____constructor__PF_Rt1____constructor__PF_Rt1t1____destructor__PF_Rt1____operator_preincr__PFt0_Rt0____operator_predecr__PFt0_Rt0____operator_equal__PFi_t0t0____operator_notequal__PFi_t0t0____operator_deref__PFRt1_t0__F_t0t0PF_t1___1(__attribute__ ((unused)) void (*_adapterF_9telt_type__P)(void (*__anonymous_object41)(), void *__anonymous_object42), __attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object43)(), void *__anonymous_object44), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object45)(), void *__anonymous_object46, void *__anonymous_object47), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object48)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object49), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object50)(), void *__anonymous_object51, void *__anonymous_object52), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object53)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object54, void *__anonymous_object55), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object56)(), void *__anonymous_object57, void *__anonymous_object58), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object59)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object60, void *__anonymous_object61), __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object62, void *__anonymous_object63), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object64), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object65, void *__anonymous_object66), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object67), __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object68, void *__anonymous_object69), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object70), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object71, void *__anonymous_object72), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object73), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object74), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object75), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object76, void *__anonymous_object77), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object78, void *__anonymous_object79), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object80), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void (*__func__PF_9telt_type__1)(void *__anonymous_object81));
     7void __for_each__A0_2_0_0____operator_assign__PFd0_Rd0d0____constructor__PF_Rd0____constructor__PF_Rd0d0____destructor__PF_Rd0____operator_assign__PFd1_Rd1d1____constructor__PF_Rd1____constructor__PF_Rd1d1____destructor__PF_Rd1____operator_preincr__PFd0_Rd0____operator_predecr__PFd0_Rd0____operator_equal__PFi_d0d0____operator_notequal__PFi_d0d0____operator_deref__PFRd1_d0__F_d0d0PF_d1___1(__attribute__ ((unused)) void (*_adapterF_9telt_type__P)(void (*__anonymous_object0)(), void *__anonymous_object1), __attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object2)(), void *__anonymous_object3), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object4)(), void *__anonymous_object5, void *__anonymous_object6), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object7)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object8), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object9)(), void *__anonymous_object10, void *__anonymous_object11), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object12)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object13, void *__anonymous_object14), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object15)(), void *__anonymous_object16, void *__anonymous_object17), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object18)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object19, void *__anonymous_object20), __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object21, void *__anonymous_object22), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object23), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object24, void *__anonymous_object25), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object26), __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object27, void *__anonymous_object28), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object29), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object30, void *__anonymous_object31), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object32), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object33), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object34), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object35, void *__anonymous_object36), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object37, void *__anonymous_object38), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object39), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void (*__func__PF_9telt_type__1)(void *__anonymous_object40));
     8void __for_each_reverse__A0_2_0_0____operator_assign__PFd0_Rd0d0____constructor__PF_Rd0____constructor__PF_Rd0d0____destructor__PF_Rd0____operator_assign__PFd1_Rd1d1____constructor__PF_Rd1____constructor__PF_Rd1d1____destructor__PF_Rd1____operator_preincr__PFd0_Rd0____operator_predecr__PFd0_Rd0____operator_equal__PFi_d0d0____operator_notequal__PFi_d0d0____operator_deref__PFRd1_d0__F_d0d0PF_d1___1(__attribute__ ((unused)) void (*_adapterF_9telt_type__P)(void (*__anonymous_object41)(), void *__anonymous_object42), __attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object43)(), void *__anonymous_object44), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object45)(), void *__anonymous_object46, void *__anonymous_object47), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object48)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object49), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object50)(), void *__anonymous_object51, void *__anonymous_object52), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object53)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object54, void *__anonymous_object55), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object56)(), void *__anonymous_object57, void *__anonymous_object58), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object59)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object60, void *__anonymous_object61), __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object62, void *__anonymous_object63), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object64), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object65, void *__anonymous_object66), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object67), __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object68, void *__anonymous_object69), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object70), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object71, void *__anonymous_object72), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object73), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object74), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object75), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object76, void *__anonymous_object77), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object78, void *__anonymous_object79), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object80), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void (*__func__PF_9telt_type__1)(void *__anonymous_object81));
    99void *___operator_bitor__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0c__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object82), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object83), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object84, _Bool __anonymous_object85), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object86), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object87, const char *__anonymous_object88), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object89), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object90, _Bool __anonymous_object91), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object92), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object93), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object94), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object95), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object96), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object97, const char *__anonymous_object98), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object99), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object100, const char *__anonymous_object101), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object102), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object103), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object104, const char *__anonymous_object105, unsigned long int __anonymous_object106), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object107, const char *__fmt__PCc_1, ...), void *__anonymous_object108, char __anonymous_object109);
    1010void *___operator_bitor__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0Sc__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object110), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object111), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object112, _Bool __anonymous_object113), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object114), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object115, const char *__anonymous_object116), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object117), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object118, _Bool __anonymous_object119), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object120), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object121), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object122), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object123), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object124), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object125, const char *__anonymous_object126), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object127), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object128, const char *__anonymous_object129), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object130), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object131), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object132, const char *__anonymous_object133, unsigned long int __anonymous_object134), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object135, const char *__fmt__PCc_1, ...), void *__anonymous_object136, signed char __anonymous_object137);
     
    2929void *___operator_bitor__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0PCi__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object642), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object643), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object644, _Bool __anonymous_object645), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object646), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object647, const char *__anonymous_object648), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object649), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object650, _Bool __anonymous_object651), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object652), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object653), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object654), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object655), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object656), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object657, const char *__anonymous_object658), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object659), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object660, const char *__anonymous_object661), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object662), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object663), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object664, const char *__anonymous_object665, unsigned long int __anonymous_object666), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object667, const char *__fmt__PCc_1, ...), void *__anonymous_object668, const signed int *__anonymous_object669);
    3030void *___operator_bitor__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0PCv__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object670), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object671), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object672, _Bool __anonymous_object673), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object674), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object675, const char *__anonymous_object676), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object677), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object678, _Bool __anonymous_object679), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object680), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object681), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object682), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object683), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object684), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object685, const char *__anonymous_object686), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object687), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object688, const char *__anonymous_object689), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object690), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object691), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object692, const char *__anonymous_object693, unsigned long int __anonymous_object694), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object695, const char *__fmt__PCc_1, ...), void *__anonymous_object696, const void *__anonymous_object697);
    31 void *___operator_bitor__A1_1_0_1____operator_assign__PFt1_Rt1t1____constructor__PF_Rt1____constructor__PF_Rt1t1____destructor__PF_Rt1____operator_bitor__PFPd0_Pd0t1___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc____operator_bitor__PFPd0_Pd0tVARGS2__FPd0_Pd0t1tVARGS2__1(__attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype7tParams_M_MP)(void (*__anonymous_object698)(), void *__anonymous_object699, void *__anonymous_object700), __attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype2tT_M_MP)(void (*__anonymous_object701)(), void *__anonymous_object702, void *__anonymous_object703), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object704)(), void *__anonymous_object705, void *__anonymous_object706), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object707)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object708, void *__anonymous_object709), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object710, void *__anonymous_object711), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object712), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object713, void *__anonymous_object714), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object715), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype2tT__1)(void *__anonymous_object716, void *__anonymous_object717), __attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object718), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object719), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object720, _Bool __anonymous_object721), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object722), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object723, const char *__anonymous_object724), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object725), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object726, _Bool __anonymous_object727), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object728), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object729), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object730), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object731), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object732), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object733, const char *__anonymous_object734), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object735), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object736, const char *__anonymous_object737), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object738), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object739), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object740, const char *__anonymous_object741, unsigned long int __anonymous_object742), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object743, const char *__fmt__PCc_1, ...), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype7tParams__1)(void *__anonymous_object744, void *__anonymous_object745), void *__os__P7tostype_1, void *__arg__2tT_1, void *__rest__7tParams_1);
     31void *___operator_bitor__A0_2_0_1____operator_assign__PFd1_Rd1d1____constructor__PF_Rd1____constructor__PF_Rd1d1____destructor__PF_Rd1____operator_bitor__PFPd0_Pd0d1___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc____operator_bitor__PFPd0_Pd0tVARGS2__FPd0_Pd0d1tVARGS2__1(__attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype7tParams_M_MP)(void (*__anonymous_object698)(), void *__anonymous_object699, void *__anonymous_object700), __attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype2tT_M_MP)(void (*__anonymous_object701)(), void *__anonymous_object702, void *__anonymous_object703), __attribute__ ((unused)) void (*_adapterF_P2tT2tT__MP)(void (*__anonymous_object704)(), void *__anonymous_object705, void *__anonymous_object706), __attribute__ ((unused)) void (*_adapterF2tT_P2tT2tT_P_MP)(void (*__anonymous_object707)(), __attribute__ ((unused)) void *___retval__operator_assign__2tT_1, void *__anonymous_object708, void *__anonymous_object709), __attribute__ ((unused)) unsigned long int _sizeof_2tT, __attribute__ ((unused)) unsigned long int _alignof_2tT, __attribute__ ((unused)) unsigned long int _sizeof_7tParams, __attribute__ ((unused)) unsigned long int _alignof_7tParams, __attribute__ ((unused)) void *(*___operator_assign__PF2tT_R2tT2tT__1)(void *__anonymous_object710, void *__anonymous_object711), __attribute__ ((unused)) void (*___constructor__PF_R2tT__1)(void *__anonymous_object712), __attribute__ ((unused)) void (*___constructor__PF_R2tT2tT__1)(void *__anonymous_object713, void *__anonymous_object714), __attribute__ ((unused)) void (*___destructor__PF_R2tT__1)(void *__anonymous_object715), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype2tT__1)(void *__anonymous_object716, void *__anonymous_object717), __attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object718), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object719), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object720, _Bool __anonymous_object721), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object722), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object723, const char *__anonymous_object724), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object725), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object726, _Bool __anonymous_object727), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object728), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object729), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object730), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object731), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object732), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object733, const char *__anonymous_object734), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object735), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object736, const char *__anonymous_object737), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object738), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object739), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object740, const char *__anonymous_object741, unsigned long int __anonymous_object742), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object743, const char *__fmt__PCc_1, ...), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype7tParams__1)(void *__anonymous_object744, void *__anonymous_object745), void *__os__P7tostype_1, void *__arg__2tT_1, void *__rest__7tParams_1);
    3232void *___operator_bitor__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0PFPd0_Pd0___1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object746), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object747), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object748, _Bool __anonymous_object749), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object750), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object751, const char *__anonymous_object752), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object753), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object754, _Bool __anonymous_object755), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object756), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object757), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object758), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object759), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object760), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object761, const char *__anonymous_object762), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object763), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object764, const char *__anonymous_object765), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object766), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object767), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object768, const char *__anonymous_object769, unsigned long int __anonymous_object770), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object771, const char *__fmt__PCc_1, ...), void *__anonymous_object772, void *(*__anonymous_object773)(void *__anonymous_object774));
    3333void *__endl__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object775), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object776), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object777, _Bool __anonymous_object778), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object779), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object780, const char *__anonymous_object781), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object782), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object783, _Bool __anonymous_object784), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object785), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object786), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object787), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object788), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object789), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object790, const char *__anonymous_object791), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object792), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object793, const char *__anonymous_object794), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object795), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object796), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object797, const char *__anonymous_object798, unsigned long int __anonymous_object799), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object800, const char *__fmt__PCc_1, ...), void *__anonymous_object801);
     
    3838void *__sepDisable__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object910), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object911), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object912, _Bool __anonymous_object913), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object914), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object915, const char *__anonymous_object916), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object917), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object918, _Bool __anonymous_object919), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object920), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object921), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object922), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object923), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object924), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object925, const char *__anonymous_object926), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object927), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object928, const char *__anonymous_object929), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object930), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object931), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object932, const char *__anonymous_object933, unsigned long int __anonymous_object934), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object935, const char *__fmt__PCc_1, ...), void *__anonymous_object936);
    3939void *__sepEnable__A0_1_0_0___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc__FPd0_Pd0__1(__attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object937), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object938), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object939, _Bool __anonymous_object940), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object941), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object942, const char *__anonymous_object943), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object944), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object945, _Bool __anonymous_object946), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object947), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object948), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object949), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object950), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object951), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object952, const char *__anonymous_object953), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object954), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object955, const char *__anonymous_object956), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object957), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object958), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object959, const char *__anonymous_object960, unsigned long int __anonymous_object961), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object962, const char *__fmt__PCc_1, ...), void *__anonymous_object963);
    40 void __write__A2_1_0_0____operator_assign__PFt1_Rt1t1____constructor__PF_Rt1____constructor__PF_Rt1t1____destructor__PF_Rt1____operator_bitor__PFPd0_Pd0t1___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc____operator_assign__PFt2_Rt2t2____constructor__PF_Rt2____constructor__PF_Rt2t2____destructor__PF_Rt2____operator_preincr__PFt2_Rt2____operator_predecr__PFt2_Rt2____operator_equal__PFi_t2t2____operator_notequal__PFi_t2t2____operator_deref__PFRt1_t2__F_t2t2Pd0__1(__attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object964)(), void *__anonymous_object965), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object966)(), void *__anonymous_object967, void *__anonymous_object968), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object969)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object970), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object971)(), void *__anonymous_object972, void *__anonymous_object973), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object974)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object975, void *__anonymous_object976), __attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype9telt_type_M_MP)(void (*__anonymous_object977)(), void *__anonymous_object978, void *__anonymous_object979), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object980)(), void *__anonymous_object981, void *__anonymous_object982), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object983)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object984, void *__anonymous_object985), __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object986, void *__anonymous_object987), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object988), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object989, void *__anonymous_object990), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object991), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype9telt_type__1)(void *__anonymous_object992, void *__anonymous_object993), __attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object994), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object995), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object996, _Bool __anonymous_object997), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object998), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object999, const char *__anonymous_object1000), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object1001), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object1002, _Bool __anonymous_object1003), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object1004), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object1005), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object1006), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object1007), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object1008), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object1009, const char *__anonymous_object1010), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object1011), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object1012, const char *__anonymous_object1013), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object1014), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object1015), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object1016, const char *__anonymous_object1017, unsigned long int __anonymous_object1018), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object1019, const char *__fmt__PCc_1, ...), __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object1020, void *__anonymous_object1021), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object1022), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object1023, void *__anonymous_object1024), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object1025), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1026), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1027), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1028, void *__anonymous_object1029), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1030, void *__anonymous_object1031), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object1032), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void *__os__P7tostype_1);
    41 void __write_reverse__A2_1_0_0____operator_assign__PFt1_Rt1t1____constructor__PF_Rt1____constructor__PF_Rt1t1____destructor__PF_Rt1____operator_bitor__PFPd0_Pd0t1___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc____operator_assign__PFt2_Rt2t2____constructor__PF_Rt2____constructor__PF_Rt2t2____destructor__PF_Rt2____operator_preincr__PFt2_Rt2____operator_predecr__PFt2_Rt2____operator_equal__PFi_t2t2____operator_notequal__PFi_t2t2____operator_deref__PFRt1_t2__F_t2t2Pd0__1(__attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object1033)(), void *__anonymous_object1034), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object1035)(), void *__anonymous_object1036, void *__anonymous_object1037), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object1038)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object1039), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object1040)(), void *__anonymous_object1041, void *__anonymous_object1042), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object1043)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object1044, void *__anonymous_object1045), __attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype9telt_type_M_MP)(void (*__anonymous_object1046)(), void *__anonymous_object1047, void *__anonymous_object1048), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object1049)(), void *__anonymous_object1050, void *__anonymous_object1051), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object1052)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object1053, void *__anonymous_object1054), __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object1055, void *__anonymous_object1056), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object1057), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object1058, void *__anonymous_object1059), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object1060), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype9telt_type__1)(void *__anonymous_object1061, void *__anonymous_object1062), __attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object1063), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object1064), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object1065, _Bool __anonymous_object1066), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object1067), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object1068, const char *__anonymous_object1069), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object1070), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object1071, _Bool __anonymous_object1072), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object1073), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object1074), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object1075), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object1076), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object1077), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object1078, const char *__anonymous_object1079), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object1080), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object1081, const char *__anonymous_object1082), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object1083), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object1084), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object1085, const char *__anonymous_object1086, unsigned long int __anonymous_object1087), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object1088, const char *__fmt__PCc_1, ...), __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object1089, void *__anonymous_object1090), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object1091), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object1092, void *__anonymous_object1093), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object1094), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1095), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1096), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1097, void *__anonymous_object1098), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1099, void *__anonymous_object1100), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object1101), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void *__os__P7tostype_1);
     40void __write__A0_3_0_0____operator_assign__PFd1_Rd1d1____constructor__PF_Rd1____constructor__PF_Rd1d1____destructor__PF_Rd1____operator_bitor__PFPd0_Pd0d1___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc____operator_assign__PFd2_Rd2d2____constructor__PF_Rd2____constructor__PF_Rd2d2____destructor__PF_Rd2____operator_preincr__PFd2_Rd2____operator_predecr__PFd2_Rd2____operator_equal__PFi_d2d2____operator_notequal__PFi_d2d2____operator_deref__PFRd1_d2__F_d2d2Pd0__1(__attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object964)(), void *__anonymous_object965), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object966)(), void *__anonymous_object967, void *__anonymous_object968), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object969)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object970), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object971)(), void *__anonymous_object972, void *__anonymous_object973), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object974)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object975, void *__anonymous_object976), __attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype9telt_type_M_MP)(void (*__anonymous_object977)(), void *__anonymous_object978, void *__anonymous_object979), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object980)(), void *__anonymous_object981, void *__anonymous_object982), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object983)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object984, void *__anonymous_object985), __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object986, void *__anonymous_object987), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object988), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object989, void *__anonymous_object990), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object991), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype9telt_type__1)(void *__anonymous_object992, void *__anonymous_object993), __attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object994), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object995), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object996, _Bool __anonymous_object997), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object998), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object999, const char *__anonymous_object1000), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object1001), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object1002, _Bool __anonymous_object1003), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object1004), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object1005), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object1006), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object1007), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object1008), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object1009, const char *__anonymous_object1010), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object1011), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object1012, const char *__anonymous_object1013), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object1014), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object1015), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object1016, const char *__anonymous_object1017, unsigned long int __anonymous_object1018), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object1019, const char *__fmt__PCc_1, ...), __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object1020, void *__anonymous_object1021), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object1022), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object1023, void *__anonymous_object1024), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object1025), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1026), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1027), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1028, void *__anonymous_object1029), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1030, void *__anonymous_object1031), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object1032), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void *__os__P7tostype_1);
     41void __write_reverse__A0_3_0_0____operator_assign__PFd1_Rd1d1____constructor__PF_Rd1____constructor__PF_Rd1d1____destructor__PF_Rd1____operator_bitor__PFPd0_Pd0d1___sepPrt__PFb_Pd0___sepReset__PF_Pd0___sepReset__PF_Pd0b___sepGetCur__PFPCc_Pd0___sepSetCur__PF_Pd0PCc___getNL__PFb_Pd0___setNL__PF_Pd0b___sepOn__PF_Pd0___sepOff__PF_Pd0___sepDisable__PFb_Pd0___sepEnable__PFb_Pd0___sepGet__PFPCc_Pd0___sepSet__PF_Pd0PCc___sepGetTuple__PFPCc_Pd0___sepSetTuple__PF_Pd0PCc___fail__PFi_Pd0___flush__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___write__PFPd0_Pd0PCcUl___fmt__PFi_Pd0PCc____operator_assign__PFd2_Rd2d2____constructor__PF_Rd2____constructor__PF_Rd2d2____destructor__PF_Rd2____operator_preincr__PFd2_Rd2____operator_predecr__PFd2_Rd2____operator_equal__PFi_d2d2____operator_notequal__PFi_d2d2____operator_deref__PFRd1_d2__F_d2d2Pd0__1(__attribute__ ((unused)) void *(*_adapterFP9telt_type_14titerator_type_M_P)(void (*__anonymous_object1033)(), void *__anonymous_object1034), __attribute__ ((unused)) signed int (*_adapterFi_14titerator_type14titerator_type_M_PP)(void (*__anonymous_object1035)(), void *__anonymous_object1036, void *__anonymous_object1037), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type_P_M)(void (*__anonymous_object1038)(), __attribute__ ((unused)) void *___retval__operator_preincr__14titerator_type_1, void *__anonymous_object1039), __attribute__ ((unused)) void (*_adapterF_P14titerator_type14titerator_type__MP)(void (*__anonymous_object1040)(), void *__anonymous_object1041, void *__anonymous_object1042), __attribute__ ((unused)) void (*_adapterF14titerator_type_P14titerator_type14titerator_type_P_MP)(void (*__anonymous_object1043)(), __attribute__ ((unused)) void *___retval__operator_assign__14titerator_type_1, void *__anonymous_object1044, void *__anonymous_object1045), __attribute__ ((unused)) void *(*_adapterFP7tostype_P7tostype9telt_type_M_MP)(void (*__anonymous_object1046)(), void *__anonymous_object1047, void *__anonymous_object1048), __attribute__ ((unused)) void (*_adapterF_P9telt_type9telt_type__MP)(void (*__anonymous_object1049)(), void *__anonymous_object1050, void *__anonymous_object1051), __attribute__ ((unused)) void (*_adapterF9telt_type_P9telt_type9telt_type_P_MP)(void (*__anonymous_object1052)(), __attribute__ ((unused)) void *___retval__operator_assign__9telt_type_1, void *__anonymous_object1053, void *__anonymous_object1054), __attribute__ ((unused)) unsigned long int _sizeof_9telt_type, __attribute__ ((unused)) unsigned long int _alignof_9telt_type, __attribute__ ((unused)) unsigned long int _sizeof_14titerator_type, __attribute__ ((unused)) unsigned long int _alignof_14titerator_type, __attribute__ ((unused)) void *(*___operator_assign__PF9telt_type_R9telt_type9telt_type__1)(void *__anonymous_object1055, void *__anonymous_object1056), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type__1)(void *__anonymous_object1057), __attribute__ ((unused)) void (*___constructor__PF_R9telt_type9telt_type__1)(void *__anonymous_object1058, void *__anonymous_object1059), __attribute__ ((unused)) void (*___destructor__PF_R9telt_type__1)(void *__anonymous_object1060), __attribute__ ((unused)) void *(*___operator_bitor__PFP7tostype_P7tostype9telt_type__1)(void *__anonymous_object1061, void *__anonymous_object1062), __attribute__ ((unused)) _Bool (*__sepPrt__PFb_P7tostype__1)(void *__anonymous_object1063), __attribute__ ((unused)) void (*__sepReset__PF_P7tostype__1)(void *__anonymous_object1064), __attribute__ ((unused)) void (*__sepReset__PF_P7tostypeb__1)(void *__anonymous_object1065, _Bool __anonymous_object1066), __attribute__ ((unused)) const char *(*__sepGetCur__PFPCc_P7tostype__1)(void *__anonymous_object1067), __attribute__ ((unused)) void (*__sepSetCur__PF_P7tostypePCc__1)(void *__anonymous_object1068, const char *__anonymous_object1069), __attribute__ ((unused)) _Bool (*__getNL__PFb_P7tostype__1)(void *__anonymous_object1070), __attribute__ ((unused)) void (*__setNL__PF_P7tostypeb__1)(void *__anonymous_object1071, _Bool __anonymous_object1072), __attribute__ ((unused)) void (*__sepOn__PF_P7tostype__1)(void *__anonymous_object1073), __attribute__ ((unused)) void (*__sepOff__PF_P7tostype__1)(void *__anonymous_object1074), __attribute__ ((unused)) _Bool (*__sepDisable__PFb_P7tostype__1)(void *__anonymous_object1075), __attribute__ ((unused)) _Bool (*__sepEnable__PFb_P7tostype__1)(void *__anonymous_object1076), __attribute__ ((unused)) const char *(*__sepGet__PFPCc_P7tostype__1)(void *__anonymous_object1077), __attribute__ ((unused)) void (*__sepSet__PF_P7tostypePCc__1)(void *__anonymous_object1078, const char *__anonymous_object1079), __attribute__ ((unused)) const char *(*__sepGetTuple__PFPCc_P7tostype__1)(void *__anonymous_object1080), __attribute__ ((unused)) void (*__sepSetTuple__PF_P7tostypePCc__1)(void *__anonymous_object1081, const char *__anonymous_object1082), __attribute__ ((unused)) signed int (*__fail__PFi_P7tostype__1)(void *__anonymous_object1083), __attribute__ ((unused)) signed int (*__flush__PFi_P7tostype__1)(void *__anonymous_object1084), __attribute__ ((unused)) void (*__open__PF_P7tostypePCcPCc__1)(void *__os__P7tostype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tostype__1)(void *__os__P7tostype_1), __attribute__ ((unused)) void *(*__write__PFP7tostype_P7tostypePCcUl__1)(void *__anonymous_object1085, const char *__anonymous_object1086, unsigned long int __anonymous_object1087), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tostypePCc__1)(void *__anonymous_object1088, const char *__fmt__PCc_1, ...), __attribute__ ((unused)) void *(*___operator_assign__PF14titerator_type_R14titerator_type14titerator_type__1)(void *__anonymous_object1089, void *__anonymous_object1090), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type__1)(void *__anonymous_object1091), __attribute__ ((unused)) void (*___constructor__PF_R14titerator_type14titerator_type__1)(void *__anonymous_object1092, void *__anonymous_object1093), __attribute__ ((unused)) void (*___destructor__PF_R14titerator_type__1)(void *__anonymous_object1094), __attribute__ ((unused)) void *(*___operator_preincr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1095), __attribute__ ((unused)) void *(*___operator_predecr__PF14titerator_type_R14titerator_type__1)(void *__anonymous_object1096), __attribute__ ((unused)) signed int (*___operator_equal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1097, void *__anonymous_object1098), __attribute__ ((unused)) signed int (*___operator_notequal__PFi_14titerator_type14titerator_type__1)(void *__anonymous_object1099, void *__anonymous_object1100), __attribute__ ((unused)) void *(*___operator_deref__PFR9telt_type_14titerator_type__1)(void *__anonymous_object1101), void *__begin__14titerator_type_1, void *__end__14titerator_type_1, void *__os__P7tostype_1);
    4242void *___operator_bitor__A0_1_0_0___fail__PFi_Pd0___eof__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___read__PFPd0_Pd0PcUl___ungetc__PFPd0_Pd0c___fmt__PFi_Pd0PCc__FPd0_Pd0Rc__1(__attribute__ ((unused)) signed int (*__fail__PFi_P7tistype__1)(void *__anonymous_object1102), __attribute__ ((unused)) signed int (*__eof__PFi_P7tistype__1)(void *__anonymous_object1103), __attribute__ ((unused)) void (*__open__PF_P7tistypePCcPCc__1)(void *__is__P7tistype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tistype__1)(void *__is__P7tistype_1), __attribute__ ((unused)) void *(*__read__PFP7tistype_P7tistypePcUl__1)(void *__anonymous_object1104, char *__anonymous_object1105, unsigned long int __anonymous_object1106), __attribute__ ((unused)) void *(*__ungetc__PFP7tistype_P7tistypec__1)(void *__anonymous_object1107, char __anonymous_object1108), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tistypePCc__1)(void *__anonymous_object1109, const char *__fmt__PCc_1, ...), void *__anonymous_object1110, char *__anonymous_object1111);
    4343void *___operator_bitor__A0_1_0_0___fail__PFi_Pd0___eof__PFi_Pd0___open__PF_Pd0PCcPCc___close__PF_Pd0___read__PFPd0_Pd0PcUl___ungetc__PFPd0_Pd0c___fmt__PFi_Pd0PCc__FPd0_Pd0RSc__1(__attribute__ ((unused)) signed int (*__fail__PFi_P7tistype__1)(void *__anonymous_object1112), __attribute__ ((unused)) signed int (*__eof__PFi_P7tistype__1)(void *__anonymous_object1113), __attribute__ ((unused)) void (*__open__PF_P7tistypePCcPCc__1)(void *__is__P7tistype_1, const char *__name__PCc_1, const char *__mode__PCc_1), __attribute__ ((unused)) void (*__close__PF_P7tistype__1)(void *__is__P7tistype_1), __attribute__ ((unused)) void *(*__read__PFP7tistype_P7tistypePcUl__1)(void *__anonymous_object1114, char *__anonymous_object1115, unsigned long int __anonymous_object1116), __attribute__ ((unused)) void *(*__ungetc__PFP7tistype_P7tistypec__1)(void *__anonymous_object1117, char __anonymous_object1118), __attribute__ ((unused)) signed int (*__fmt__PFi_P7tistypePCc__1)(void *__anonymous_object1119, const char *__fmt__PCc_1, ...), void *__anonymous_object1120, signed char *__anonymous_object1121);
  • src/tests/Makefile.am

    r4ee1efb r136ccd7  
    107107
    108108declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@
    109         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     109        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    110110
    111111gccExtensions : gccExtensions.c @CFA_BINDIR@/@CFA_NAME@
    112         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     112        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    113113
    114114extension : extension.c @CFA_BINDIR@/@CFA_NAME@
    115         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     115        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    116116
    117117attributes : attributes.c @CFA_BINDIR@/@CFA_NAME@
    118         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     118        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    119119
    120120KRfunctions : KRfunctions.c @CFA_BINDIR@/@CFA_NAME@
    121         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     121        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    122122
    123123literals : literals.c @CFA_BINDIR@/@CFA_NAME@
    124         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     124        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    125125
    126126sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@
    127         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     127        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    128128
    129129gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@
  • src/tests/Makefile.in

    r4ee1efb r136ccd7  
    860860
    861861declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@
    862         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     862        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    863863
    864864gccExtensions : gccExtensions.c @CFA_BINDIR@/@CFA_NAME@
    865         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     865        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    866866
    867867extension : extension.c @CFA_BINDIR@/@CFA_NAME@
    868         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     868        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    869869
    870870attributes : attributes.c @CFA_BINDIR@/@CFA_NAME@
    871         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     871        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    872872
    873873KRfunctions : KRfunctions.c @CFA_BINDIR@/@CFA_NAME@
    874         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     874        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    875875
    876876literals : literals.c @CFA_BINDIR@/@CFA_NAME@
    877         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     877        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    878878
    879879sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@
    880         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p -XCFA -L ${<} -o ${@}
     880        ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    881881
    882882gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@
  • src/tests/boundedBuffer.c

    r4ee1efb r136ccd7  
     1//
     2// The contents of this file are covered under the licence agreement in the
     3// file "LICENCE" distributed with Cforall.
     4//
     5// boundedBuffer.c --
     6//
     7// Author           : Peter A. Buhr
     8// Created On       : Mon Oct 30 12:45:13 2017
     9// Last Modified By : Peter A. Buhr
     10// Last Modified On : Mon Oct 30 23:02:46 2017
     11// Update Count     : 9
     12//
     13
    114#include <stdlib>
    2 #include <fstream>
     15#include <fstream>                                                                              // random
    316#include <kernel>
    417#include <thread>
    5 #include <unistd.h>                                     // getpid
     18#include <unistd.h>                                                                             // getpid
    619
    720monitor Buffer {
    8     condition full, empty;
    9     int front, back, count;
    10     int elements[20];
     21        condition full, empty;
     22        int front, back, count;
     23        int elements[20];
    1124};
    1225
    1326void ?{}( Buffer & buffer ) {
    14     buffer.front = buffer.back = buffer.count = 0;
     27        buffer.front = buffer.back = buffer.count = 0;
    1528}
    1629
     
    1831
    1932void insert( Buffer & mutex buffer, int elem ) {
    20     if ( buffer.count == 20 ) wait( &buffer.empty );
    21     buffer.elements[buffer.back] = elem;
    22     buffer.back = ( buffer.back + 1 ) % 20;
    23     buffer.count += 1;
    24     signal( &buffer.full );
     33        if ( buffer.count == 20 ) wait( &buffer.empty );
     34        buffer.elements[buffer.back] = elem;
     35        buffer.back = ( buffer.back + 1 ) % 20;
     36        buffer.count += 1;
     37        signal( &buffer.full );
    2538}
    2639int remove( Buffer & mutex buffer ) {
    27     if ( buffer.count == 0 ) wait( &buffer.full );
    28     int elem = buffer.elements[buffer.front];
    29     buffer.front = ( buffer.front + 1 ) % 20;
    30     buffer.count -= 1;
    31     signal( &buffer.empty );
    32     return elem;
     40        if ( buffer.count == 0 ) wait( &buffer.full );
     41        int elem = buffer.elements[buffer.front];
     42        buffer.front = ( buffer.front + 1 ) % 20;
     43        buffer.count -= 1;
     44        signal( &buffer.empty );
     45        return elem;
    3346}
    3447
    3548thread Producer {
    36     Buffer * buffer;
    37     unsigned int N;
     49        Buffer & buffer;
     50        unsigned int N;
    3851};
    3952void main( Producer & prod ) {
    40     for ( int i = 1; i <= prod.N; i += 1 ) {
    41         yield( (unsigned int)rand48() % 5 );
    42         insert( *prod.buffer, 1 );
    43     } // for
    44     insert( *prod.buffer, -1 );
     53        for ( int i = 1; i <= prod.N; i += 1 ) {
     54                yield( random( 5 ) );
     55                insert( prod.buffer, 1 );
     56        } // for
     57        insert( prod.buffer, -1 );
    4558}
    4659void ?{}( Producer & prod, Buffer * buffer, unsigned int N ) {
    47     prod.buffer = buffer;
    48     prod.N = N;
    49 }
     60        &prod.buffer = buffer;
     61        prod.N = N;
     62                }
    5063
    5164thread Consumer {
    52     Buffer * buffer;
    53     int * sum;                                          // summation of producer values
     65        Buffer & buffer;
     66        int & sum;                                              // summation of producer values
    5467};
    5568void main( Consumer & cons ) {
    56     *cons.sum = 0;
    57     for ( ;; ) {
    58         yield( (unsigned int)rand48() % 5 );
    59         int item = remove( *cons.buffer );
    60       if ( item == -1 ) break;                          // sentinel ?
    61         *cons.sum += item;
    62     } // for
     69        cons.sum = 0;
     70        for ( ;; ) {
     71                yield( random( 5 ) );
     72                int item = remove( cons.buffer );
     73                if ( item == -1 ) break;                                // sentinel ?
     74                cons.sum += item;
     75        } // for
    6376}
    6477void ?{}( Consumer & cons, Buffer * buffer, int * sum ) {
    65     cons.buffer = buffer;
    66     cons.sum = sum;
     78        &cons.buffer = buffer;
     79        &cons.sum = sum;
    6780}
    6881
    6982int main() {
    70     Buffer buffer;
    71     enum { Prods = 5, Cons = 5 };
    72     Producer * prods[Prods];
    73     Consumer * cons[Cons];
    74     const int Sentinel = -1;
    75     int sums[Cons];
    76     int i;
    77     processor p;
     83        Buffer buffer;
     84        enum { Prods = 5, Cons = 5 };
     85        Producer * prods[Prods];
     86        Consumer * cons[Cons];
     87        const int Sentinel = -1;
     88        int sums[Cons];
     89        int i;
     90        processor p;
    7891
    79     //rand48seed( getpid() );
    80     rand48seed( 1003 );
     92        //random_seed( getpid() );
     93        random_seed( 1003 );
    8194
    82     for ( i = 0; i < Cons; i += 1 ) {                   // create consumers
    83         cons[i] = new( &buffer, &sums[i] );
    84     } // for
    85     for ( i = 0; i < Prods; i += 1 ) {                  // create producers
    86         prods[i] = new( &buffer, 100000u );
    87     } // for
     95        for ( i = 0; i < Cons; i += 1 ) {                       // create consumers
     96                cons[i] = new( &buffer, &sums[i] );
     97        } // for
     98        for ( i = 0; i < Prods; i += 1 ) {                      // create producers
     99                prods[i] = new( &buffer, 100000u );
     100        } // for
    88101
    89     for ( i = 0; i < Prods; i += 1 ) {                  // wait for producers to finish
    90         delete( prods[i] );
    91     } // for
    92     for ( i = 0; i < Cons; i += 1 ) {                   // generate sentinal values to stop consumers
    93         insert( buffer, Sentinel );
    94     } // for
    95     int sum = 0;
    96     for ( i = 0; i < Cons; i += 1 ) {                   // wait for consumers to finish
    97         delete( cons[i] );
    98         sum += sums[i];
    99     } // for
    100     sout | "total:" | sum | endl;
     102        for ( i = 0; i < Prods; i += 1 ) {                      // wait for producers to finish
     103                delete( prods[i] );
     104        } // for
     105        for ( i = 0; i < Cons; i += 1 ) {                       // generate sentinal values to stop consumers
     106                insert( buffer, Sentinel );
     107        } // for
     108        int sum = 0;
     109        for ( i = 0; i < Cons; i += 1 ) {                       // wait for consumers to finish
     110                delete( cons[i] );
     111                sum += sums[i];
     112        } // for
     113        sout | "total:" | sum | endl;
    101114}
     115
     116// Local Variables: //
     117// tab-width: 4 //
     118// compile-command: "cfa boundedBuffer.c" //
     119// End: //
  • src/tests/matrixSum.c

    r4ee1efb r136ccd7  
    1111// Created On       : Mon Oct  9 08:29:28 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Mon Oct  9 08:30:08 2017
    14 // Update Count     : 1
     13// Last Modified On : Sun Oct 29 21:08:48 2017
     14// Update Count     : 2
    1515//
    1616
     
    2020
    2121thread Adder {
    22     int * row, cols, * subtotal;                        // communication
     22    int * row, cols, * subtotal;                                                // communication
    2323};
    2424
     
    3232    *adder.subtotal = 0;
    3333    for ( int c = 0; c < adder.cols; c += 1 ) {
    34         *adder.subtotal += adder.row[c];
     34                *adder.subtotal += adder.row[c];
    3535    } // for
    3636}
     
    3939    const int rows = 10, cols = 1000;
    4040    int matrix[rows][cols], subtotals[rows], total = 0;
    41     processor p;                                        // extra kernel thread
     41    processor p;                                                                                // extra kernel thread
    4242
    4343    for ( int r = 0; r < rows; r += 1 ) {
    44         for ( int c = 0; c < cols; c += 1 ) {
    45             matrix[r][c] = 1;
    46         } // for
     44                for ( int c = 0; c < cols; c += 1 ) {
     45                        matrix[r][c] = 1;
     46                } // for
    4747    } // for
    4848    Adder * adders[rows];
    49     for ( int r = 0; r < rows; r += 1 ) {               // start threads to sum rows
    50         adders[r] = &(*malloc()){ matrix[r], cols, subtotals[r] };
    51 //      adders[r] = new( matrix[r], cols, &subtotals[r] );
     49    for ( int r = 0; r < rows; r += 1 ) {                               // start threads to sum rows
     50                adders[r] = &(*malloc()){ matrix[r], cols, subtotals[r] };
     51//              adders[r] = new( matrix[r], cols, &subtotals[r] );
    5252    } // for
    53     for ( int r = 0; r < rows; r += 1 ) {               // wait for threads to finish
    54         delete( adders[r] );
    55         total += subtotals[r];                          // total subtotals
     53    for ( int r = 0; r < rows; r += 1 ) {                               // wait for threads to finish
     54                delete( adders[r] );
     55                total += subtotals[r];                                                  // total subtotals
    5656    } // for
    5757    sout | total | endl;
  • src/tests/prodcons.c

    r4ee1efb r136ccd7  
    1010// Created On       : Mon Sep 18 12:23:39 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Sep 20 17:03:28 2017
    13 // Update Count     : 40
     12// Last Modified On : Mon Oct 30 23:06:05 2017
     13// Update Count     : 42
    1414//
    1515
    1616#include <fstream>
    1717#include <coroutine>
    18 #include <stdlib>                                                                               // rand48
     18#include <stdlib>                                                                               // random
    1919#include <unistd.h>                                                                             // getpid
    2020
     
    3030        // 1st resume starts here
    3131        for ( int i = 0; i < prod.N; i += 1 ) {
    32                 int p1 = (unsigned int)rand48() % 100;                  // non-negative
    33                 int p2 = (unsigned int)rand48() % 100;
     32                int p1 = random( 100 );
     33                int p2 = random( 100 );
    3434                sout | p1 | " " | p2 | endl;
    3535                int status = delivery( *prod.c, p1, p2 );
     
    9090        Prod prod;
    9191        Cons cons = { prod };
    92         rand48seed( /* getpid() */ 103 );                                       // fixed seed for testing
     92        random_seed( /* getpid() */ 103 );                                      // fixed seed for testing
    9393        start( prod, 5, cons );
    9494        sout | "main stops" | endl;
  • src/tests/random.c

    r4ee1efb r136ccd7  
    1010// Created On       : Tue Jul  5 21:29:30 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul  6 18:00:29 2016
    13 // Update Count     : 3
     12// Last Modified On : Mon Oct 30 23:06:49 2017
     13// Update Count     : 6
    1414//
    1515
     
    1919
    2020int main() {
    21         //rand48seed( getpid() );                                                               // set random seed
    22         rand48seed( 1003 );                                                                     // fixed seed for repeatable tests
     21        //srandom( getpid() );                                                          // set random seed
     22        random_seed( 1003 );                                                            // fixed seed for repeatable tests
    2323
    2424        // test polymorphic calls to random and stream
    25         char c = rand48();
     25        char c = random();
    2626        sout | c | endl;
    27         int i = rand48();
     27        int i = random();
    2828    sout | i | endl;
    29         unsigned int ui = rand48();
     29        unsigned int ui = random();
    3030    sout | ui | endl;
    31         long int li = rand48();
     31        long int li = random();
    3232    sout | li | endl;
    33         unsigned long int uli = rand48();
     33        unsigned long int uli = random();
    3434    sout | uli | endl;
    35     float f = rand48();
     35    float f = random();
    3636    sout | f | endl;
    37     double d = rand48();
     37    double d = random();
    3838    sout | d | endl;
    39     float _Complex fc = rand48();
     39    float _Complex fc = random();
    4040    sout | fc | endl;
    41     double _Complex dc = rand48();
     41    double _Complex dc = random();
    4242    sout | dc | endl;
    43     long double _Complex ldc = rand48();
     43    long double _Complex ldc = random();
    4444    sout | ldc | endl;
    4545} // main
  • src/tests/rational.c

    r4ee1efb r136ccd7  
    1010// Created On       : Mon Mar 28 08:43:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 23 21:40:11 2017
    13 // Update Count     : 66
     12// Last Modified On : Tue Oct 10 23:25:04 2017
     13// Update Count     : 67
    1414//
    1515
  • src/tests/sched-ext-barge.c

    r4ee1efb r136ccd7  
    4242void main( barger_t & this ) {
    4343        yield();
    44         while( barge( global ) ) { yield(((unsigned)rand48()) % 10); }
     44        while( barge( global ) ) { yield(random( 10 )); }
    4545}
    4646
    4747bool do_call( global_t & mutex this ) {
    48         yield(((unsigned)rand48()) % 10);
     48        yield(random( 10 ));
    4949        if( this.state != WAITFOR && !this.done && this.started ) {
    5050                serr | "Barging before caller detected" | endl;
     
    5757thread caller_t {};
    5858void main( caller_t & this ) {
    59         while( do_call(global) ) { yield(((unsigned)rand48()) % 10); }
     59        while( do_call(global) ) { yield(random( 10 )); }
    6060}
    6161
     
    6363        this.started = true;
    6464        for( int i = 0; i < N; i++) {
    65                 yield(((unsigned)rand48()) % 10);
     65                yield(random( 10 ));
    6666                this.state = WAITFOR;
    6767                waitfor(do_call, this) {
  • src/tests/sched-ext-dtor.c

    r4ee1efb r136ccd7  
    4545
    4646void main( dummy_t & this ) {
    47         yield(((unsigned)rand48()) % 10);
     47        yield(random( 10 ));
    4848        set_state( this, MAIN );
    4949        waitfor( ^?{}, this ) {
     
    5858        for( int i = 0; i < N; i++ ){
    5959                dummy_t dummy[4];
    60                 yield( ((unsigned)rand48()) % 100 );
     60                yield( random( 100 ) );
    6161        }
    6262        sout | "Stopping" | endl;
  • src/tests/sched-ext-recurse.c

    r4ee1efb r136ccd7  
    1515static const unsigned long N = 5_000ul;
    1616
    17 static inline void rand_yield() { yield(((unsigned)rand48()) % 10); }
     17static inline void rand_yield() { yield(random( 10 )); }
    1818
    1919enum state_t { FIRST, SECOND, THIRD, LAST, STOP };
     
    2323        for (i = 0; i < 4; i++)
    2424        {
    25                 int j = ((unsigned)rand48()) % 4;
     25                int j = random( 4 );
    2626                enum state_t t = array[j];
    2727                array[j] = array[i];
     
    131131
    132132int main() {
    133         rand48seed( time(NULL) );
     133        random_seed( time(NULL) );
    134134        sout | "Starting" | endl;
    135135        {
  • src/tests/sched-ext-when.c

    r4ee1efb r136ccd7  
    1515static const unsigned long N = 4_998ul;
    1616
    17 static inline void rand_yield() { yield(((unsigned)rand48()) % 10); }
     17static inline void rand_yield() { yield(random( 10 )); }
    1818
    1919monitor global_t {
     
    7777
    7878int main() {
    79         rand48seed( time(NULL) );
     79        random_seed( time(NULL) );
    8080        sout | "Starting" | endl;
    8181        {
  • src/tests/sched-ext.c

    r4ee1efb r136ccd7  
    2626volatile bool done;
    2727
    28 unsigned rand10() {
    29         return (unsigned)rand48() % 10;
    30 }
    31 
    3228//----------------------------------------------------------------------------------------------------
    3329// Acceptor
     
    3632void do_wait( global_t * mutex a ) {
    3733        sout | "Waiting to accept" | endl;
    38         yield( rand10() );
     34        yield( random( 10 ) );
    3935
    4036        sout | "Accepting" | endl;
     
    4844
    4945        sout | "Accepted" | endl;
    50         yield( rand10() );
     46        yield( random( 10 ) );
    5147}
    5248
     
    6864void main( Acceptee* this ) {
    6965        while( !done ) {
    70                 yield( rand10() );
     66                yield( random( 10 ) );
    7167                do_notify( &globalA );
    72                 yield( rand10() );
     68                yield( random( 10 ) );
    7369        }
    7470}
     
    7874int main(int argc, char* argv[]) {
    7975        done = false;
    80         rand48seed( time( NULL ) );
     76        random_seed( time( NULL ) );
    8177        printf("%p\n", &globalA);
    8278        sout | "Starting" | endl;
  • src/tests/sched-int-barge.c

    r4ee1efb r136ccd7  
    6464
    6565        if( action == 0 ) {
    66                 c.do_signal = max( ((unsigned)rand48()) % 10, 1);
    67                 c.do_wait1 = ((unsigned)rand48()) % (c.do_signal);
    68                 c.do_wait2 = ((unsigned)rand48()) % (c.do_signal);
     66                c.do_signal = max( random( 10 ), 1);
     67                c.do_wait1 = random( c.do_signal );
     68                c.do_wait2 = random( c.do_signal );
    6969
    7070                if(c.do_wait1 == c.do_wait2) sout | "Same" | endl;
     
    109109
    110110int main(int argc, char* argv[]) {
    111         rand48seed(0);
     111        random_seed(0);
    112112        processor p;
    113113        {
  • src/tests/sched-int-block.c

    r4ee1efb r136ccd7  
    4949        wait( &cond, (uintptr_t)this_thread );
    5050
    51         yield( ((unsigned)rand48()) % 10 );
     51        yield( random( 10 ) );
    5252
    5353        if(a.last_thread != a.last_signaller || b.last_thread != b.last_signaller ) {
     
    5858        a.last_thread = b.last_thread = this_thread;
    5959
    60         yield( ((unsigned)rand48()) % 10 );
     60        yield( random( 10 ) );
    6161}
    6262
     
    7070//------------------------------------------------------------------------------
    7171void signal_op( global_data_t & mutex a, global_data_t & mutex b ) {
    72         yield( ((unsigned)rand48()) % 10 );
     72        yield( random( 10 ) );
    7373
    7474        [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_thread;
     
    8383                }
    8484
    85                 yield( ((unsigned)rand48()) % 10 );
     85                yield( random( 10 ) );
    8686
    8787                if(a.last_thread != next || b.last_thread != next) {
     
    118118
    119119int main(int argc, char* argv[]) {
    120         rand48seed( time( NULL ) );
     120        random_seed( time( NULL ) );
    121121        done = false;
    122122        processor p;
  • src/tests/sched-int-disjoint.c

    r4ee1efb r136ccd7  
    8888        signal( &cond, a, data );
    8989
    90         yield( (unsigned)rand48() % 10 );
     90        yield( random( 10 ) );
    9191
    9292        //This is technically a mutual exclusion violation but the mutex monitor protects us
     
    109109// Main loop
    110110int main(int argc, char* argv[]) {
    111         rand48seed( time( NULL ) );
     111        random_seed( time( NULL ) );
    112112        all_done = false;
    113113        processor p;
  • src/tests/sched-int-wait.c

    r4ee1efb r136ccd7  
    6262
    6363        while( waiter_left != 0 ) {
    64                 unsigned action = (unsigned)rand48() % 4;
     64                unsigned action = random( 4 );
    6565                switch( action ) {
    6666                        case 0:
     
    127127// Main
    128128int main(int argc, char* argv[]) {
    129         rand48seed( time( NULL ) );
     129        random_seed( time( NULL ) );
    130130        waiter_left = 4;
    131131        processor p[2];
  • tools/stat.py

    r4ee1efb r136ccd7  
    1414                content.remove(max(content))
    1515                content.remove(min(content))
    16                 print "median {0} avg {1} stddev {2}".format( numpy.median(content), numpy.mean(content), numpy.std(content) )
     16                med = numpy.around( numpy.median(content), decimals=1)
     17                avg = numpy.around( numpy.mean  (content), decimals=2)
     18                std = numpy.around( numpy.std   (content), decimals=2)
     19                print "median {0} avg {1} stddev {2}".format( med, avg, std )
    1720
    1821
Note: See TracChangeset for help on using the changeset viewer.