Changes in / [21a5dde1:e1e4aa9]
- Location:
- src
- Files:
-
- 2 added
- 1 deleted
- 24 edited
-
driver/cfa.cc (modified) (4 diffs)
-
libcfa/Makefile.am (modified) (4 diffs)
-
libcfa/Makefile.in (modified) (17 diffs)
-
libcfa/assert (added)
-
libcfa/assert.c (modified) (2 diffs)
-
libcfa/concurrency/alarm.h (modified) (2 diffs)
-
libcfa/concurrency/coroutine (modified) (2 diffs)
-
libcfa/concurrency/monitor (modified) (2 diffs)
-
libcfa/concurrency/thread (modified) (2 diffs)
-
libcfa/containers/maybe.c (modified) (1 diff)
-
libcfa/containers/result.c (modified) (1 diff)
-
libcfa/fstream.c (modified) (2 diffs)
-
libcfa/interpose.h (modified) (2 diffs)
-
libcfa/libhdr/libalign.h (modified) (2 diffs)
-
libcfa/math (modified) (1 diff)
-
libcfa/math.c (added)
-
libcfa/startup.h (modified) (3 diffs)
-
libcfa/stdhdr/assert.h (modified) (2 diffs)
-
libcfa/stdhdr/gmp.h (modified) (2 diffs)
-
libcfa/stdhdr/malloc.h (deleted)
-
libcfa/stdlib (modified) (2 diffs)
-
libcfa/stdlib.c (modified) (3 diffs)
-
tests/.expect/64/math.txt (modified) (2 diffs)
-
tests/alloc.c (modified) (1 diff)
-
tests/math.c (modified) (3 diffs)
-
tests/maybe.c (modified) (1 diff)
-
tests/result.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/driver/cfa.cc
r21a5dde1 re1e4aa9 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 15:54:45 201713 // Update Count : 15 612 // Last Modified On : Fri Jan 20 14:38:45 2017 13 // Update Count : 155 14 14 // 15 15 … … 76 76 bool cpp_flag = false; // -E or -M flag, preprocessor only 77 77 bool std_flag = false; // -std= flag 78 bool noincstd_flag = false; // -no-include-stdhdr= flag 78 79 bool debugging __attribute(( unused )) = false; // -g flag 79 80 … … 133 134 } else if ( arg == "-nohelp" ) { 134 135 help = false; // strip the nohelp flag 136 } else if ( arg == "-no-include-stdhdr" ) { 137 noincstd_flag = true; // strip the no-include-stdhdr flag 135 138 } else if ( arg == "-compiler" ) { 136 139 // use the user specified compiler … … 231 234 args[nargs] = "-I" CFA_INCDIR; 232 235 nargs += 1; 233 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 234 nargs += 1; 236 if ( ! noincstd_flag ) { // do not use during build 237 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 238 nargs += 1; 239 } // if 235 240 args[nargs] = "-I" CFA_INCDIR "/concurrency"; 236 241 nargs += 1; -
src/libcfa/Makefile.am
r21a5dde1 re1e4aa9 10 10 ## Author : Peter A. Buhr 11 11 ## Created On : Sun May 31 08:54:01 2015 12 ## Last Modified By : Peter A. Buhr13 ## Last Modified On : Thu Jul 20 23:09:34201714 ## Update Count : 2 2012 ## Last Modified By : Andrew Beach 13 ## Last Modified On : Fri Jun 14 17:00:00 2017 14 ## Update Count : 216 15 15 ############################################################################### 16 16 … … 39 39 40 40 AM_CCASFLAGS = @CFA_FLAGS@ 41 CFLAGS = -quiet - I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}41 CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS} 42 42 CC = ${abs_top_srcdir}/src/driver/cfa 43 43 44 headers = fstream iostream iterator limitsrational stdlib \44 headers = assert fstream iostream iterator limits math rational stdlib \ 45 45 containers/maybe containers/pair containers/result containers/vector 46 46 … … 52 52 libobjs = ${headers:=.o} 53 53 libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \ 54 assert.cexception.c typeobject.c54 exception.c typeobject.c 55 55 56 56 # not all platforms support concurrency, add option do disable it … … 91 91 92 92 cfa_includedir = $(CFA_INCDIR) 93 nobase_cfa_include_HEADERS = ${headers} ${stdhdr} mathgmp concurrency/invoke.h93 nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h 94 94 95 95 CLEANFILES = libcfa-prelude.c -
src/libcfa/Makefile.in
r21a5dde1 re1e4aa9 149 149 libcfa_d_a_LIBADD = 150 150 am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c interpose.c \ 151 libhdr/libdebug.c fstream.c iostream.c iterator.c limits.c \152 rational.c stdlib.c containers/maybe.c containers/pair.c \153 containers/ result.c containers/vector.c \151 libhdr/libdebug.c assert.c fstream.c iostream.c iterator.c \ 152 limits.c math.c rational.c stdlib.c containers/maybe.c \ 153 containers/pair.c containers/result.c containers/vector.c \ 154 154 concurrency/coroutine.c concurrency/thread.c \ 155 concurrency/kernel.c concurrency/monitor.c assert.c \156 exception.c typeobject.c\157 concurrency/ CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \158 concurrency/ invoke.c concurrency/preemption.c155 concurrency/kernel.c concurrency/monitor.c exception.c \ 156 typeobject.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \ 157 concurrency/alarm.c concurrency/invoke.c \ 158 concurrency/preemption.c 159 159 am__dirstamp = $(am__leading_dot)dirstamp 160 160 @BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \ … … 162 162 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_d_a-kernel.$(OBJEXT) \ 163 163 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_d_a-monitor.$(OBJEXT) 164 am__objects_2 = libcfa_d_a-fstream.$(OBJEXT) \ 165 libcfa_d_a-iostream.$(OBJEXT) libcfa_d_a-iterator.$(OBJEXT) \ 166 libcfa_d_a-limits.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \ 164 am__objects_2 = libcfa_d_a-assert.$(OBJEXT) \ 165 libcfa_d_a-fstream.$(OBJEXT) libcfa_d_a-iostream.$(OBJEXT) \ 166 libcfa_d_a-iterator.$(OBJEXT) libcfa_d_a-limits.$(OBJEXT) \ 167 libcfa_d_a-math.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \ 167 168 libcfa_d_a-stdlib.$(OBJEXT) \ 168 169 containers/libcfa_d_a-maybe.$(OBJEXT) \ … … 177 178 libcfa_d_a-interpose.$(OBJEXT) \ 178 179 libhdr/libcfa_d_a-libdebug.$(OBJEXT) $(am__objects_2) \ 179 libcfa_d_a- assert.$(OBJEXT) libcfa_d_a-exception.$(OBJEXT) \180 libcfa_d_a-typeobject.$(OBJEXT)$(am__objects_3)180 libcfa_d_a-exception.$(OBJEXT) libcfa_d_a-typeobject.$(OBJEXT) \ 181 $(am__objects_3) 181 182 am_libcfa_d_a_OBJECTS = $(am__objects_4) 182 183 libcfa_d_a_OBJECTS = $(am_libcfa_d_a_OBJECTS) … … 184 185 libcfa_a_LIBADD = 185 186 am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c \ 186 libhdr/libdebug.c fstream.c iostream.c iterator.c limits.c \187 rational.c stdlib.c containers/maybe.c containers/pair.c \188 containers/ result.c containers/vector.c \187 libhdr/libdebug.c assert.c fstream.c iostream.c iterator.c \ 188 limits.c math.c rational.c stdlib.c containers/maybe.c \ 189 containers/pair.c containers/result.c containers/vector.c \ 189 190 concurrency/coroutine.c concurrency/thread.c \ 190 concurrency/kernel.c concurrency/monitor.c assert.c \191 exception.c typeobject.c\192 concurrency/ CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \193 concurrency/ invoke.c concurrency/preemption.c191 concurrency/kernel.c concurrency/monitor.c exception.c \ 192 typeobject.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \ 193 concurrency/alarm.c concurrency/invoke.c \ 194 concurrency/preemption.c 194 195 @BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \ 195 196 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_a-thread.$(OBJEXT) \ 196 197 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_a-kernel.$(OBJEXT) \ 197 198 @BUILD_CONCURRENCY_TRUE@ concurrency/libcfa_a-monitor.$(OBJEXT) 198 am__objects_6 = libcfa_a-fstream.$(OBJEXT) libcfa_a-iostream.$(OBJEXT) \ 199 libcfa_a-iterator.$(OBJEXT) libcfa_a-limits.$(OBJEXT) \ 199 am__objects_6 = libcfa_a-assert.$(OBJEXT) libcfa_a-fstream.$(OBJEXT) \ 200 libcfa_a-iostream.$(OBJEXT) libcfa_a-iterator.$(OBJEXT) \ 201 libcfa_a-limits.$(OBJEXT) libcfa_a-math.$(OBJEXT) \ 200 202 libcfa_a-rational.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \ 201 203 containers/libcfa_a-maybe.$(OBJEXT) \ … … 210 212 libcfa_a-interpose.$(OBJEXT) \ 211 213 libhdr/libcfa_a-libdebug.$(OBJEXT) $(am__objects_6) \ 212 libcfa_a- assert.$(OBJEXT) libcfa_a-exception.$(OBJEXT) \213 libcfa_a-typeobject.$(OBJEXT)$(am__objects_7)214 libcfa_a-exception.$(OBJEXT) libcfa_a-typeobject.$(OBJEXT) \ 215 $(am__objects_7) 214 216 am_libcfa_a_OBJECTS = $(am__objects_8) 215 217 libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS) … … 260 262 *) (install-info --version) >/dev/null 2>&1;; \ 261 263 esac 262 am__nobase_cfa_include_HEADERS_DIST = fstream iostream iterator limits\263 rational stdlib containers/maybe containers/pair \264 am__nobase_cfa_include_HEADERS_DIST = assert fstream iostream iterator \ 265 limits math rational stdlib containers/maybe containers/pair \ 264 266 containers/result containers/vector concurrency/coroutine \ 265 267 concurrency/thread concurrency/kernel concurrency/monitor \ 266 ${shell echo stdhdr/*} mathgmp concurrency/invoke.h268 ${shell echo stdhdr/*} gmp concurrency/invoke.h 267 269 HEADERS = $(nobase_cfa_include_HEADERS) 268 270 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) … … 308 310 CFA_NAME = @CFA_NAME@ 309 311 CFA_PREFIX = @CFA_PREFIX@ 310 CFLAGS = -quiet - I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}312 CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS} 311 313 CPP = @CPP@ 312 314 CPPFLAGS = @CPPFLAGS@ … … 414 416 EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@ 415 417 AM_CCASFLAGS = @CFA_FLAGS@ 416 headers = fstream iostream iterator limitsrational stdlib \418 headers = assert fstream iostream iterator limits math rational stdlib \ 417 419 containers/maybe containers/pair containers/result \ 418 420 containers/vector $(am__append_3) 419 421 libobjs = ${headers:=.o} 420 422 libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \ 421 assert.cexception.c typeobject.c $(am__append_4)423 exception.c typeobject.c $(am__append_4) 422 424 libcfa_a_SOURCES = ${libsrc} 423 425 libcfa_a_CFLAGS = -nodebug -O2 … … 426 428 stdhdr = ${shell echo stdhdr/*} 427 429 cfa_includedir = $(CFA_INCDIR) 428 nobase_cfa_include_HEADERS = ${headers} ${stdhdr} mathgmp concurrency/invoke.h430 nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h 429 431 CLEANFILES = libcfa-prelude.c 430 432 all: all-am … … 592 594 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-libcfa-prelude.Po@am__quote@ 593 595 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-limits.Po@am__quote@ 596 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-math.Po@am__quote@ 594 597 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-rational.Po@am__quote@ 595 598 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-stdlib.Po@am__quote@ … … 603 606 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-libcfa-prelude.Po@am__quote@ 604 607 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-limits.Po@am__quote@ 608 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-math.Po@am__quote@ 605 609 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-rational.Po@am__quote@ 606 610 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-stdlib.Po@am__quote@ … … 699 703 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi` 700 704 705 libcfa_d_a-assert.o: assert.c 706 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c 707 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po 708 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.o' libtool=no @AMDEPBACKSLASH@ 709 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 710 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c 711 712 libcfa_d_a-assert.obj: assert.c 713 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi` 714 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po 715 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.obj' libtool=no @AMDEPBACKSLASH@ 716 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 717 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi` 718 701 719 libcfa_d_a-fstream.o: fstream.c 702 720 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c … … 755 773 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi` 756 774 775 libcfa_d_a-math.o: math.c 776 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c 777 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po 778 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math.c' object='libcfa_d_a-math.o' libtool=no @AMDEPBACKSLASH@ 779 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 780 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c 781 782 libcfa_d_a-math.obj: math.c 783 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi` 784 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po 785 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math.c' object='libcfa_d_a-math.obj' libtool=no @AMDEPBACKSLASH@ 786 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 787 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi` 788 757 789 libcfa_d_a-rational.o: rational.c 758 790 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c … … 895 927 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi` 896 928 897 libcfa_d_a-assert.o: assert.c898 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c899 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po900 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.o' libtool=no @AMDEPBACKSLASH@901 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@902 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c903 904 libcfa_d_a-assert.obj: assert.c905 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`906 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-assert.Tpo $(DEPDIR)/libcfa_d_a-assert.Po907 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_d_a-assert.obj' libtool=no @AMDEPBACKSLASH@908 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@909 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`910 911 929 libcfa_d_a-exception.obj: exception.c 912 930 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-exception.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-exception.Tpo -c -o libcfa_d_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi` … … 993 1011 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi` 994 1012 1013 libcfa_a-assert.o: assert.c 1014 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c 1015 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po 1016 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_a-assert.o' libtool=no @AMDEPBACKSLASH@ 1017 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1018 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c 1019 1020 libcfa_a-assert.obj: assert.c 1021 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi` 1022 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po 1023 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_a-assert.obj' libtool=no @AMDEPBACKSLASH@ 1024 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1025 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi` 1026 995 1027 libcfa_a-fstream.o: fstream.c 996 1028 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c … … 1049 1081 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi` 1050 1082 1083 libcfa_a-math.o: math.c 1084 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c 1085 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po 1086 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math.c' object='libcfa_a-math.o' libtool=no @AMDEPBACKSLASH@ 1087 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1088 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c 1089 1090 libcfa_a-math.obj: math.c 1091 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi` 1092 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po 1093 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math.c' object='libcfa_a-math.obj' libtool=no @AMDEPBACKSLASH@ 1094 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1095 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi` 1096 1051 1097 libcfa_a-rational.o: rational.c 1052 1098 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c … … 1188 1234 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1189 1235 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi` 1190 1191 libcfa_a-assert.o: assert.c1192 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c1193 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po1194 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_a-assert.o' libtool=no @AMDEPBACKSLASH@1195 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@1196 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c1197 1198 libcfa_a-assert.obj: assert.c1199 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.obj -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`1200 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-assert.Tpo $(DEPDIR)/libcfa_a-assert.Po1201 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assert.c' object='libcfa_a-assert.obj' libtool=no @AMDEPBACKSLASH@1202 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@1203 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`1204 1236 1205 1237 libcfa_a-exception.obj: exception.c -
src/libcfa/assert.c
r21a5dde1 re1e4aa9 9 9 // Author : Thierry Delisle 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 20 15:10:26 201713 // Update Count : 211 // Last Modified By : Thierry Delisle 12 // Last Modified On : Mon Nov 28 12:27:26 2016 13 // Update Count : 0 14 14 // 15 15 16 #include <assert.h>17 #include <stdarg.h> // varargs18 #include <stdio.h> // fprintf 16 #include "assert" 17 #include "stdlib" // abort 18 19 19 #include "libhdr/libdebug.h" 20 20 21 21 extern "C" { 22 #include <stdarg.h> // varargs 23 #include <stdio.h> // fprintf 24 22 25 extern const char * __progname; // global name of running executable (argv[0]) 23 26 … … 44 47 abort(); 45 48 } 49 46 50 } 47 51 -
src/libcfa/concurrency/alarm.h
r21a5dde1 re1e4aa9 10 10 // Author : Thierry Delisle 11 11 // Created On : Fri Jun 2 11:31:25 2017 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Thu Jul 20 15:22:15 201714 // Update Count : 112 // Last Modified By : Thierry Delisle 13 // Last Modified On : -- 14 // Update Count : 0 15 15 // 16 16 … … 21 21 #include <stdint.h> 22 22 23 #include <assert.h>23 #include "assert" 24 24 25 25 struct thread_desc; -
src/libcfa/concurrency/coroutine
r21a5dde1 re1e4aa9 10 10 // Author : Thierry Delisle 11 11 // Created On : Mon Nov 28 12:27:26 2016 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Thu Jul 20 15:21:53 201714 // Update Count : 112 // Last Modified By : Thierry Delisle 13 // Last Modified On : Mon Nov 28 12:27:26 2016 14 // Update Count : 0 15 15 // 16 16 … … 18 18 #define COROUTINES_H 19 19 20 #include <assert.h>20 #include "assert" 21 21 #include "invoke.h" 22 22 -
src/libcfa/concurrency/monitor
r21a5dde1 re1e4aa9 10 10 // Author : Thierry Delisle 11 11 // Created On : Thd Feb 23 12:27:26 2017 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Thu Jul 20 15:22:07 201714 // Update Count : 112 // Last Modified By : Thierry Delisle 13 // Last Modified On : -- 14 // Update Count : 0 15 15 // 16 16 … … 20 20 #include <stddef.h> 21 21 22 #include <assert.h>22 #include "assert" 23 23 #include "invoke.h" 24 24 #include "stdlib" -
src/libcfa/concurrency/thread
r21a5dde1 re1e4aa9 10 10 // Author : Thierry Delisle 11 11 // Created On : Tue Jan 17 12:27:26 2017 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Thu Jul 20 15:22:24 201714 // Update Count : 112 // Last Modified By : Thierry Delisle 13 // Last Modified On : -- 14 // Update Count : 0 15 15 // 16 16 … … 18 18 #define THREADS_H 19 19 20 #include <assert.h>20 #include "assert" 21 21 #include "invoke.h" 22 22 -
src/libcfa/containers/maybe.c
r21a5dde1 re1e4aa9 9 9 // Author : Andrew Beach 10 10 // Created On : Wed May 24 15:40:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Th u Jul 20 15:23:50 201713 // Update Count : 211 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr May 25 15:24:00 2017 13 // Update Count : 1 14 14 // 15 15 16 16 #include <containers/maybe> 17 #include <assert .h>17 #include <assert> 18 18 19 19 -
src/libcfa/containers/result.c
r21a5dde1 re1e4aa9 9 9 // Author : Andrew Beach 10 10 // Created On : Wed May 24 15:40:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Th u Jul 20 15:23:58201713 // Update Count : 211 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr May 25 15:27:00 2017 13 // Update Count : 1 14 14 // 15 15 16 16 #include <containers/result> 17 #include <assert .h>17 #include <assert> 18 18 19 19 -
src/libcfa/fstream.c
r21a5dde1 re1e4aa9 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 15:20:49201713 // Update Count : 25 212 // Last Modified On : Thu Jul 6 18:38:25 2017 13 // Update Count : 251 14 14 // 15 15 16 16 #include "fstream" 17 17 18 extern "C" { 18 19 #include <stdio.h> // vfprintf, vfscanf 19 20 #include <stdlib.h> // exit … … 23 24 #include <float.h> // DBL_DIG, LDBL_DIG 24 25 #include <complex.h> // creal, cimag 25 #include <assert.h> 26 } 27 #include "assert" 26 28 27 29 #define IO_MSG "I/O error: " -
src/libcfa/interpose.h
r21a5dde1 re1e4aa9 10 10 // Author : Thierry Delisle 11 11 // Created On : Wed Mar 29 15:56:41 2017 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Thu Jul 20 21:46:46 201714 // Update Count : 112 // Last Modified By : 13 // Last Modified On : 14 // Update Count : 0 15 15 // 16 16 17 #pragma once 17 #ifndef INTERPOSE_H 18 #define INTERPOSE_H 18 19 19 20 void * interpose_symbol( const char* symbol, , const char *version ); … … 21 22 extern __typeof__( abort ) libc_abort __attribute__(( noreturn )); 22 23 extern __typeof__( exit ) libc_abort __attribute__(( noreturn )); 24 25 #endif //INTERPOSE_H -
src/libcfa/libhdr/libalign.h
r21a5dde1 re1e4aa9 10 10 // Author : Thierry Delisle 11 11 // Created On : Mon Nov 28 12:27:26 2016 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Thu Jul 20 15:22:45 201714 // Update Count : 112 // Last Modified By : Thierry Delisle 13 // Last Modified On : Mon Nov 28 12:27:26 2016 14 // Update Count : 0 15 15 // 16 16 // This library is free software; you can redistribute it and/or modify it … … 32 32 #define __LIB_ALIGN_H__ 33 33 34 #include <assert.h>34 #include "assert" 35 35 #include <stdbool.h> 36 36 -
src/libcfa/math
r21a5dde1 re1e4aa9 10 10 // Created On : Mon Apr 18 23:37:04 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 21:45:07201713 // Update Count : 7712 // Last Modified On : Fri Jul 7 09:34:15 2017 13 // Update Count : 61 14 14 // 15 15 16 16 #pragma once 17 17 18 #include <math.h> 19 #include <complex.h> 20 21 static inline float ?%?( float x, float y ) { return fmodf( x, y ); } 22 static inline float fmod( float x, float y ) { return fmodf( x, y ); } 23 static inline double ?%?( double x, double y ) { return fmod( x, y ); } 18 extern "C" { 19 #include <math.h> // fpclassify, isfinite, isnormal, isnan, isinf 20 } // extern "C" 21 22 float ?%?( float, float ); 23 float fmod( float, float ); 24 double ?%?( double, double ); 24 25 // extern "C" { double fmod( double, double ); } 25 static inline long double ?%?( long double x, long double y ) { return fmodl( x, y ); } 26 static inline long double fmod( long double x, long double y ) { return fmodl( x, y ); } 27 28 static inline float remainder( float x, float y ) { return remainderf( x, y ); } 26 long double ?%?( long double, long double ); 27 long double fmod( long double, long double ); 28 29 float remainder( float, float ); 29 30 // extern "C" { double remainder( double, double ); } 30 static inline long double remainder( long double x, long double y ) { return remainderl( x, y ); } 31 32 static inline float remquo( float x, float y, int * quo ) { return remquof( x, y, quo ); } 33 // extern "C" { double remquo( double x, double y, int * quo ); } 34 static inline long double remquo( long double x, long double y, int * quo ) { return remquol( x, y, quo ); } 35 static inline [ int, float ] remquo( float x, float y ) { int quo; x = remquof( x, y, &quo ); return [ quo, x ]; } 36 static inline [ int, double ] remquo( double x, double y ) { int quo; x = remquo( x, y, &quo ); return [ quo, x ]; } 37 static inline [ int, long double ] remquo( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; } 38 39 // alternative name for remquo 40 static inline float div( float x, float y, int * quo ) { return remquof( x, y, quo ); } 41 static inline double div( double x, double y, int * quo ) { return remquo( x, y, quo ); } 42 static inline long double div( long double x, long double y, int * quo ) { return remquol( x, y, quo ); } 43 static inline [ int, float ] div( float x, float y ) { int quo; x = remquof( x, y, &quo ); return [ quo, x ]; } 44 static inline [ int, double ] div( double x, double y ) { int quo; x = remquo( x, y, &quo ); return [ quo, x ]; } 45 static inline [ int, long double ] div( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; } 46 47 static inline float fma( float x, float y, float z ) { return fmaf( x, y, z ); } 31 long double remainder( long double, long double ); 32 33 [ int, float ] remquo( float, float ); 34 float remquo( float, float, int * ); 35 [ int, double ] remquo( double, double ); 36 // extern "C" { double remquo( double, double, int * ); } 37 [ int, long double ] remquo( long double, long double ); 38 long double remquo( long double, long double, int * ); 39 40 [ int, float ] div( float, float ); // alternative name for remquo 41 float div( float, float, int * ); 42 [ int, double ] div( double, double ); 43 // extern "C" { double div( double, double, int * ); } 44 [ int, long double ] div( long double, long double ); 45 long double div( long double, long double, int * ); 46 47 float fma( float, float, float ); 48 48 // extern "C" { double fma( double, double, double ); } 49 static inline long double fma( long double x, long double y, long double z ) { return fmal( x, y, z ); } 50 51 static inline float fdim( float x, float y ) { return fdimf( x, y ); } 49 long double fma( long double, long double, long double ); 50 51 float fdim( float, float ); 52 52 // extern "C" { double fdim( double, double ); } 53 static inline long double fdim( long double x, long double y ) { return fdiml( x, y ); } 54 55 static inline float nan( const char * tag ) { return nanf( tag ); } 53 long double fdim( long double, long double ); 54 55 float nan( const char * ); 56 56 // extern "C" { double nan( const char * ); } 57 static inline long double nan( const char * tag ) { return nanl( tag ); } 57 long double nan( const char * ); 58 58 59 59 //---------------------- Exponential ---------------------- 60 60 61 static inline float exp( float x ) { return expf( x ); } 61 float exp( float ); 62 62 // extern "C" { double exp( double ); } 63 static inline long double exp( long double x ) { return expl( x ); } 64 static inline float _Complex exp( float _Complex x ) { return cexpf( x ); } 65 static inline double _Complex exp( double _Complex x ) { return cexp( x ); } 66 static inline long double _Complex exp( long double _Complex x ) { return cexpl( x ); } 67 68 static inline float exp2( float x ) { return exp2f( x ); } 63 long double exp( long double ); 64 float _Complex exp( float _Complex ); 65 double _Complex exp( double _Complex ); 66 long double _Complex exp( long double _Complex ); 67 68 float exp2( float ); 69 69 // extern "C" { double exp2( double ); } 70 static inline long double exp2( long double x ) { return exp2l( x ); } 71 // static inline float _Complex exp2( float _Complex x ) { return cexp2f( x ); }72 // static inline double _Complex exp2( double _Complex x ) { return cexp2( x ); }73 // static inline long double _Complex exp2( long double _Complex x ) { return cexp2l( x ); }74 75 static inline float expm1( float x ) { return expm1f( x ); } 70 long double exp2( long double ); 71 // float _Complex exp2( float _Complex ); 72 // double _Complex exp2( double _Complex ); 73 // long double _Complex exp2( long double _Complex ); 74 75 float expm1( float ); 76 76 // extern "C" { double expm1( double ); } 77 static inline long double expm1( long double x ) { return expm1l( x ); } 78 79 static inline float pow( float x, float y ) { return powf( x, y ); } 77 long double expm1( long double ); 78 79 float log( float ); 80 // extern "C" { double log( double ); } 81 long double log( long double ); 82 float _Complex log( float _Complex ); 83 double _Complex log( double _Complex ); 84 long double _Complex log( long double _Complex ); 85 86 float log2( float ); 87 // extern "C" { double log2( double ); } 88 long double log2( long double ); 89 // float _Complex log2( float _Complex ); 90 // double _Complex log2( double _Complex ); 91 // long double _Complex log2( long double _Complex ); 92 93 float log10( float ); 94 // extern "C" { double log10( double ); } 95 long double log10( long double ); 96 // float _Complex log10( float _Complex ); 97 // double _Complex log10( double _Complex ); 98 // long double _Complex log10( long double _Complex ); 99 100 float log1p( float ); 101 // extern "C" { double log1p( double ); } 102 long double log1p( long double ); 103 104 int ilogb( float ); 105 // extern "C" { int ilogb( double ); } 106 int ilogb( long double ); 107 108 float logb( float ); 109 // extern "C" { double logb( double ); } 110 long double logb( long double ); 111 112 //---------------------- Power ---------------------- 113 114 float sqrt( float ); 115 // extern "C" { double sqrt( double ); } 116 long double sqrt( long double ); 117 float _Complex sqrt( float _Complex ); 118 double _Complex sqrt( double _Complex ); 119 long double _Complex sqrt( long double _Complex ); 120 121 float cbrt( float ); 122 // extern "C" { double cbrt( double ); } 123 long double cbrt( long double ); 124 125 float hypot( float, float ); 126 // extern "C" { double hypot( double, double ); } 127 long double hypot( long double, long double ); 128 129 float pow( float, float ); 80 130 // extern "C" { double pow( double, double ); } 81 static inline long double pow( long double x, long double y ) { return powl( x, y ); } 82 static inline float _Complex pow( float _Complex x, float _Complex y ) { return cpowf( x, y ); } 83 static inline double _Complex pow( double _Complex x, double _Complex y ) { return cpow( x, y ); } 84 static inline long double _Complex pow( long double _Complex x, long double _Complex y ) { return cpowl( x, y ); } 85 86 static inline float ?\?( float x, float y ) { return powf( x, y ); } 87 static inline double ?\?( double x, double y ) { return pow( x, y ); } 88 static inline long double ?\?( long double x, long double y ) { return powl( x, y ); } 89 static inline float _Complex ?\?( float _Complex x, _Complex float y ) { return cpowf(x, y ); } 90 static inline double _Complex ?\?( double _Complex x, _Complex double y ) { return cpow( x, y ); } 91 static inline long double _Complex ?\?( long double _Complex x, _Complex long double y ) { return cpowl( x, y ); } 92 93 static inline float ?\=?( float * x, float y ) { *x = *x \ y; return *x; } 94 static inline double ?\=?( double * x, double y ) { *x = *x \ y; return *x; } 95 static inline long double ?\=?( long double * x, long double y ) { *x = *x \ y; return *x; } 96 static inline float _Complex ?\=?( float _Complex * x, _Complex float y ) { *x = *x \ y; return *x; } 97 static inline double _Complex ?\=?( double _Complex * x, _Complex double y ) { *x = *x \ y; return *x; } 98 static inline long double _Complex ?\=?( long double _Complex * x, _Complex long double y ) { *x = *x \ y; return *x; } 99 100 static inline long int ?\?( long int x, unsigned long y ) { // disallow negative exponent 101 if ( y == 0 ) return 1; 102 if ( x == 2 ) return x << (y - 1); 103 long int prod = 1; 104 for ( unsigned int i = 0; i < y; i += 1 ) { 105 prod = prod * x; 106 } // for 107 return prod; 108 } 109 static inline double ?\?( long int x, signed long y ) { // allow negative exponent 110 if ( y >= 0 ) return (double)(x \ (unsigned int)y); 111 else return 1.0 / x \ (unsigned int)(-y); 112 } 113 static inline forall( otype T | { void ?{}( T * this, one_t ); T ?*?( T, T ); } ) 114 T ?\?( T x, unsigned long y ) { 115 T prod = 1; 116 for ( unsigned int i = 1; i < y; i += 1 ) { 117 prod = prod * x; 118 } // for 119 return prod; 120 } 121 static inline long int ?\=?( long int * x, unsigned long y ) { *x = *x \ y; return *x; } 122 static inline int ?\=?( int * x, unsigned long y ) { *x = *x \ y; return *x; } 123 124 //---------------------- Logarithm ---------------------- 125 126 static inline float log( float x ) { return logf( x ); } 127 // extern "C" { double log( double ); } 128 static inline long double log( long double x ) { return logl( x ); } 129 static inline float _Complex log( float _Complex x ) { return clogf( x ); } 130 static inline double _Complex log( double _Complex x ) { return clog( x ); } 131 static inline long double _Complex log( long double _Complex x ) { return clogl( x ); } 132 133 static inline float log2( float x ) { return log2f( x ); } 134 // extern "C" { double log2( double ); } 135 static inline long double log2( long double x ) { return log2l( x ); } 136 // static inline float _Complex log2( float _Complex x ) { return clog2f( x ); } 137 // static inline double _Complex log2( double _Complex x ) { return clog2( x ); } 138 // static inline long double _Complex log2( long double _Complex x ) { return clog2l( x ); } 139 140 static inline float log10( float x ) { return log10f( x ); } 141 // extern "C" { double log10( double ); } 142 static inline long double log10( long double x ) { return log10l( x ); } 143 // static inline float _Complex log10( float _Complex x ) { return clog10f( x ); } 144 // static inline double _Complex log10( double _Complex x ) { return clog10( x ); } 145 // static inline long double _Complex log10( long double _Complex x ) { return clog10l( x ); } 146 147 static inline float log1p( float x ) { return log1pf( x ); } 148 // extern "C" { double log1p( double ); } 149 static inline long double log1p( long double x ) { return log1pl( x ); } 150 151 static inline int ilogb( float x ) { return ilogbf( x ); } 152 // extern "C" { int ilogb( double ); } 153 static inline int ilogb( long double x ) { return ilogbl( x ); } 154 155 static inline float logb( float x ) { return logbf( x ); } 156 // extern "C" { double logb( double ); } 157 static inline long double logb( long double x ) { return logbl( x ); } 158 159 static inline float sqrt( float x ) { return sqrtf( x ); } 160 // extern "C" { double sqrt( double ); } 161 static inline long double sqrt( long double x ) { return sqrtl( x ); } 162 static inline float _Complex sqrt( float _Complex x ) { return csqrtf( x ); } 163 static inline double _Complex sqrt( double _Complex x ) { return csqrt( x ); } 164 static inline long double _Complex sqrt( long double _Complex x ) { return csqrtl( x ); } 165 166 static inline float cbrt( float x ) { return cbrtf( x ); } 167 // extern "C" { double cbrt( double ); } 168 static inline long double cbrt( long double x ) { return cbrtl( x ); } 169 170 static inline float hypot( float x, float y ) { return hypotf( x, y ); } 171 // extern "C" { double hypot( double, double ); } 172 static inline long double hypot( long double x, long double y ) { return hypotl( x, y ); } 131 long double pow( long double, long double ); 132 float _Complex pow( float _Complex, float _Complex ); 133 double _Complex pow( double _Complex, double _Complex ); 134 long double _Complex pow( long double _Complex, long double _Complex ); 173 135 174 136 //---------------------- Trigonometric ---------------------- 175 137 176 static inline float sin( float x ) { return sinf( x ); } 138 float sin( float ); 177 139 // extern "C" { double sin( double ); } 178 static inline long double sin( long double x ) { return sinl( x ); } 179 static inline float _Complex sin( float _Complex x ) { return csinf( x ); } 180 static inline double _Complex sin( double _Complex x ) { return csin( x ); } 181 static inline long double _Complex sin( long double _Complex x ) { return csinl( x ); } 182 183 static inline float cos( float x ) { return cosf( x ); } 140 long double sin( long double ); 141 float _Complex sin( float _Complex ); 142 double _Complex sin( double _Complex ); 143 long double _Complex sin( long double _Complex ); 144 145 float cos( float ); 184 146 // extern "C" { double cos( double ); } 185 static inline long double cos( long double x ) { return cosl( x ); } 186 static inline float _Complex cos( float _Complex x ) { return ccosf( x ); } 187 static inline double _Complex cos( double _Complex x ) { return ccos( x ); } 188 static inline long double _Complex cos( long double _Complex x ) { return ccosl( x ); } 189 190 static inline float tan( float x ) { return tanf( x ); } 147 long double cos( long double ); 148 float _Complex cos( float _Complex ); 149 double _Complex cos( double _Complex ); 150 long double _Complex cos( long double _Complex ); 151 152 float tan( float ); 191 153 // extern "C" { double tan( double ); } 192 static inline long double tan( long double x ) { return tanl( x ); } 193 static inline float _Complex tan( float _Complex x ) { return ctanf( x ); } 194 static inline double _Complex tan( double _Complex x ) { return ctan( x ); } 195 static inline long double _Complex tan( long double _Complex x ) { return ctanl( x ); } 196 197 static inline float asin( float x ) { return asinf( x ); } 154 long double tan( long double ); 155 float _Complex tan( float _Complex ); 156 double _Complex tan( double _Complex ); 157 long double _Complex tan( long double _Complex ); 158 159 float asin( float ); 198 160 // extern "C" { double asin( double ); } 199 static inline long double asin( long double x ) { return asinl( x ); } 200 static inline float _Complex asin( float _Complex x ) { return casinf( x ); } 201 static inline double _Complex asin( double _Complex x ) { return casin( x ); } 202 static inline long double _Complex asin( long double _Complex x ) { return casinl( x ); } 203 204 static inline float acos( float x ) { return acosf( x ); } 161 long double asin( long double ); 162 float _Complex asin( float _Complex ); 163 double _Complex asin( double _Complex ); 164 long double _Complex asin( long double _Complex ); 165 166 float acos( float ); 205 167 // extern "C" { double acos( double ); } 206 static inline long double acos( long double x ) { return acosl( x ); } 207 static inline float _Complex acos( float _Complex x ) { return cacosf( x ); } 208 static inline double _Complex acos( double _Complex x ) { return cacos( x ); } 209 static inline long double _Complex acos( long double _Complex x ) { return cacosl( x ); } 210 211 static inline float atan( float x ) { return atanf( x ); } 168 long double acos( long double ); 169 float _Complex acos( float _Complex ); 170 double _Complex acos( double _Complex ); 171 long double _Complex acos( long double _Complex ); 172 173 float atan( float ); 212 174 // extern "C" { double atan( double ); } 213 static inline long double atan( long double x ) { return atanl( x ); } 214 static inline float _Complex atan( float _Complex x ) { return catanf( x ); } 215 static inline double _Complex atan( double _Complex x ) { return catan( x ); } 216 static inline long double _Complex atan( long double _Complex x ) { return catanl( x ); } 217 218 static inline float atan2( float x, float y ) { return atan2f( x, y ); } 175 long double atan( long double ); 176 float _Complex atan( float _Complex ); 177 double _Complex atan( double _Complex ); 178 long double _Complex atan( long double _Complex ); 179 180 float atan2( float, float ); 219 181 // extern "C" { double atan2( double, double ); } 220 static inline long double atan2( long double x, long double y ) { return atan2l( x, y ); } 221 222 // alternative name for atan2 223 static inline float atan( float x, float y ) { return atan2f( x, y ); } 224 static inline double atan( double x, double y ) { return atan2( x, y ); } 225 static inline long double atan( long double x, long double y ) { return atan2l( x, y ); } 182 long double atan2( long double, long double ); 183 184 float atan( float, float ); // alternative name for atan2 185 double atan( double, double ); 186 long double atan( long double, long double ); 226 187 227 188 //---------------------- Hyperbolic ---------------------- 228 189 229 static inline float sinh( float x ) { return sinhf( x ); } 190 float sinh( float ); 230 191 // extern "C" { double sinh( double ); } 231 static inline long double sinh( long double x ) { return sinhl( x ); } 232 static inline float _Complex sinh( float _Complex x ) { return csinhf( x ); } 233 static inline double _Complex sinh( double _Complex x ) { return csinh( x ); } 234 static inline long double _Complex sinh( long double _Complex x ) { return csinhl( x ); } 235 236 static inline float cosh( float x ) { return coshf( x ); } 192 long double sinh( long double ); 193 float _Complex sinh( float _Complex ); 194 double _Complex sinh( double _Complex ); 195 long double _Complex sinh( long double _Complex ); 196 197 float cosh( float ); 237 198 // extern "C" { double cosh( double ); } 238 static inline long double cosh( long double x ) { return coshl( x ); } 239 static inline float _Complex cosh( float _Complex x ) { return ccoshf( x ); } 240 static inline double _Complex cosh( double _Complex x ) { return ccosh( x ); } 241 static inline long double _Complex cosh( long double _Complex x ) { return ccoshl( x ); } 242 243 static inline float tanh( float x ) { return tanhf( x ); } 199 long double cosh( long double ); 200 float _Complex cosh( float _Complex ); 201 double _Complex cosh( double _Complex ); 202 long double _Complex cosh( long double _Complex ); 203 204 float tanh( float ); 244 205 // extern "C" { double tanh( double ); } 245 static inline long double tanh( long double x ) { return tanhl( x ); } 246 static inline float _Complex tanh( float _Complex x ) { return ctanhf( x ); } 247 static inline double _Complex tanh( double _Complex x ) { return ctanh( x ); } 248 static inline long double _Complex tanh( long double _Complex x ) { return ctanhl( x ); } 249 250 static inline float asinh( float x ) { return asinhf( x ); } 206 long double tanh( long double ); 207 float _Complex tanh( float _Complex ); 208 double _Complex tanh( double _Complex ); 209 long double _Complex tanh( long double _Complex ); 210 211 float asinh( float ); 251 212 // extern "C" { double asinh( double ); } 252 static inline long double asinh( long double x ) { return asinhl( x ); } 253 static inline float _Complex asinh( float _Complex x ) { return casinhf( x ); } 254 static inline double _Complex asinh( double _Complex x ) { return casinh( x ); } 255 static inline long double _Complex asinh( long double _Complex x ) { return casinhl( x ); } 256 257 static inline float acosh( float x ) { return acoshf( x ); } 213 long double asinh( long double ); 214 float _Complex asinh( float _Complex ); 215 double _Complex asinh( double _Complex ); 216 long double _Complex asinh( long double _Complex ); 217 218 float acosh( float ); 258 219 // extern "C" { double acosh( double ); } 259 static inline long double acosh( long double x ) { return acoshl( x ); } 260 static inline float _Complex acosh( float _Complex x ) { return cacoshf( x ); } 261 static inline double _Complex acosh( double _Complex x ) { return cacosh( x ); } 262 static inline long double _Complex acosh( long double _Complex x ) { return cacoshl( x ); } 263 264 static inline float atanh( float x ) { return atanhf( x ); } 220 long double acosh( long double ); 221 float _Complex acosh( float _Complex ); 222 double _Complex acosh( double _Complex ); 223 long double _Complex acosh( long double _Complex ); 224 225 float atanh( float ); 265 226 // extern "C" { double atanh( double ); } 266 static inline long double atanh( long double x ) { return atanhl( x ); } 267 static inline float _Complex atanh( float _Complex x ) { return catanhf( x ); } 268 static inline double _Complex atanh( double _Complex x ) { return catanh( x ); } 269 static inline long double _Complex atanh( long double _Complex x ) { return catanhl( x ); } 227 long double atanh( long double ); 228 float _Complex atanh( float _Complex ); 229 double _Complex atanh( double _Complex ); 230 long double _Complex atanh( long double _Complex ); 270 231 271 232 //---------------------- Error / Gamma ---------------------- 272 233 273 static inline float erf( float x ) { return erff( x ); } 234 float erf( float ); 274 235 // extern "C" { double erf( double ); } 275 static inline long double erf( long double x ) { return erfl( x ); } 236 long double erf( long double ); 276 237 // float _Complex erf( float _Complex ); 277 238 // double _Complex erf( double _Complex ); 278 239 // long double _Complex erf( long double _Complex ); 279 240 280 static inline float erfc( float x ) { return erfcf( x ); } 241 float erfc( float ); 281 242 // extern "C" { double erfc( double ); } 282 static inline long double erfc( long double x ) { return erfcl( x ); } 243 long double erfc( long double ); 283 244 // float _Complex erfc( float _Complex ); 284 245 // double _Complex erfc( double _Complex ); 285 246 // long double _Complex erfc( long double _Complex ); 286 247 287 static inline float lgamma( float x ) { return lgammaf( x ); } 248 float lgamma( float ); 288 249 // extern "C" { double lgamma( double ); } 289 static inline long double lgamma( long double x ) { return lgammal( x ); } 290 static inline float lgamma( float x, int * sign ) { return lgammaf_r( x, sign ); } 291 static inline double lgamma( double x, int * sign ) { return lgamma_r( x, sign ); } 292 static inline long double lgamma( long double x, int * sign ) { return lgammal_r( x, sign ); } 293 294 static inline float tgamma( float x ) { return tgammaf( x ); } 250 long double lgamma( long double ); 251 float lgamma( float, int * ); 252 double lgamma( double, int * ); 253 long double lgamma( long double, int * ); 254 255 float tgamma( float ); 295 256 // extern "C" { double tgamma( double ); } 296 static inline long double tgamma( long double x ) { return tgammal( x ); } 257 long double tgamma( long double ); 297 258 298 259 //---------------------- Nearest Integer ---------------------- 299 260 300 static inline float floor( float x ) { return floorf( x ); } 261 float floor( float ); 301 262 // extern "C" { double floor( double ); } 302 static inline long double floor( long double x ) { return floorl( x ); } 303 304 static inline float ceil( float x ) { return ceilf( x ); } 263 long double floor( long double ); 264 265 float ceil( float ); 305 266 // extern "C" { double ceil( double ); } 306 static inline long double ceil( long double x ) { return ceill( x ); } 307 308 static inline float trunc( float x ) { return truncf( x ); } 267 long double ceil( long double ); 268 269 float trunc( float ); 309 270 // extern "C" { double trunc( double ); } 310 static inline long double trunc( long double x ) { return truncl( x ); } 311 312 static inline float rint( float x ) { return rintf( x ); } 313 // extern "C" { double rint( double x ); } 314 static inline long double rint( long double x ) { return rintl( x ); } 315 static inline long int rint( float x ) { return lrintf( x ); } 316 static inline long int rint( double x ) { return lrint( x ); } 317 static inline long int rint( long double x ) { return lrintl( x ); } 318 static inline long long int rint( float x ) { return llrintf( x ); } 319 static inline long long int rint( double x ) { return llrint( x ); } 320 static inline long long int rint( long double x ) { return llrintl( x ); } 321 322 static inline long int lrint( float x ) { return lrintf( x ); } 271 long double trunc( long double ); 272 273 float rint( float ); 274 long double rint( long double ); 275 long int rint( float ); 276 long int rint( double ); 277 long int rint( long double ); 278 long long int rint( float ); 279 long long int rint( double ); 280 long long int rint( long double ); 281 282 long int lrint( float ); 323 283 // extern "C" { long int lrint( double ); } 324 static inline long int lrint( long double x ) { return lrintl( x ); } 325 static inline long long int llrint( float x ) { return llrintf( x ); } 284 long int lrint( long double ); 285 long long int llrint( float ); 326 286 // extern "C" { long long int llrint( double ); } 327 static inline long long int llrint( long double x ) { return llrintl( x ); } 328 329 static inline float nearbyint( float x ) { return nearbyintf( x ); } 287 long long int llrint( long double ); 288 289 float nearbyint( float ); 330 290 // extern "C" { double nearbyint( double ); } 331 static inline long double nearbyint( long double x ) { return nearbyintl( x ); } 332 333 static inline float round( float x ) { return roundf( x ); } 334 // extern "C" { double round( double x ); } 335 static inline long double round( long double x ) { return roundl( x ); } 336 static inline long int round( float x ) { return lroundf( x ); } 337 static inline long int round( double x ) { return lround( x ); } 338 static inline long int round( long double x ) { return lroundl( x ); } 339 static inline long long int round( float x ) { return llroundf( x ); } 340 static inline long long int round( double x ) { return llround( x ); } 341 static inline long long int round( long double x ) { return llroundl( x ); } 342 343 static inline long int lround( float x ) { return lroundf( x ); } 291 long double nearbyint( long double ); 292 293 float round( float ); 294 long double round( long double ); 295 long int round( float ); 296 long int round( double ); 297 long int round( long double ); 298 long long int round( float ); 299 long long int round( double ); 300 long long int round( long double ); 301 302 long int lround( float ); 344 303 // extern "C" { long int lround( double ); } 345 static inline long int lround( long double x ) { return lroundl( x ); } 346 static inline long long int llround( float x ) { return llroundf( x ); } 304 long int lround( long double ); 305 long long int llround( float ); 347 306 // extern "C" { long long int llround( double ); } 348 static inline long long int llround( long double x ) { return llroundl( x ); } 307 long long int llround( long double ); 349 308 350 309 //---------------------- Manipulation ---------------------- 351 310 352 static inline float copysign( float x, float y ) { return copysignf( x, y ); } 311 float copysign( float, float ); 353 312 // extern "C" { double copysign( double, double ); } 354 static inline long double copysign( long double x, long double y ) { return copysignl( x, y ); } 355 356 static inline float frexp( float x, int * ip ) { return frexpf( x, ip ); } 313 long double copysign( long double, long double ); 314 315 float frexp( float, int * ); 357 316 // extern "C" { double frexp( double, int * ); } 358 static inline long double frexp( long double x, int * ip ) { return frexpl( x, ip ); } 359 360 static inline float ldexp( float x, int exp2 ) { return ldexpf( x, exp2 ); } 317 long double frexp( long double, int * ); 318 319 float ldexp( float, int ); 361 320 // extern "C" { double ldexp( double, int ); } 362 static inline long double ldexp( long double x, int exp2 ) { return ldexpl( x, exp2 ); } 363 364 static inline [ float, float ] modf( float x ) { float i; x = modff( x, &i ); return [ i, x ]; } 365 static inline float modf( float x, float * i ) { return modff( x, i ); } 366 static inline [ double, double ] modf( double x ) { double i; x = modf( x, &i ); return [ i, x ]; } 321 long double ldexp( long double, int ); 322 323 [ float, float ] modf( float ); 324 float modf( float, float * ); 325 [ double, double ] modf( double ); 367 326 // extern "C" { double modf( double, double * ); } 368 static inline [ long double, long double ] modf( long double x ) { long double i; x = modfl( x, &i ); return [ i, x ]; } 369 static inline long double modf( long double x, long double * i ) { return modfl( x, i ); } 370 371 static inline float nextafter( float x, float y ) { return nextafterf( x, y ); } 327 [ long double, long double ] modf( long double ); 328 long double modf( long double, long double * ); 329 330 float nextafter( float, float ); 372 331 // extern "C" { double nextafter( double, double ); } 373 static inline long double nextafter( long double x, long double y ) { return nextafterl( x, y ); } 374 375 static inline float nexttoward( float x, long double y ) { return nexttowardf( x, y ); } 332 long double nextafter( long double, long double ); 333 334 float nexttoward( float, long double ); 376 335 // extern "C" { double nexttoward( double, long double ); } 377 static inline long double nexttoward( long double x, long double y ) { return nexttowardl( x, y ); } 378 379 static inline float scalbn( float x, int exp ) { return scalbnf( x, exp ); } 336 long double nexttoward( long double, long double ); 337 338 float scalbn( float, int ); 380 339 // extern "C" { double scalbn( double, int ); } 381 static inline long double scalbn( long double x, int exp ) { return scalbnl( x, exp ); } 382 static inline float scalbn( float x, long int exp ) { return scalblnf( x, exp ); } 383 static inline double scalbn( double x, long int exp ) { return scalbln( x, exp ); } 384 static inline long double scalbn( long double x, long int exp ) { return scalblnl( x, exp ); } 385 386 static inline float scalbln( float x, long int exp ) { return scalblnf( x, exp ); } 340 long double scalbn( long double, int ); 341 342 float scalbln( float, long int ); 387 343 // extern "C" { double scalbln( double, long int ); } 388 static inline long double scalbln( long double x, long int exp ) { return scalblnl( x, exp ); } 344 long double scalbln( long double, long int ); 389 345 390 346 // Local Variables: // -
src/libcfa/startup.h
r21a5dde1 re1e4aa9 1 // -*- Mode: CFA -*- 1 2 // 2 3 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo … … 9 10 // Author : Thierry Delisle 10 11 // Created On : Wed Mar 29 15:56:41 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 20 21:37:11 201713 // Update Count : 212 // Last Modified By : 13 // Last Modified On : 14 // Update Count : 0 14 15 // 15 16 16 #pragma once 17 #ifndef STARTUP_H 18 #define STARTUP_H 17 19 18 20 #if GCC_VERSION > 50000 … … 32 34 #endif 33 35 34 // Local Variables: // 35 // mode: c // 36 // tab-width: 4 // 37 // End: // 36 #endif //STARTUP_H -
src/libcfa/stdhdr/assert.h
r21a5dde1 re1e4aa9 10 10 // Created On : Mon Jul 4 23:25:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Jul 20 21:06:48 201713 // Update Count : 1112 // Last Modified On : Tue Jul 5 20:34:23 2016 13 // Update Count : 8 14 14 // 15 15 … … 18 18 #endif //__CFORALL__ 19 19 20 // has internal check for multiple expansion 20 21 #include_next <assert.h> 21 22 #ifdef NDEBUG23 #define assertf( expr, fmt, ... ) ((void)0)24 #else25 #define __STRINGIFY__(str) #str26 #define __VSTRINGIFY__(str) __STRINGIFY__(str)27 #define assertf(expr, fmt, ...) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))28 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));29 #endif30 22 31 23 #ifdef __CFORALL__ -
src/libcfa/stdhdr/gmp.h
r21a5dde1 re1e4aa9 1 // -*- Mode: C -*- 1 2 // 2 3 // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo … … 10 11 // Created On : Sun May 14 23:46:01 2017 11 12 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 18:10:52201713 // Update Count : 413 // Last Modified On : Sun May 14 23:46:34 2017 14 // Update Count : 1 14 15 // 15 16 -
src/libcfa/stdlib
r21a5dde1 re1e4aa9 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 14:32:37201713 // Update Count : 2 2012 // Last Modified On : Fri Jul 7 09:34:49 2017 13 // Update Count : 219 14 14 // 15 15 … … 18 18 //--------------------------------------- 19 19 20 extern "C" { 20 21 #ifndef EXIT_FAILURE 21 22 #define EXIT_FAILURE 1 // failing exit status 22 23 #define EXIT_SUCCESS 0 // successful exit status 23 24 #endif // ! EXIT_FAILURE 25 } // extern "C" 24 26 25 27 //--------------------------------------- -
src/libcfa/stdlib.c
r21a5dde1 re1e4aa9 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Ju l 20 16:01:40201713 // Update Count : 28 212 // Last Modified On : Thu Jun 1 21:52:57 2017 13 // Update Count : 280 14 14 // 15 15 … … 18 18 //--------------------------------------- 19 19 20 extern "C" { 20 21 #define _XOPEN_SOURCE 600 // posix_memalign, *rand48 21 22 #include <stdlib.h> // malloc, free, calloc, realloc, memalign, posix_memalign, bsearch … … 24 25 #include <math.h> // fabsf, fabs, fabsl 25 26 #include <complex.h> // _Complex_I 27 } // extern "C" 26 28 27 29 // resize, non-array types -
src/tests/.expect/64/math.txt
r21a5dde1 re1e4aa9 9 9 exp2:2 2 2 10 10 expm1:1.71828 1.71828182845905 1.71828182845904524 11 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i12 16 25613 2.84884707637596e+18 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i14 11 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i 15 12 log2:3 3 3 … … 21 18 cbrt:3 3 3 22 19 hypot:1.41421 1.4142135623731 1.41421356237309505 20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i 23 21 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 24 22 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i -
src/tests/alloc.c
r21a5dde1 re1e4aa9 10 10 // Created On : Wed Feb 3 07:56:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 16:01:10201713 // Update Count : 31 812 // Last Modified On : Fri Jun 2 15:13:03 2017 13 // Update Count : 316 14 14 // 15 15 16 #include <assert.h> 16 #include <assert> 17 extern "C" { 17 18 #include <malloc.h> // malloc_usable_size 18 19 #include <stdint.h> // uintptr_t 19 20 #include <stdlib.h> // posix_memalign 21 } // extern 20 22 #include <fstream> 21 23 #include <stdlib> // access C malloc, realloc -
src/tests/math.c
r21a5dde1 re1e4aa9 10 10 // Created On : Fri Apr 22 14:59:21 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 21:14:08201713 // Update Count : 7 212 // Last Modified On : Wed May 24 13:04:33 2017 13 // Update Count : 71 14 14 // 15 15 … … 46 46 sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl; 47 47 sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl; 48 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;49 50 int b = 4;51 unsigned int e = 2;52 b \= e;53 sout | b | b \ e | endl;54 sout | 'a' \ 'b' | 2 \ 8u | 4 \ 3u | -4 \ 3u | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi) | endl;55 56 //---------------------- Logarithm ----------------------57 58 48 sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ) | endl; 59 49 sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl; … … 63 53 sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl; 64 54 55 //---------------------- Power ---------------------- 56 65 57 sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ) | endl; 66 58 sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl; 67 59 sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl; 60 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; 68 61 69 62 //---------------------- Trigonometric ---------------------- -
src/tests/maybe.c
r21a5dde1 re1e4aa9 9 9 // Author : Andrew Beach 10 10 // Created On : Thr May 25 16:02:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 20 15:24:07201713 // Update Count : 111 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri May 16 15:43:00 2017 13 // Update Count : 0 14 14 // 15 15 16 #include <assert .h>16 #include <assert> 17 17 #include <containers/maybe> 18 18 -
src/tests/result.c
r21a5dde1 re1e4aa9 9 9 // Author : Andrew Beach 10 10 // Created On : Thr May 25 16:50:00 2017 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 20 15:24:12201713 // Update Count : 111 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Jun 16 15:42:00 2017 13 // Update Count : 0 14 14 // 15 15 16 #include <assert .h>16 #include <assert> 17 17 #include <containers/result> 18 18
Note:
See TracChangeset
for help on using the changeset viewer.