Changeset 5e44ac2 for tests


Ignore:
Timestamp:
Aug 15, 2018, 1:58:02 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
90cac45
Parents:
d7d63e5 (diff), 7bd4cc9 (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 demangler

Location:
tests
Files:
3 added
283 moved

Legend:

Unmodified
Added
Removed
  • tests/.expect/attributes.x86.txt

    rd7d63e5 r5e44ac2  
    316316    ((void)sizeof(__attribute__ ((unused,unused)) signed int ));
    317317    ((void)sizeof(__attribute__ ((unused,unused,unused,unused)) signed int **));
    318     ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int [5]));
    319     ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int (*)[10]));
     318    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int [((unsigned int )5)]));
     319    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int (*)[((unsigned int )10)]));
    320320    ((void)sizeof(__attribute__ ((unused,unused,unused)) signed int ()));
    321321    struct __attribute__ ((unused)) __anonymous3 {
  • tests/.expect/io1.txt

    rd7d63e5 r5e44ac2  
    88
    99closing delimiters
    10 1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x
     101, x 2. x 3; x 4! x 5? x 6% x 7 ¢ x 8 » x 9) x 10] x 11} x
    1111
    1212opening/closing delimiters
  • tests/.expect/math1.txt

    rd7d63e5 r5e44ac2  
    99exp2:2 2 2
    1010expm1:1.71828 1.71828182845905 1.71828182845904524
    11 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i
     11pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i -0.638110484918098871+0.705394566961838155i
    1212\ 16 256
    1313\ 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
  • tests/.expect/time.txt

    rd7d63e5 r5e44ac2  
    1 10800 2 3.07 12 1.00001
    2 0 2 3.07
     110800 2 3.375 12 1.00001
     20 2 3.375
    337 7 7
    4414
  • tests/Makefile.am

    rd7d63e5 r5e44ac2  
    1515###############################################################################
    1616
     17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
    1718
    1819debug=yes
     20installed=no
    1921
    2022quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
    2123
    22 if BUILD_CONCURRENCY
    2324concurrent=
    24 else
    25 concurrent='-Econcurrent'
    26 endif
    2725
    2826TEST_PY = python ${srcdir}/test.py
     
    3432        -Wno-unused-function \
    3533        -quiet @CFA_FLAGS@ \
    36         -DIN_DIR="${srcdir}/.in/" \
    37         @BUILD_IN_TREE_FLAGS@
     34        -DIN_DIR="${srcdir}/.in/"
    3835
    39 if !BUILD_DEBUG
    40 AM_CFLAGS += -nodebug
    41 else
    42 if !BUILD_RELEASE
    43 AM_CFLAGS += -debug
    44 else
    45 AM_CFLAGS += ${DEBUG_FLAGS}
    46 endif
    47 endif
     36AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    4837
    4938CC = @CFACC@
    5039
    51 .PHONY : list
     40.PHONY: list .validate
     41.INTERMEDIATE: .validate .validate.c
    5242EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
    5343
     
    5646avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
    5747
     48#----------------------------------------------------------------------------------------------------------------
    5849all-local :
    59         @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}
     50        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${quick_test}
    6051
    6152all-tests :
    62         @+${TEST_PY} --all --debug=${debug} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     53        @+${TEST_PY} --all --debug=${debug}  --install=${installed} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6354
    6455clean-local :
     
    6859        @+${TEST_PY} --list ${concurrent}
    6960
     61.validate: .validate.c
     62        $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
     63
     64.validate.c:
     65        @echo "int main() { return 0; }" > ${@}
     66
    7067concurrency :
    71         @+${TEST_PY} --debug=${debug} -Iconcurrent
     68        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
    7269
    73 # SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
    74 # however, here it is more complicated because it must match the dependencies based on how
    75 # they are generated by gcc
    76 headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
    77 headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
    78 headers_deps = $(addprefix %/, $(headers_real))
    79 $(headers_deps) :
    80         echo "Dummy rule, should never be called"
    81 
    82 # %/stdlib:
    83 #       echo "Dummy rule, should never be called"
    84 
     70#----------------------------------------------------------------------------------------------------------------
    8571# implicit rule so not all test require a rule
    8672% : %.c $(CC)
  • tests/Makefile.in

    rd7d63e5 r5e44ac2  
    9191build_triplet = @build@
    9292host_triplet = @host@
    93 @BUILD_DEBUG_FALSE@am__append_1 = -nodebug
    94 @BUILD_DEBUG_TRUE@@BUILD_RELEASE_FALSE@am__append_2 = -debug
    95 @BUILD_DEBUG_TRUE@@BUILD_RELEASE_TRUE@am__append_3 = ${DEBUG_FLAGS}
    9693EXTRA_PROGRAMS = fstream_test$(EXEEXT) avl_test$(EXEEXT)
    97 subdir = src/tests
     94subdir = tests
    9895ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    99 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     96am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \
     97        $(top_srcdir)/configure.ac
    10098am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    10199        $(ACLOCAL_M4)
     
    182180BACKEND_CC = @BACKEND_CC@
    183181BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
    184 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
    185182CC = @CFACC@
    186183CCAS = @CCAS@
     
    213210EXEEXT = @EXEEXT@
    214211GREP = @GREP@
     212HOST_FLAGS = @HOST_FLAGS@
    215213INSTALL = @INSTALL@
    216214INSTALL_DATA = @INSTALL_DATA@
     
    222220LEXLIB = @LEXLIB@
    223221LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
     222LIBCFA_TARGET_DIRS = @LIBCFA_TARGET_DIRS@
     223LIBCFA_TARGET_MAKEFILES = @LIBCFA_TARGET_MAKEFILES@
    224224LIBOBJS = @LIBOBJS@
    225225LIBS = @LIBS@
    226226LTLIBOBJS = @LTLIBOBJS@
    227 MACHINE_TYPE = @MACHINE_TYPE@
    228227MAKEINFO = @MAKEINFO@
    229228MKDIR_P = @MKDIR_P@
     
    241240SHELL = @SHELL@
    242241STRIP = @STRIP@
     242TARGET_HOSTS = @TARGET_HOSTS@
    243243VERSION = @VERSION@
    244244YACC = @YACC@
     
    296296top_builddir = @top_builddir@
    297297top_srcdir = @top_srcdir@
     298AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
    298299debug = yes
     300installed = no
    299301quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
    300 @BUILD_CONCURRENCY_FALSE@concurrent = '-Econcurrent'
    301 @BUILD_CONCURRENCY_TRUE@concurrent =
     302concurrent =
    302303TEST_PY = python ${srcdir}/test.py
    303304
    304305# applies to both programs
    305306AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
    306         -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" \
    307         @BUILD_IN_TREE_FLAGS@ $(am__append_1) $(am__append_2) \
    308         $(am__append_3)
     307        -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" ${DEBUG_FLAGS} \
     308        ${INSTALL_FLAGS} ${ARCH_FLAGS}
    309309fstream_test_SOURCES = fstream_test.c
    310310avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
    311 
    312 # SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
    313 # however, here it is more complicated because it must match the dependencies based on how
    314 # they are generated by gcc
    315 headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
    316 headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
    317 headers_deps = $(addprefix %/, $(headers_real))
    318311all: all-am
    319312
    320313.SUFFIXES:
    321 .SUFFIXES: .c .o .obj
     314.SUFFIXES: .c .o .obj .validate
    322315$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
    323316        @for dep in $?; do \
     
    329322          esac; \
    330323        done; \
    331         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/Makefile'; \
     324        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
    332325        $(am__cd) $(top_srcdir) && \
    333           $(AUTOMAKE) --foreign src/tests/Makefile
     326          $(AUTOMAKE) --foreign tests/Makefile
    334327Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    335328        @case '$?' in \
     
    617610
    618611
    619 .PHONY : list
    620 
     612.PHONY: list .validate
     613.INTERMEDIATE: .validate .validate.c
     614
     615#----------------------------------------------------------------------------------------------------------------
    621616all-local :
    622         @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}
     617        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${quick_test}
    623618
    624619all-tests :
    625         @+${TEST_PY} --all --debug=${debug} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     620        @+${TEST_PY} --all --debug=${debug}  --install=${installed} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    626621
    627622clean-local :
     
    631626        @+${TEST_PY} --list ${concurrent}
    632627
     628.validate: .validate.c
     629        $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
     630
     631.validate.c:
     632        @echo "int main() { return 0; }" > ${@}
     633
    633634concurrency :
    634         @+${TEST_PY} --debug=${debug} -Iconcurrent
    635 $(headers_deps) :
    636         echo "Dummy rule, should never be called"
    637 
    638 # %/stdlib:
    639 #       echo "Dummy rule, should never be called"
    640 
     635        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
     636
     637#----------------------------------------------------------------------------------------------------------------
    641638# implicit rule so not all test require a rule
    642639% : %.c $(CC)
  • tests/abs.c

    rd7d63e5 r5e44ac2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // abs.c -- 
     7// abs.c --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // abs
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // abs
    1818
    1919int main( void ) {
  • tests/alloc.c

    rd7d63e5 r5e44ac2  
    1010// Created On       : Wed Feb  3 07:56:22 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 26 20:58:05 2018
    13 // Update Count     : 334
     12// Last Modified On : Thu Aug  9 06:21:35 2018
     13// Update Count     : 337
    1414//
    1515
     
    1818#include <stdint.h>                                                                             // uintptr_t
    1919#include <stdlib.h>                                                                             // posix_memalign
    20 #include <fstream>
    21 #include <stdlib>                                                                               // access C malloc, realloc
     20#include <fstream.hfa>
     21#include <stdlib.hfa>                                                                           // access C malloc, realloc
    2222
    2323int * foo( int * p, int c ) { return p; }
     
    6262        p = (int *)calloc( dim, sizeof( *p ) );                         // C array calloc, type unsafe
    6363        printf( "C   array calloc, fill 0\n" );
    64         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     64        for ( i; dim ) { printf( "%#x ", p[i] ); }
    6565        printf( "\n" );
    6666        free( p );
     
    6868        p = calloc( dim );                                  // CFA array calloc, type safe
    6969        printf( "CFA array calloc, fill 0\n" );
    70         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     70        for ( i; dim ) { printf( "%#x ", p[i] ); }
    7171        printf( "\n" );
    7272        free( p );
    7373
    7474        p = alloc( dim );                                   // CFA array alloc, type safe
    75         for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
     75        for ( i; dim ) { p[i] = 0xdeadbeef; }
    7676        printf( "CFA array alloc, no fill\n" );
    77         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     77        for ( i; dim ) { printf( "%#x ", p[i] ); }
    7878        printf( "\n" );
    7979        free( p );
     
    8181        p = alloc( 2 * dim, fill );                         // CFA array alloc, fill
    8282        printf( "CFA array alloc, fill %#hhx\n", fill );
    83         for ( int i = 0; i < 2 * dim; i += 1 ) { printf( "%#x ", p[i] ); }
     83        for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
    8484        printf( "\n" );
    8585        // do not free
     
    9090
    9191        p = (int *)realloc( p, dim * sizeof(*p) );                      // C realloc
    92         for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
     92        for ( i; dim ) { p[i] = 0xdeadbeef; }
    9393        printf( "C   realloc\n" );
    94         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     94        for ( i; dim ) { printf( "%#x ", p[i] ); }
    9595        printf( "\n" );
    9696
    9797        p = realloc( p, 2 * dim * sizeof(*p) );             // CFA realloc
    98         for ( int i = dim; i < 2 * dim; i += 1 ) { p[i] = 0x1010101; }
     98        for ( i; dim ~ 2 * dim ) { p[i] = 0x1010101; }
    9999        printf( "CFA realloc\n" );
    100         for ( int i = 0; i < 2 * dim; i += 1 ) { printf( "%#x ", p[i] ); }
     100        for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
    101101        printf( "\n" );
    102102        // do not free
     
    107107
    108108        p = alloc( p, dim );                                // CFA resize array alloc
    109         for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
     109        for ( i; dim ) { p[i] = 0xdeadbeef; }
    110110        printf( "CFA resize alloc\n" );
    111         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     111        for ( i; dim ) { printf( "%#x ", p[i] ); }
    112112        printf( "\n" );
    113113
    114114        p = alloc( p, 2 * dim );                            // CFA resize array alloc
    115         for ( int i = dim; i < 2 * dim; i += 1 ) { p[i] = 0x1010101; }
     115        for ( i; dim ~ 2 * dim ) { p[i] = 0x1010101; }
    116116        printf( "CFA resize array alloc\n" );
    117         for ( int i = 0; i < 2 * dim; i += 1 ) { printf( "%#x ", p[i] ); }
     117        for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
    118118        printf( "\n" );
    119119
    120120        p = alloc( p, dim );                                // CFA array alloc
    121121        printf( "CFA resize array alloc\n" );
    122         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     122        for ( i; dim ) { printf( "%#x ", p[i] ); }
    123123        printf( "\n" );
    124124
     
    128128        p = alloc( p, dim, fill );                          // CFA array alloc, fill
    129129        printf( "CFA resize array alloc, fill\n" );
    130         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
     130        for ( i; dim ) { printf( "%#x ", p[i] ); }
    131131        printf( "\n" );
    132132
    133133        p = alloc( p, 2 * dim, fill );                      // CFA array alloc, fill
    134134        printf( "CFA resize array alloc, fill\n" );
    135         for ( int i = 0; i < 2 * dim; i += 1 ) { printf( "%#x ", p[i] ); }
     135        for ( i; 2 * dim ) { printf( "%#x ", p[i] ); }
    136136        printf( "\n" );
    137137
    138138        p = alloc( p, dim, fill );                          // CFA array alloc, fill
    139139        printf( "CFA resize array alloc, fill\n" );
    140         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] );; }
     140        for ( i; dim ) { printf( "%#x ", p[i] );; }
    141141        printf( "\n" );
    142142        free( p );
     
    193193        stp = align_alloc( Alignment, dim );                // CFA array memalign
    194194        assert( (uintptr_t)stp % Alignment == 0 );
    195         for ( int i = 0; i < dim; i += 1 ) { stp[i] = (Struct){ 42, 42.5 }; }
     195        for ( i; dim ) { stp[i] = (Struct){ 42, 42.5 }; }
    196196        printf( "CFA array align_alloc\n" );
    197         for ( int i = 0; i < dim; i += 1 ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
     197        for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
    198198        printf( "\n" );
    199199        free( stp );
     
    202202        assert( (uintptr_t)stp % Alignment == 0 );
    203203        printf( "CFA array align_alloc, fill\n" );
    204         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x %a, ", stp[i].x, stp[i].y ); }
     204        for ( i; dim ) { printf( "%#x %a, ", stp[i].x, stp[i].y ); }
    205205        printf( "\n" );
    206206        free( stp );
     
    221221        amemset( sta, fill, dim );                                                      // CFA array memset, type safe
    222222        printf( "CFA array memset\n" );
    223         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x %a, ", sta[i].x, sta[i].y ); }
     223        for ( i; dim ) { printf( "%#x %a, ", sta[i].x, sta[i].y ); }
    224224        printf( "\n" );
    225225
    226226        amemcpy( sta1, sta, dim );                                                      // CFA array memcpy, type safe
    227227        printf( "CFA array memcpy\n" );
    228         for ( int i = 0; i < dim; i += 1 ) { printf( "%#x %a, ", sta1[i].x, sta1[i].y ); }
     228        for ( i; dim ) { printf( "%#x %a, ", sta1[i].x, sta1[i].y ); }
    229229        printf( "\n" );
    230230
     
    241241        stp = anew( dim, 42, 42.5 );
    242242        printf( "CFA array new initialize\n" );
    243         for ( int i = 0; i < dim; i += 1 ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
     243        for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); }
    244244        printf( "\n" );
    245245        stp1 = anew( dim, 42, 42.5 );
    246         for ( int i = 0; i < dim; i += 1 ) { printf( "%d %g, ", stp1[i].x, stp1[i].y ); }
     246        for ( i; dim ) { printf( "%d %g, ", stp1[i].x, stp1[i].y ); }
    247247        printf( "\n" );
    248248        adelete( dim, stp, dim, stp1 );
  • tests/ato.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // ato.c -- 
    8 // 
     6//
     7// ato.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Feb  4 08:10:57 2016
     
    1212// Last Modified On : Thu Nov 16 18:31:56 2017
    1313// Update Count     : 89
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // ato, strto
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // ato, strto
    1818
    1919int main( void ) {
  • tests/avltree/avl1.c

    rd7d63e5 r5e44ac2  
    11#include "avl.h"
    22// #include "cwrap.h"
    3 #include <stdlib>
     3#include <stdlib.hfa>
    44
    55forall(otype K | Comparable(K), otype V)
  • tests/avltree/avl3.c

    rd7d63e5 r5e44ac2  
    11#include "avl.h"
    22#include "avl-private.h"
    3 #include <stdlib>
     3#include <stdlib.hfa>
    44
    55// swaps the data within two tree nodes
  • tests/avltree/avl_test.c

    rd7d63e5 r5e44ac2  
    11#include "avl.h"
    22#include "avl-private.h"
    3 #include <stdlib>
     3#include <stdlib.hfa>
    44
    55extern "C" {
  • tests/complex.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // complex.c -- 
    8 // 
     6//
     7// complex.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed May 24 22:07:31 2017
     
    1212// Last Modified On : Wed May 24 22:08:01 2017
    1313// Update Count     : 1
    14 // 
     14//
    1515
    1616#include <stdio.h>
    1717#include <complex.h>
    1818#ifdef __CFA__
    19 #include <fstream>
     19#include <fstream.hfa>
    2020#endif // __CFA
    2121
  • tests/concurrent/coroutineYield.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <stdlib>
    4 #include <thread>
    5 #include <time>
     1#include <fstream.hfa>
     2#include <kernel.hfa>hfa>
     3#include <stdlib.hfa>
     4#include <thread.hfa>
     5#include <time.hfa>
    66
    77#define __kick_rate 150000ul
  • tests/concurrent/examples/boundedBufferEXT.c

    rd7d63e5 r5e44ac2  
    1212//
    1313
    14 #include <stdlib>                                                                               // random
    15 #include <fstream>
    16 #include <kernel>
    17 #include <thread>
     14#include <stdlib.hfa>                                                                           // random
     15#include <fstream.hfa>
     16#include <kernel.hfa>
     17#include <thread.hfa>
    1818#include <unistd.h>                                                                             // getpid
    1919
  • tests/concurrent/examples/boundedBufferINT.c

    rd7d63e5 r5e44ac2  
    1212//
    1313
    14 #include <stdlib>                                                                               // random
    15 #include <fstream>
    16 #include <kernel>
    17 #include <thread>
     14#include <stdlib.hfa>                                                                           // random
     15#include <fstream.hfa>
     16#include <kernel.hfa>
     17#include <thread.hfa>
    1818#include <unistd.h>                                                                             // getpid
    1919
  • tests/concurrent/examples/datingService.c

    rd7d63e5 r5e44ac2  
    1212//
    1313
    14 #include <stdlib>                                                                               // random
    15 #include <fstream>
    16 #include <kernel>
    17 #include <thread>
     14#include <stdlib.hfa>                                                                           // random
     15#include <fstream.hfa>
     16#include <kernel.hfa>
     17#include <thread.hfa>
    1818#include <unistd.h>                                                                             // getpid
    1919
  • tests/concurrent/examples/matrixSum.c

    rd7d63e5 r5e44ac2  
    1 //                               -*- Mode: C -*- 
    2 // 
     1//                               -*- Mode: C -*-
     2//
    33// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    44//
    55// The contents of this file are covered under the licence agreement in the
    66// file "LICENCE" distributed with Cforall.
    7 // 
    8 // matrixSum.c -- 
    9 // 
     7//
     8// matrixSum.c --
     9//
    1010// Author           : Peter A. Buhr
    1111// Created On       : Mon Oct  9 08:29:28 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Fri May 25 09:34:27 2018
    14 // Update Count     : 10
    15 // 
     13// Last Modified On : Thu Aug  9 09:17:30 2018
     14// Update Count     : 13
     15//
    1616
    17 #include <fstream>
    18 #include <kernel>
    19 #include <thread>
     17#include <fstream.hfa>
     18#include <kernel.hfa>
     19#include <thread.hfa>
    2020
    2121thread Adder {
     
    3030void main( Adder & adder ) with( adder ) {                              // thread starts here
    3131        subtotal = 0;
    32         for ( int c = 0; c < cols; c += 1 ) {
     32        for ( c; cols ) {
    3333                subtotal += row[c];
    3434        } // for
     
    3636
    3737int main() {
    38         const int rows = 10, cols = 1000;
     38        /* const */ int rows = 10, cols = 1000;
    3939        int matrix[rows][cols], subtotals[rows], total = 0;
    4040        processor p;                                                                            // add kernel thread
    4141
    42         for ( int r = 0; r < rows; r += 1 ) {
    43                 for ( int c = 0; c < cols; c += 1 ) {
     42        for ( r; rows ) {
     43                for ( c; cols ) {
    4444                        matrix[r][c] = 1;
    4545                } // for
    4646        } // for
    4747        Adder * adders[rows];
    48         for ( int r = 0; r < rows; r += 1 ) {                           // start threads to sum rows
     48        for ( r; rows ) {                                                                       // start threads to sum rows
    4949                adders[r] = &(*malloc()){ matrix[r], cols, subtotals[r] };
    5050//              adders[r] = new( matrix[r], cols, &subtotals[r] );
    5151        } // for
    52         for ( int r = 0; r < rows; r += 1 ) {                           // wait for threads to finish
     52        for ( r; rows ) {                                                                       // wait for threads to finish
    5353                delete( adders[r] );
    5454                total += subtotals[r];                                                  // total subtotals
  • tests/concurrent/examples/quickSort.c

    rd7d63e5 r5e44ac2  
    1313//
    1414
    15 #include <fstream>
    16 #include <stdlib>
    17 #include <kernel>
    18 #include <thread>
     15#include <fstream.hfa>
     16#include <stdlib.hfa>
     17#include <kernel.hfa>
     18#include <thread.hfa>
    1919#include <string.h>                                                                             // strcmp
    2020
  • tests/concurrent/monitor.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <monitor>
    4 #include <thread>
     1#include <fstream.hfa>
     2#include <kernel.hfa>
     3#include <monitor.hfa>
     4#include <thread.hfa>
    55
    66monitor global_t {
  • tests/concurrent/multi-monitor.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <monitor>
    4 #include <thread>
     1#include <fstream.hfa>
     2#include <kernel.hfa>
     3#include <monitor.hfa>
     4#include <thread.hfa>
    55
    66static int global12, global23, global13;
  • tests/concurrent/preempt.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
    44
    55#include "long_tests.h"
  • tests/concurrent/signal/block.c

    rd7d63e5 r5e44ac2  
    77
    88
    9 #include <fstream>
    10 #include <kernel>
    11 #include <monitor>
    12 #include <stdlib>
    13 #include <thread>
    14 #include <time>
     9#include <fstream.hfa>
     10#include <kernel.hfa>hfa>
     11#include <monitor.hfa>
     12#include <stdlib.hfa>
     13#include <thread.hfa>
     14#include <time.hfa>
    1515
    1616#include "long_tests.h"
  • tests/concurrent/signal/disjoint.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <monitor>
    4 #include <thread>
    5 #include <time>
     1#include <fstream.hfa>
     2#include <kernel.hfa>hfa>
     3#include <monitor.hfa>
     4#include <thread.hfa>
     5#include <time.hfa>
    66
    77#include "long_tests.h"
  • tests/concurrent/signal/wait.c

    rd7d63e5 r5e44ac2  
    55
    66
    7 #include <fstream>
    8 #include <kernel>
    9 #include <monitor>
    10 #include <stdlib>
    11 #include <thread>
    12 #include <time>
     7#include <fstream.hfa>
     8#include <kernel.hfa>hfa>
     9#include <monitor.hfa>
     10#include <stdlib.hfa>
     11#include <thread.hfa>
     12#include <time.hfa>
    1313
    1414#define __kick_rate 12000ul
  • tests/concurrent/thread.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <stdlib>
    4 #include <thread>
     1#include <fstream.hfa>
     2#include <kernel.hfa>
     3#include <stdlib.hfa>
     4#include <thread.hfa>
    55
    66thread First  { semaphore* lock; };
  • tests/concurrent/waitfor/barge.c

    rd7d63e5 r5e44ac2  
    66//---------------------------------------------------------
    77
    8 #include <fstream>
    9 #include <kernel>
    10 #include <monitor>
    11 #include <stdlib>
    12 #include <thread>
     8#include <fstream.hfa>
     9#include <kernel.hfa>
     10#include <monitor.hfa>
     11#include <stdlib.hfa>
     12#include <thread.hfa>
    1313
    1414#include <stdbool.h>
  • tests/concurrent/waitfor/dtor.c

    rd7d63e5 r5e44ac2  
    44//---------------------------------------------------------
    55
    6 #include <fstream>
    7 #include <kernel>
    8 #include <monitor>
    9 #include <stdlib>
    10 #include <thread>
     6#include <fstream.hfa>
     7#include <kernel.hfa>
     8#include <monitor.hfa>
     9#include <stdlib.hfa>
     10#include <thread.hfa>
    1111
    1212#include <stdbool.h>
  • tests/concurrent/waitfor/else.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <monitor>
     1#include <fstream.hfa>
     2#include <monitor.hfa>
    33
    44#include <stdbool.h>
  • tests/concurrent/waitfor/parse.c

    rd7d63e5 r5e44ac2  
    88//----------------------------------------------------------------------------------------
    99
    10 #include <monitor>
     10#include <monitor.hfa>
    1111
    1212monitor M {};
  • tests/concurrent/waitfor/recurse.c

    rd7d63e5 r5e44ac2  
    44//-----------------------------------------------------------------
    55
    6 #include <fstream>
    7 #include <kernel>
    8 #include <monitor>
    9 #include <stdlib>
    10 #include <thread>
     6#include <fstream.hfa>
     7#include <kernel.hfa>
     8#include <monitor.hfa>
     9#include <stdlib.hfa>
     10#include <thread.hfa>
    1111
    1212#include <stdbool.h>
  • tests/concurrent/waitfor/simple.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <monitor>
    4 #include <stdlib>
    5 #include <thread>
     1#include <fstream.hfa>
     2#include <kernel.hfa>
     3#include <monitor.hfa>
     4#include <stdlib.hfa>
     5#include <thread.hfa>
    66
    77#include <time.h>
  • tests/concurrent/waitfor/statment.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
    2 #include <kernel>
    3 #include <monitor>
    4 #include <thread>
     1#include <fstream.hfa>
     2#include <kernel.hfa>
     3#include <monitor.hfa>
     4#include <thread.hfa>
    55
    66#include <stdbool.h>
  • tests/concurrent/waitfor/when.c

    rd7d63e5 r5e44ac2  
    44//-----------------------------------------------------------------
    55
    6 #include <fstream>
    7 #include <kernel>
    8 #include <monitor>
    9 #include <stdlib>
    10 #include <thread>
     6#include <fstream.hfa>
     7#include <kernel.hfa>
     8#include <monitor.hfa>
     9#include <stdlib.hfa>
     10#include <thread.hfa>
    1111
    1212#include <stdbool.h>
  • tests/coroutine/.in/fmtLines.txt

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // fmtLines.cc -- 
    8 // 
     6//
     7// fmtLines.cc --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Sun Sep 17 21:56:15 2017
     
    1212// Last Modified On : Mon Sep 18 11:35:57 2017
    1313// Update Count     : 31
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <coroutine>
     16#include <fstream.hfa>
     17#include <coroutine.hfa>
    1818
    1919coroutine Format {
  • tests/coroutine/fibonacci.c

    rd7d63e5 r5e44ac2  
    1515//
    1616
    17 #include <fstream>
    18 #include <coroutine>
     17#include <fstream.hfa>
     18#include <coroutine.hfa>
    1919
    2020coroutine Fibonacci { int fn; };                                                // used for communication
  • tests/coroutine/fmtLines.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
     6//
    77// fmtLines.cc -- format characters into blocks of 4 and groups of 5 blocks per line
    8 // 
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Sun Sep 17 21:56:15 2017
     
    1212// Last Modified On : Tue May 15 12:25:33 2018
    1313// Update Count     : 42
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <coroutine>
     16#include <fstream.hfa>
     17#include <coroutine.hfa>
    1818
    1919coroutine Format {
  • tests/coroutine/pingpong.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // pingpong.c -- 
    8 // 
     6//
     7// pingpong.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Sep 20 11:55:23 2017
     
    1212// Last Modified On : Wed Sep 20 13:41:39 2017
    1313// Update Count     : 26
    14 // 
     14//
    1515
    16 #include <coroutine>
    17 #include <fstream>
     16#include <coroutine.hfa>
     17#include <fstream.hfa>
    1818
    1919coroutine PingPong {
  • tests/coroutine/prodcons.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // prodcons.c -- 
    8 // 
     6//
     7// prodcons.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Mon Sep 18 12:23:39 2017
     
    1212// Last Modified On : Tue Jan  2 12:17:01 2018
    1313// Update Count     : 47
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <coroutine>
    18 #include <stdlib>                                                                               // random
     16#include <fstream.hfa>
     17#include <coroutine.hfa>
     18#include <stdlib.hfa>                                                                           // random
    1919#include <unistd.h>                                                                             // getpid
    2020
  • tests/coroutine/runningTotal.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // runningTotal.c -- 
    8 // 
     6//
     7// runningTotal.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Dec  6 08:05:27 2017
     
    1212// Last Modified On : Wed Dec  6 08:09:24 2017
    1313// Update Count     : 2
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <coroutine>
     16#include <fstream.hfa>
     17#include <coroutine.hfa>
    1818
    1919coroutine RunTotal {                                                                    // input numbers and return running total
  • tests/div.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // div.c -- 
    8 // 
     6//
     7// div.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Aug  8 16:28:43 2017
     
    1212// Last Modified On : Thu Dec  7 09:06:52 2017
    1313// Update Count     : 18
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // div
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // div
    1818
    1919struct T { int i; };
  • tests/except-2.c

    rd7d63e5 r5e44ac2  
    22
    33
    4 #include <stdlib>
     4#include <stdlib.hfa>
    55#include "except-mac.h"
    66
  • tests/fstream_test.c

    rd7d63e5 r5e44ac2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // fstream_test.c -- 
     7// fstream_test.c --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818int main( void ) {
  • tests/function-operator.c

    rd7d63e5 r5e44ac2  
    1010// Created On       : Fri Aug 25 15:21:11 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Dec  7 12:42:26 2017
    13 // Update Count     : 6
     12// Last Modified On : Thu Aug  2 09:27:53 2018
     13// Update Count     : 8
    1414//
    1515
    16 #include <fstream>
    17 #include <stdlib>
     16#include <fstream.hfa>
     17#include <stdlib.hfa>
    1818
    1919#define length(array) (sizeof((array))/sizeof((array)[0]))
     
    9292void ?{}(ostream_iterator & iter, ofstream * out) {
    9393        iter.out = new(out);
    94                 }
     94}
    9595// no destructor, memory leak. This is necessary for this to work at the moment, since
    9696// *? requires its parameter by value and returns a reference.
     
    168168        transform(begin(x), end(x), begin(x), &times2);
    169169        copy(begin(x), end(x), out_iter);
     170
     171        // REMOVE WHEN ?* PROBLEM FIXED.
     172        delete(out_iter.out);
    170173}
    171174
  • tests/genericUnion.c

    rd7d63e5 r5e44ac2  
    1 #include <limits>
     1#include <limits.hfa>
    22
    33forall(otype T)
  • tests/gmp.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // gmp.c -- 
    8 // 
     6//
     7// gmp.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Apr 19 08:55:51 2016
     
    1212// Last Modified On : Thu Sep 28 18:33:51 2017
    1313// Update Count     : 555
    14 // 
     14//
    1515
    1616// NOTE: UBUNTU DOES NOT SUPPORT GMP MULTILIB, SO ONLY 64-BIT GMP IS TESTED.
    1717
    18 #include <gmp>
     18#include <gmp.hfa>
    1919
    2020int main( void ) {
  • tests/heap.c

    rd7d63e5 r5e44ac2  
    1 #include <thread>
    2 #include <kernel>                                                                               // processor
    3 #include <stdlib>                                                                               // *allocs
     1#include <thread.hfa>
     2#include <kernel.hfa>                                                                           // processor
     3#include <stdlib.hfa>                                                                           // *allocs
    44#include <malloc.h>                                                                             // malloc_*
    55
    6 // #include <time>
     6// #include <time.hfa>
    77// #define __CFA_DEFAULT_PREEMPTION__ 1000`us
    88// //#define __CFA_DEFAULT_PREEMPTION__ 0
  • tests/hello.c

    rd7d63e5 r5e44ac2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // hello.c -- 
     7// hello.c --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818int main() {
  • tests/identity.c

    rd7d63e5 r5e44ac2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // identity.c -- 
     7// identity.c --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818forall( otype T )
  • tests/ifwhileCtl.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818int f( int r ) { return r; }
  • tests/io1.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // io1.c -- 
    8 // 
     6//
     7// io1.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Mar  2 16:56:02 2016
     
    1212// Last Modified On : Thu May 24 21:17:56 2018
    1313// Update Count     : 104
    14 // 
     14//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818int main() {
  • tests/io2.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818 #define xstr(s) str(s)
  • tests/limits.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <limits>
     16#include <limits.hfa>
    1717
    1818// Integral Constants
  • tests/literals.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // literals.c -- 
    8 // 
     6//
     7// literals.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Sat Sep  9 16:34:38 2017
     
    1212// Last Modified On : Sun Jul  1 15:12:15 2018
    1313// Update Count     : 137
    14 // 
     14//
    1515
    1616#ifdef __CFA__
    1717#include <stdint.h>
    18 #include <fstream>
     18#include <fstream.hfa>
    1919
    2020void f( char v ) { sout | "char " | v | endl; }
     
    221221        -0123456789.0123456789E+09L32;  -0123456789.0123456789E+09L64;  -0123456789.0123456789E+09L80;  -0123456789.0123456789E+09L128;
    222222         0123456789.0123456789E-09L32;   0123456789.0123456789E-09L64;   0123456789.0123456789E-09L80;   0123456789.0123456789E-09L128;
    223        
     223
    224224         0x0123456789.p09l32;   0x0123456789.p09l64;   0x0123456789.p09l80;   0x0123456789.p09l128;
    225225        +0x0123456789.p09l32;  +0x0123456789.p09l64;  +0x0123456789.p09l80;  +0x0123456789.p09l128;
  • tests/math1.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // math1.c -- 
    8 // 
     6//
     7// math1.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Fri Apr 22 14:59:21 2016
     
    1212// Last Modified On : Thu May 24 21:01:15 2018
    1313// Update Count     : 85
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <math>
     16#include <fstream.hfa>
     17#include <math.hfa>
    1818
    1919int main( void ) {
     
    4141        sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl;
    4242        sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl;
    43         sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl;
     43        sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.5DL+1.5LI, 1.5DL+1.5LI ) | endl;
    4444
    4545        int b = 4;
  • tests/math2.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // math2.c -- 
    8 // 
     6//
     7// math2.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Fri Apr 22 14:59:21 2016
     
    1212// Last Modified On : Thu May 24 21:06:10 2018
    1313// Update Count     : 82
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <math>
     16#include <fstream.hfa>
     17#include <math.hfa>
    1818
    1919int main( void ) {
  • tests/math3.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // math3.c -- 
    8 // 
     6//
     7// math3.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Fri Apr 22 14:59:21 2016
     
    1212// Last Modified On : Thu May 24 21:06:12 2018
    1313// Update Count     : 82
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <math>
     16#include <fstream.hfa>
     17#include <math.hfa>
    1818
    1919int main( void ) {
  • tests/math4.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // math4.c -- 
    8 // 
     6//
     7// math4.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu May 24 20:56:54 2018
     
    1212// Last Modified On : Thu May 24 20:58:06 2018
    1313// Update Count     : 2
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <math>
     16#include <fstream.hfa>
     17#include <math.hfa>
    1818
    1919int main( void ) {
  • tests/maybe.c

    rd7d63e5 r5e44ac2  
    1515
    1616#include <assert.h>
    17 #include <containers/maybe>
     17#include <containers/maybe.hfa>
    1818
    1919void checkPredicates() {
  • tests/minmax.c

    rd7d63e5 r5e44ac2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // minmax.c -- 
     7// minmax.c --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // min, max
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // min, max
    1818
    1919int main( void ) {
  • tests/preempt_longrun/Makefile.am

    rd7d63e5 r5e44ac2  
    1414## Update Count     : 0
    1515###############################################################################
     16
     17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
    1618
    1719repeats=10
  • tests/preempt_longrun/Makefile.in

    rd7d63e5 r5e44ac2  
    9191build_triplet = @build@
    9292host_triplet = @host@
    93 subdir = src/tests/preempt_longrun
     93subdir = tests/preempt_longrun
    9494ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    95 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     95am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \
     96        $(top_srcdir)/configure.ac
    9697am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    9798        $(ACLOCAL_M4)
     
    338339BACKEND_CC = @BACKEND_CC@
    339340BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
    340 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
    341341CC = @CFACC@
    342342CCAS = @CCAS@
     
    369369EXEEXT = @EXEEXT@
    370370GREP = @GREP@
     371HOST_FLAGS = @HOST_FLAGS@
    371372INSTALL = @INSTALL@
    372373INSTALL_DATA = @INSTALL_DATA@
     
    378379LEXLIB = @LEXLIB@
    379380LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
     381LIBCFA_TARGET_DIRS = @LIBCFA_TARGET_DIRS@
     382LIBCFA_TARGET_MAKEFILES = @LIBCFA_TARGET_MAKEFILES@
    380383LIBOBJS = @LIBOBJS@
    381384LIBS = @LIBS@
    382385LTLIBOBJS = @LTLIBOBJS@
    383 MACHINE_TYPE = @MACHINE_TYPE@
    384386MAKEINFO = @MAKEINFO@
    385387MKDIR_P = @MKDIR_P@
     
    397399SHELL = @SHELL@
    398400STRIP = @STRIP@
     401TARGET_HOSTS = @TARGET_HOSTS@
    399402VERSION = @VERSION@
    400403YACC = @YACC@
     
    452455top_builddir = @top_builddir@
    453456top_srcdir = @top_srcdir@
     457AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
    454458repeats = 10
    455459max_time = 600
     
    479483          esac; \
    480484        done; \
    481         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/tests/preempt_longrun/Makefile'; \
     485        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/preempt_longrun/Makefile'; \
    482486        $(am__cd) $(top_srcdir) && \
    483           $(AUTOMAKE) --foreign src/tests/preempt_longrun/Makefile
     487          $(AUTOMAKE) --foreign tests/preempt_longrun/Makefile
    484488Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    485489        @case '$?' in \
  • tests/preempt_longrun/create.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
    44
    55#include "long_tests.h"
  • tests/preempt_longrun/enter.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <monitor>
    3 #include <thread>
    4 #include <time>
     1#include <kernel.hfa>
     2#include <monitor.hfa>
     3#include <thread.hfa>
     4#include <time.hfa>
    55
    66#define __kick_rate 75000ul
  • tests/preempt_longrun/enter3.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <monitor>
    3 #include <thread>
    4 #include <time>
     1#include <kernel.hfa>
     2#include <monitor.hfa>
     3#include <thread.hfa>
     4#include <time.hfa>
    55
    66#define __kick_rate 75000ul
  • tests/preempt_longrun/processor.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
    44
    55#include <unistd.h>
  • tests/preempt_longrun/stack.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <math>
    3 #include <thread>
    4 #include <time>
     1#include <kernel.hfa>
     2#include <math.hfa>
     3#include <thread.hfa>
     4#include <time.hfa>
    55
    66#define __kick_rate 5000000ul
  • tests/preempt_longrun/yield.c

    rd7d63e5 r5e44ac2  
    1 #include <kernel>
    2 #include <thread>
    3 #include <time>
     1#include <kernel.hfa>
     2#include <thread.hfa>
     3#include <time.hfa>
    44
    55#define __kick_rate 550000ul
  • tests/pybin/tools.py

    rd7d63e5 r5e44ac2  
    3636
    3737def is_ascii(fname):
     38        if settings.dry_run:
     39                print("is_ascii: %s" % fname)
     40                return True
     41
    3842        if not os.path.isfile(fname):
    3943                return False
     
    5256# Remove 1 or more files silently
    5357def rm( files ):
    54         try:
     58        if isinstance( files, basestring ):
     59                sh("rm -f %s > /dev/null 2>&1" % files )
     60        else:
    5561                for file in files:
    5662                        sh("rm -f %s > /dev/null 2>&1" % file )
    57         except TypeError:
    58                 sh("rm -f %s > /dev/null 2>&1" % files )
    5963
    6064# Create 1 or more directory
    6165def mkdir( files ):
    62         try:
     66        if isinstance( files, basestring ):
     67                sh("mkdir -p %s" % os.path.dirname(files) )
     68        else:
    6369                for file in files:
    6470                        sh("mkdir -p %s" % os.path.dirname(file) )
    65         except TypeError:
    66                 sh("mkdir -p %s" % os.path.dirname(files) )
     71
    6772
    6873def chdir( dest = __main__.__file__ ):
     
    7479def diff( lhs, rhs ):
    7580        # diff the output of the files
    76         diff_cmd = ("diff --ignore-all-space "
     81        diff_cmd = ("diff --ignore-all-space --text "
    7782                                "--ignore-blank-lines "
    7883                                "--old-group-format='\t\tmissing lines :\n"
     
    100105                '-s' if silent else '',
    101106                test_param,
     107                settings.arch.flags,
    102108                settings.debug.flags,
     109                settings.install.flags,
    103110                flags,
    104111                target,
     
    129136# helper function to replace patterns in a file
    130137def file_replace(fname, pat, s_after):
     138        if settings.dry_run:
     139                print("replacing '%s' with '%s' in %s" % (pat, s_after, fname))
     140                return
     141
    131142        file = fileinput.FileInput(fname, inplace=True, backup='.bak')
    132143        for line in file:
  • tests/quoted_keyword.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818struct {
  • tests/raii/.expect/dtor-early-exit-ERR1.txt

    rd7d63e5 r5e44ac2  
    1 raii/dtor-early-exit.c:153:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)
     1raii/dtor-early-exit.c:150:1 error: jump to label 'L1' crosses initialization of y Branch (Goto)
    22  with target: L1
    33  with original target: L1
  • tests/raii/.expect/dtor-early-exit-ERR2.txt

    rd7d63e5 r5e44ac2  
    1 raii/dtor-early-exit.c:217:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)
     1raii/dtor-early-exit.c:214:1 error: jump to label 'L2' crosses initialization of y Branch (Goto)
    22  with target: L2
    33  with original target: L2
  • tests/raii/dtor-early-exit.c

    rd7d63e5 r5e44ac2  
    1010// Created On       : Wed Aug 17 08:26:25 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 17 08:29:37 2016
    13 // Update Count     : 2
    14 //
    15 
    16 #include <fstream>
    17 #include <stdlib>
    18 extern "C" {
    19 #define false ((int)0)  // until stdbool.h works
    20 #define assert(cond) if (! (cond)) { sout | "Assertion failed: (" | #cond | ") at " __FILE__ | ":" | __LINE__ | endl; abort(); }
    21 }
     12// Last Modified On : Sat Aug 11 07:58:39 2018
     13// Update Count     : 8
     14//
     15
     16#include <fstream.hfa>
     17#include <stdlib.hfa>
     18#include <assert.h>
    2219
    2320struct A {
  • tests/raii/globals.c

    rd7d63e5 r5e44ac2  
    1 #include <fstream>
     1#include <fstream.hfa>
    22
    33struct value_t {
  • tests/random.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // random.c -- 
    8 // 
     6//
     7// random.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Jul  5 21:29:30 2016
     
    1212// Last Modified On : Tue Jan  2 12:19:34 2018
    1313// Update Count     : 19
    14 // 
     14//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // random
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // random
    1818#include <unistd.h>                                                                             // getpid
    1919
  • tests/rational.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <rational>
    17 #include <limits>
    18 #include <stdlib>
    19 #include <fstream>
     16#include <rational.hfa>
     17#include <limits.hfa>
     18#include <stdlib.hfa>
     19#include <fstream.hfa>
    2020
    2121// UNNECESSARY, FIX ME
  • tests/result.c

    rd7d63e5 r5e44ac2  
    1515
    1616#include <assert.h>
    17 #include <containers/result>
     17#include <containers/result.hfa>
    1818
    1919void checkPredicates() {
  • tests/searchsort.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // searchsort.c -- 
    8 // 
     6//
     7// searchsort.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Feb  4 18:17:50 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jan  2 08:01:17 2018
    13 // Update Count     : 100
    14 // 
     12// Last Modified On : Thu Aug  9 07:54:57 2018
     13// Update Count     : 101
     14//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // bsearch, qsort
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // bsearch, qsort
    1818#include <stdlib.h>                                                                             // C version of bsearch
    1919
     
    2424        int iarr[size];
    2525
    26         for ( unsigned int i = 0; i < size; i += 1 ) {
     26        for ( i; 0u ~ size ) {
    2727                iarr[i] = size - i;
    2828                sout | iarr[i] | ", ";
     
    3232        // ascending sort/search by changing < to >
    3333        qsort( iarr, size );
    34         for ( unsigned int i = 0; i < size; i += 1 ) {
     34        for ( i; 0u ~ size ) {
    3535                sout | iarr[i] | ", ";
    3636        } // for
    3737        sout | endl;
    38         for ( unsigned int i = 0; i < size; i += 1 ) {          // C version
     38        for ( i; 0u ~ size ) {          // C version
    3939                int key = size - i;
    4040                int * v = bsearch( &key, iarr, size, sizeof( iarr[0] ), comp );
     
    4343        sout | endl;
    4444
    45         for ( unsigned int i = 0; i < size; i += 1 ) {
     45        for ( i; 0u ~ size ) {
    4646                int * v = bsearch( size - i, iarr, size );
    4747                sout | size - i | ':' | *v | ", ";
    4848        } // for
    4949        sout | endl;
    50         for ( unsigned int i = 0; i < size; i += 1 ) {
     50        for ( i; 0u ~ size ) {
    5151                unsigned int posn = bsearch( size - i, iarr, size );
    5252                sout | size - i | ':' | iarr[posn] | ", ";
     
    5555
    5656        // descending sort/search by changing < to >
    57         for ( unsigned int i = 0; i < size; i += 1 ) {
     57        for ( i; 0u ~ size ) {
    5858                iarr[i] = i + 1;
    5959                sout | iarr[i] | ", ";
     
    6363                int ?<?( int x, int y ) { return x > y; }
    6464                qsort( iarr, size );
    65                 for ( unsigned int i = 0; i < size; i += 1 ) {
     65                for ( i; 0u ~ size ) {
    6666                        sout | iarr[i] | ", ";
    6767                } // for
    6868                sout | endl;
    69                 for ( unsigned int i = 0; i < size; i += 1 ) {
     69                for ( i; 0u ~ size ) {
    7070                        int * v = bsearch( size - i, iarr, size );
    7171                        sout | size - i | ':' | *v | ", ";
    7272                } // for
    7373                sout | endl;
    74                 for ( unsigned int i = 0; i < size; i += 1 ) {
     74                for ( i; 0u ~ size ) {
    7575                        unsigned int posn = bsearch( size - i, iarr, size );
    7676                        sout | size - i | ':' | iarr[posn] | ", ";
     
    8080
    8181        double darr[size];
    82         for ( unsigned int i = 0; i < size; i += 1 ) {
     82        for ( i; 0u ~ size ) {
    8383                darr[i] = size - i + 0.5;
    8484                sout | darr[i] | ", ";
     
    8686        sout | endl;
    8787        qsort( darr, size );
    88         for ( unsigned int i = 0; i < size; i += 1 ) {
     88        for ( i; 0u ~ size ) {
    8989                sout | darr[i] | ", ";
    9090        } // for
    9191        sout | endl;
    92         for ( unsigned int i = 0; i < size; i += 1 ) {
     92        for ( i; 0u ~ size ) {
    9393                double * v = bsearch( size - i + 0.5, darr, size );
    9494                sout | size - i + 0.5 | ':' | *v | ", ";
    9595        } // for
    9696        sout | endl;
    97         for ( unsigned int i = 0; i < size; i += 1 ) {
     97        for ( i; 0u ~ size ) {
    9898                unsigned int posn = bsearch( size - i + 0.5, darr, size );
    9999                sout | size - i + 0.5 | ':' | darr[posn] | ", ";
     
    104104        int ?<?( S t1, S t2 ) { return t1.i < t2.i && t1.j < t2.j; }
    105105        ofstream & ?|?( ofstream & os, S v ) { return os | v.i | ' ' | v.j; }
    106         for ( unsigned int i = 0; i < size; i += 1 ) {
     106        for ( i; 0u ~ size ) {
    107107                sarr[i].i = size - i;
    108108                sarr[i].j = size - i + 1;
     
    111111        sout | endl;
    112112        qsort( sarr, size );
    113         for ( unsigned int i = 0; i < size; i += 1 ) {
     113        for ( i; 0u ~ size ) {
    114114                sout | sarr[i] | ", ";
    115115        } // for
    116116        sout | endl;
    117         for ( unsigned int i = 0; i < size; i += 1 ) {
     117        for ( i; 0u ~ size ) {
    118118                S temp = { size - i, size - i + 1 };
    119119                S * v = bsearch( temp, sarr, size );
     
    121121        } // for
    122122        sout | endl;
    123         for ( unsigned int i = 0; i < size; i += 1 ) {
     123        for ( i; 0u ~ size ) {
    124124                S temp = { size - i, size - i + 1 };
    125125                unsigned int posn = bsearch( temp, sarr, size );
     
    129129        {
    130130                unsigned int getKey( const S & s ) { return s.j; }
    131                 for ( unsigned int i = 0; i < size; i += 1 ) {
     131                for ( i; 0u ~ size ) {
    132132                        sout | sarr[i] | ", ";
    133133                } // for
    134134                sout | endl;
    135                 for ( unsigned int i = 0; i < size; i += 1 ) {
     135                for ( i; 0u ~ size ) {
    136136                        S * v = bsearch( size - i + 1, sarr, size );
    137137                        sout | size - i + 1 | ':' | *v | ", ";
    138138                } // for
    139139                sout | endl;
    140                 for ( unsigned int i = 0; i < size; i += 1 ) {
     140                for ( i; 0u ~ size ) {
    141141                        unsigned int posn = bsearch( size - i + 1, sarr, size );
    142142                        sout | size - i + 1 | ':' | sarr[posn] | ", ";
  • tests/shortCircuit.c

    rd7d63e5 r5e44ac2  
    2222}
    2323
    24 #include <fstream>
     24#include <fstream.hfa>
    2525
    2626struct test_t {
  • tests/sum.c

    rd7d63e5 r5e44ac2  
    1111// Created On       : Wed May 27 17:56:53 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sun Jun  3 19:23:41 2018
    14 // Update Count     : 278
     13// Last Modified On : Thu Aug  2 08:03:09 2018
     14// Update Count     : 279
    1515//
    1616
    17 #include <fstream>
    18 #include <stdlib>
     17#include <fstream.hfa>
     18#include <stdlib.hfa>
    1919
    2020void ?{}( int & c, zero_t ) { c = 0; }                                  // not in prelude
     
    115115        sout | "sum from" | low | "to" | High | "is"
    116116                 | sum( size, gs.x ) | ", check" | (int)s | endl; // add field array in generic type
     117        delete( gs.x );
    117118} // main
    118119
  • tests/swap.c

    rd7d63e5 r5e44ac2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // swap.c -- 
     7// swap.c --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include <fstream>
    17 #include <stdlib>                                                                               // swap
     16#include <fstream.hfa>
     17#include <stdlib.hfa>                                                                           // swap
    1818
    1919int main( void ) {
  • tests/test.py

    rd7d63e5 r5e44ac2  
    8585        # create a parser with the arguments for the tests script
    8686        parser = argparse.ArgumentParser(description='Script which runs cforall tests')
    87         parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no')
     87        parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='yes')
     88        parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=yes_no, default='no')
    8889        parser.add_argument('--arch', help='Test for specific architecture', type=str, default='')
    8990        parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true')
     
    9798        parser.add_argument('tests', metavar='test', type=str, nargs='*', help='a list of tests to run')
    9899
    99         options =  parser.parse_args()
     100        try:
     101                options =  parser.parse_args()
     102        except:
     103                print('ERROR: invalid arguments', file=sys.stderr)
     104                parser.print_help(sys.stderr)
     105                sys.exit(1)
    100106
    101107        # script must have at least some tests to run or be listing
     
    166172
    167173        if retcode == 0:
     174                fixoutput(out_file)
    168175                if settings.generating :
    169176                        # if we are ounly generating the output we still need to check that the test actually exists
     
    176183                else :
    177184                        # fetch return code and error from the diff command
    178                         fixoutput(out_file)
    179185                        retcode, error = diff(cmp_file, out_file)
    180186
     
    285291
    286292        else :
     293                # check the build configuration works
     294                settings.validate()
     295
    287296                options.jobs, forceJobs = jobCount( options, tests )
    288297                settings.updateMakeCmd(forceJobs, options.jobs)
  • tests/time.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // time.c -- 
    8 // 
     6//
     7// time.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Tue Mar 27 17:24:56 2018
     
    1212// Last Modified On : Fri Apr  6 11:27:23 2018
    1313// Update Count     : 16
    14 // 
     14//
    1515
    16 #include "time"
    17 #include <fstream>
     16#include "time.hfa"
     17#include <fstream.hfa>
    1818
    1919int main() {
    20         Duration d1 = 3`h, d2 = 2`s, d3 = 3.07`s, d4 = 12`s, d5 = 1`s + 10_000`ns;
     20        Duration d1 = 3`h, d2 = 2`s, d3 = 3.375`s, d4 = 12`s, d5 = 1`s + 10_000`ns;
    2121        sout | d1 | d2 | d3 | d4 | d5 | endl;
    2222        int i;
  • tests/tuple/tupleAssign.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717
    1818int main() {
  • tests/tuple/tupleVariadic.c

    rd7d63e5 r5e44ac2  
    99// Author           : Rob Schluntz
    1010// Created On       : Fri Dec 16 10:25:35 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri Dec 21 14:42:48 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Aug  2 09:24:04 2018
     13// Update Count     : 6
    1414//
     15
     16#include <stdlib.hfa>
    1517
    1618void func(void) {
     
    2830        printf("called process(double) %g\n", x);
    2931}
    30 
    31 forall( dtype T, ttype Params | sized(T) | { void ?{}(T &, Params); } )
    32 T * new(Params p);
    3332
    3433struct array {
     
    6665        a.data[2] = a2;
    6766        printf("called ?{} with a: %d %d %d\n", a0, a1, a2);
     67}
     68
     69void ^?{}(array & a) {
     70        free(a.data);
    6871}
    6972
     
    126129                bar(x);
    127130        }
     131
     132        delete(ptr);
     133        delete(x4);
     134        delete(x3);
     135        delete(x2);
     136        delete(x1);
     137        delete(x0);
    128138}
    129139
     
    131141// tab-width: 4 //
    132142// End: //
    133 
  • tests/user_literals.c

    rd7d63e5 r5e44ac2  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // user_literals.c -- 
    8 // 
     6//
     7// user_literals.c --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed Sep  6 21:40:50 2017
     
    1212// Last Modified On : Sun Apr 29 16:51:42 2018
    1313// Update Count     : 54
    14 // 
     14//
    1515
    16 #include <fstream>
     16#include <fstream.hfa>
    1717#include <wchar.h>
    1818#include <uchar.h>
  • tests/vector.c

    rd7d63e5 r5e44ac2  
    1414//
    1515
    16 #include <fstream>
    17 #include <vector>
     16#include <fstream.hfa>
     17#include <vector.hfa>
    1818
    1919#undef assert
  • tests/virtualCast.c

    rd7d63e5 r5e44ac2  
    99 */
    1010
    11 #include <stdlib>
     11#include <stdlib.hfa>
    1212#include <assert.h>
    1313
Note: See TracChangeset for help on using the changeset viewer.