diff options
Diffstat (limited to '2.3-1/src/c/statisticsFunctions/sum')
20 files changed, 2635 insertions, 0 deletions
diff --git a/2.3-1/src/c/statisticsFunctions/sum/Makefile.am b/2.3-1/src/c/statisticsFunctions/sum/Makefile.am new file mode 100644 index 00000000..0fd79658 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/Makefile.am @@ -0,0 +1,65 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSum_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSum.la + +libSum_la_SOURCES = $(HEAD) $(SRC) + +SRC = ssuma.c \ + srowsuma.c \ + scolumnsuma.c \ + dsuma.c \ + drowsuma.c \ + dcolumnsuma.c \ + csuma.c \ + crowsuma.c \ + ccolumnsuma.c \ + zsuma.c \ + zrowsuma.c \ + zcolumnsuma.c + +HEAD = ../includes/sum.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatSum testDoubleSum + +TESTS = testFloatSum testDoubleSum + +# +# -*- Sum Tests -*- +# +testFloatSum_SOURCES = testFloatSum.c +testFloatSum_CFLAGS = $(check_INCLUDES) +testFloatSum_LDADD = $(check_LDADD) + +testDoubleSum_SOURCES =testDoubleSum.c +testDoubleSum_CFLAGS = $(check_INCLUDES) +testDoubleSum_LDADD = $(check_LDADD)
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/Makefile.in b/2.3-1/src/c/statisticsFunctions/sum/Makefile.in new file mode 100644 index 00000000..f3d5a853 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/Makefile.in @@ -0,0 +1,831 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatSum$(EXEEXT) testDoubleSum$(EXEEXT) +TESTS = testFloatSum$(EXEEXT) testDoubleSum$(EXEEXT) +subdir = src/c/statisticsFunctions/sum +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSum_la_LIBADD = +am__objects_1 = +am__objects_2 = libSum_la-ssuma.lo libSum_la-srowsuma.lo \ + libSum_la-scolumnsuma.lo libSum_la-dsuma.lo \ + libSum_la-drowsuma.lo libSum_la-dcolumnsuma.lo \ + libSum_la-csuma.lo libSum_la-crowsuma.lo \ + libSum_la-ccolumnsuma.lo libSum_la-zsuma.lo \ + libSum_la-zrowsuma.lo libSum_la-zcolumnsuma.lo +am_libSum_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libSum_la_OBJECTS = $(am_libSum_la_OBJECTS) +libSum_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSum_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleSum_OBJECTS = testDoubleSum-testDoubleSum.$(OBJEXT) +testDoubleSum_OBJECTS = $(am_testDoubleSum_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la +testDoubleSum_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleSum_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSum_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatSum_OBJECTS = testFloatSum-testFloatSum.$(OBJEXT) +testFloatSum_OBJECTS = $(am_testFloatSum_OBJECTS) +testFloatSum_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatSum_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSum_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSum_la_SOURCES) $(testDoubleSum_SOURCES) \ + $(testFloatSum_SOURCES) +DIST_SOURCES = $(libSum_la_SOURCES) $(testDoubleSum_SOURCES) \ + $(testFloatSum_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSum_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSum.la +libSum_la_SOURCES = $(HEAD) $(SRC) +SRC = ssuma.c \ + srowsuma.c \ + scolumnsuma.c \ + dsuma.c \ + drowsuma.c \ + dcolumnsuma.c \ + csuma.c \ + crowsuma.c \ + ccolumnsuma.c \ + zsuma.c \ + zrowsuma.c \ + zcolumnsuma.c + +HEAD = ../includes/sum.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + @LIBMATH@ + + +# +# -*- Sum Tests -*- +# +testFloatSum_SOURCES = testFloatSum.c +testFloatSum_CFLAGS = $(check_INCLUDES) +testFloatSum_LDADD = $(check_LDADD) +testDoubleSum_SOURCES = testDoubleSum.c +testDoubleSum_CFLAGS = $(check_INCLUDES) +testDoubleSum_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/sum/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/sum/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSum.la: $(libSum_la_OBJECTS) $(libSum_la_DEPENDENCIES) + $(libSum_la_LINK) -rpath $(pkglibdir) $(libSum_la_OBJECTS) $(libSum_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleSum$(EXEEXT): $(testDoubleSum_OBJECTS) $(testDoubleSum_DEPENDENCIES) + @rm -f testDoubleSum$(EXEEXT) + $(testDoubleSum_LINK) $(testDoubleSum_OBJECTS) $(testDoubleSum_LDADD) $(LIBS) +testFloatSum$(EXEEXT): $(testFloatSum_OBJECTS) $(testFloatSum_DEPENDENCIES) + @rm -f testFloatSum$(EXEEXT) + $(testFloatSum_LINK) $(testFloatSum_OBJECTS) $(testFloatSum_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-ccolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-crowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-csuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-dcolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-drowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-dsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-scolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-srowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-ssuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-zcolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-zrowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-zsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSum-testDoubleSum.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSum-testFloatSum.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSum_la-ssuma.lo: ssuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-ssuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-ssuma.Tpo -c -o libSum_la-ssuma.lo `test -f 'ssuma.c' || echo '$(srcdir)/'`ssuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-ssuma.Tpo $(DEPDIR)/libSum_la-ssuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssuma.c' object='libSum_la-ssuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-ssuma.lo `test -f 'ssuma.c' || echo '$(srcdir)/'`ssuma.c + +libSum_la-srowsuma.lo: srowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-srowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-srowsuma.Tpo -c -o libSum_la-srowsuma.lo `test -f 'srowsuma.c' || echo '$(srcdir)/'`srowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-srowsuma.Tpo $(DEPDIR)/libSum_la-srowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowsuma.c' object='libSum_la-srowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-srowsuma.lo `test -f 'srowsuma.c' || echo '$(srcdir)/'`srowsuma.c + +libSum_la-scolumnsuma.lo: scolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-scolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-scolumnsuma.Tpo -c -o libSum_la-scolumnsuma.lo `test -f 'scolumnsuma.c' || echo '$(srcdir)/'`scolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-scolumnsuma.Tpo $(DEPDIR)/libSum_la-scolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnsuma.c' object='libSum_la-scolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-scolumnsuma.lo `test -f 'scolumnsuma.c' || echo '$(srcdir)/'`scolumnsuma.c + +libSum_la-dsuma.lo: dsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-dsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-dsuma.Tpo -c -o libSum_la-dsuma.lo `test -f 'dsuma.c' || echo '$(srcdir)/'`dsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-dsuma.Tpo $(DEPDIR)/libSum_la-dsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsuma.c' object='libSum_la-dsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-dsuma.lo `test -f 'dsuma.c' || echo '$(srcdir)/'`dsuma.c + +libSum_la-drowsuma.lo: drowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-drowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-drowsuma.Tpo -c -o libSum_la-drowsuma.lo `test -f 'drowsuma.c' || echo '$(srcdir)/'`drowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-drowsuma.Tpo $(DEPDIR)/libSum_la-drowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowsuma.c' object='libSum_la-drowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-drowsuma.lo `test -f 'drowsuma.c' || echo '$(srcdir)/'`drowsuma.c + +libSum_la-dcolumnsuma.lo: dcolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-dcolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-dcolumnsuma.Tpo -c -o libSum_la-dcolumnsuma.lo `test -f 'dcolumnsuma.c' || echo '$(srcdir)/'`dcolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-dcolumnsuma.Tpo $(DEPDIR)/libSum_la-dcolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnsuma.c' object='libSum_la-dcolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-dcolumnsuma.lo `test -f 'dcolumnsuma.c' || echo '$(srcdir)/'`dcolumnsuma.c + +libSum_la-csuma.lo: csuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-csuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-csuma.Tpo -c -o libSum_la-csuma.lo `test -f 'csuma.c' || echo '$(srcdir)/'`csuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-csuma.Tpo $(DEPDIR)/libSum_la-csuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csuma.c' object='libSum_la-csuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-csuma.lo `test -f 'csuma.c' || echo '$(srcdir)/'`csuma.c + +libSum_la-crowsuma.lo: crowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-crowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-crowsuma.Tpo -c -o libSum_la-crowsuma.lo `test -f 'crowsuma.c' || echo '$(srcdir)/'`crowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-crowsuma.Tpo $(DEPDIR)/libSum_la-crowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowsuma.c' object='libSum_la-crowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-crowsuma.lo `test -f 'crowsuma.c' || echo '$(srcdir)/'`crowsuma.c + +libSum_la-ccolumnsuma.lo: ccolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-ccolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-ccolumnsuma.Tpo -c -o libSum_la-ccolumnsuma.lo `test -f 'ccolumnsuma.c' || echo '$(srcdir)/'`ccolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-ccolumnsuma.Tpo $(DEPDIR)/libSum_la-ccolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnsuma.c' object='libSum_la-ccolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-ccolumnsuma.lo `test -f 'ccolumnsuma.c' || echo '$(srcdir)/'`ccolumnsuma.c + +libSum_la-zsuma.lo: zsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-zsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-zsuma.Tpo -c -o libSum_la-zsuma.lo `test -f 'zsuma.c' || echo '$(srcdir)/'`zsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-zsuma.Tpo $(DEPDIR)/libSum_la-zsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsuma.c' object='libSum_la-zsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-zsuma.lo `test -f 'zsuma.c' || echo '$(srcdir)/'`zsuma.c + +libSum_la-zrowsuma.lo: zrowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-zrowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-zrowsuma.Tpo -c -o libSum_la-zrowsuma.lo `test -f 'zrowsuma.c' || echo '$(srcdir)/'`zrowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-zrowsuma.Tpo $(DEPDIR)/libSum_la-zrowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowsuma.c' object='libSum_la-zrowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-zrowsuma.lo `test -f 'zrowsuma.c' || echo '$(srcdir)/'`zrowsuma.c + +libSum_la-zcolumnsuma.lo: zcolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-zcolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-zcolumnsuma.Tpo -c -o libSum_la-zcolumnsuma.lo `test -f 'zcolumnsuma.c' || echo '$(srcdir)/'`zcolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-zcolumnsuma.Tpo $(DEPDIR)/libSum_la-zcolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnsuma.c' object='libSum_la-zcolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-zcolumnsuma.lo `test -f 'zcolumnsuma.c' || echo '$(srcdir)/'`zcolumnsuma.c + +testDoubleSum-testDoubleSum.o: testDoubleSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -MT testDoubleSum-testDoubleSum.o -MD -MP -MF $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo -c -o testDoubleSum-testDoubleSum.o `test -f 'testDoubleSum.c' || echo '$(srcdir)/'`testDoubleSum.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo $(DEPDIR)/testDoubleSum-testDoubleSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSum.c' object='testDoubleSum-testDoubleSum.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -c -o testDoubleSum-testDoubleSum.o `test -f 'testDoubleSum.c' || echo '$(srcdir)/'`testDoubleSum.c + +testDoubleSum-testDoubleSum.obj: testDoubleSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -MT testDoubleSum-testDoubleSum.obj -MD -MP -MF $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo -c -o testDoubleSum-testDoubleSum.obj `if test -f 'testDoubleSum.c'; then $(CYGPATH_W) 'testDoubleSum.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSum.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo $(DEPDIR)/testDoubleSum-testDoubleSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSum.c' object='testDoubleSum-testDoubleSum.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -c -o testDoubleSum-testDoubleSum.obj `if test -f 'testDoubleSum.c'; then $(CYGPATH_W) 'testDoubleSum.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSum.c'; fi` + +testFloatSum-testFloatSum.o: testFloatSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -MT testFloatSum-testFloatSum.o -MD -MP -MF $(DEPDIR)/testFloatSum-testFloatSum.Tpo -c -o testFloatSum-testFloatSum.o `test -f 'testFloatSum.c' || echo '$(srcdir)/'`testFloatSum.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSum-testFloatSum.Tpo $(DEPDIR)/testFloatSum-testFloatSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSum.c' object='testFloatSum-testFloatSum.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -c -o testFloatSum-testFloatSum.o `test -f 'testFloatSum.c' || echo '$(srcdir)/'`testFloatSum.c + +testFloatSum-testFloatSum.obj: testFloatSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -MT testFloatSum-testFloatSum.obj -MD -MP -MF $(DEPDIR)/testFloatSum-testFloatSum.Tpo -c -o testFloatSum-testFloatSum.obj `if test -f 'testFloatSum.c'; then $(CYGPATH_W) 'testFloatSum.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSum.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSum-testFloatSum.Tpo $(DEPDIR)/testFloatSum-testFloatSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSum.c' object='testFloatSum-testFloatSum.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -c -o testFloatSum-testFloatSum.obj `if test -f 'testFloatSum.c'; then $(CYGPATH_W) 'testFloatSum.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSum.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c new file mode 100644 index 00000000..64018cdc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void ccolumnsuma(floatComplex *in, int lines, int columns, floatComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] = cadds(out[i % lines] , in[i]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/crowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/crowsuma.c new file mode 100644 index 00000000..aaf3c592 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/crowsuma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void crowsuma(floatComplex *in, int lines, int columns, floatComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] = cadds( out[(i - 1) % columns] , + in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/csuma.c b/2.3-1/src/c/statisticsFunctions/sum/csuma.c new file mode 100644 index 00000000..68ebb291 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/csuma.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +floatComplex csuma(floatComplex *in, int size) { + floatComplex accumulate = FloatComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = cadds(accumulate, in[i]); + } + return accumulate; +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c new file mode 100644 index 00000000..1f9b479d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void dcolumnsuma(double *in, int lines, int columns, double * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] += in[i]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/drowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/drowsuma.c new file mode 100644 index 00000000..f5e2ed34 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/drowsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void drowsuma(double *in, int lines, int columns, double *out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] += in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/dsuma.c b/2.3-1/src/c/statisticsFunctions/sum/dsuma.c new file mode 100644 index 00000000..eddceb6f --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/dsuma.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +double dsuma(double *in, int size) { + double accumulate = 0.0; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate; + +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c new file mode 100644 index 00000000..4d2415f2 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void scolumnsuma(float *in, int lines, int columns, float * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] += in[i]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/srowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/srowsuma.c new file mode 100644 index 00000000..3f20661a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/srowsuma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void srowsuma(float *in, int lines, int columns, float * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] += in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]; + } +} + diff --git a/2.3-1/src/c/statisticsFunctions/sum/ssuma.c b/2.3-1/src/c/statisticsFunctions/sum/ssuma.c new file mode 100644 index 00000000..aabc7fe0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/ssuma.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +float ssuma(float *in, int size) { + float accumulate = 0.0f; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate; + +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c b/2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c new file mode 100644 index 00000000..b411a7de --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c @@ -0,0 +1,493 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include <assert.h> +#include <stdio.h> +#include <math.h> +#include "sum.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dsumsTest(void) { + double value1 = 3.0; + double value2 = 1.123456789; + + printf("\n>>>> Sum Double Scalar Test\n"); + assert(dsums(value1) == 3.0); + assert(dsums(value2) == 1.123456789); + + return 0; +} + +static int dsumaTest(void) { + double table1[3] = {3.0, 3.0, 3.0}; + double table2[5] = {9.186784563, + 9.186784563, + 9.186784563, + 9.186784563, + 9.186784563}; + + printf("\n>>>> Sum Double Array Test\n"); + assert(dsuma(table1, 3) == 9.0); + assert((dsuma(table2, 5) - (9.186784653 + 9.186785634 + 9.186784563 + 9.186784563 + 9.186784563)) < 3e-16); + return 0; +} + +static int dcolumnsumaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double columnSummedTable1_3_3[3] = {0}; + double columnSummedTable1_1_9[1] = {0}; + double columnSummedTable1_9_1[9] = {0}; + double columnSummedTable2_2_5[2] = {0}; + double columnSummedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Sum Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + dcolumnsuma(table1, 3, 3,columnSummedTable1_3_3); + assert(columnSummedTable1_3_3[0] == 6.0); + assert(columnSummedTable1_3_3[1] == 15.0); + assert(columnSummedTable1_3_3[2] == 24.0); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + dcolumnsuma(table1, 1, 9,columnSummedTable1_1_9); + assert(columnSummedTable1_1_9[0] == 45.0); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + dcolumnsuma(table1, 9, 1,columnSummedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnSummedTable1_9_1[%d] = %e\n", i, columnSummedTable1_9_1[i]); + assert(columnSummedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + dcolumnsuma(table2, 2, 5,columnSummedTable2_2_5); + assert(columnSummedTable2_2_5[0] == 25.0); + assert(columnSummedTable2_2_5[1] == 30.0); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnSummedTable2_2_5[%d] = %e\n", i, columnSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + dcolumnsuma(table2, 5, 2,columnSummedTable2_5_2); + assert(columnSummedTable2_5_2[0] == 7.0); + assert(columnSummedTable2_5_2[1] == 9.0); + assert(columnSummedTable2_5_2[2] == 11.0); + assert(columnSummedTable2_5_2[3] == 13.0); + assert(columnSummedTable2_5_2[4] == 15.0); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnSummedTable2_5_2[%d] = %e\n", i, columnSummedTable2_5_2[i]); + } + + return 0; +} + +static int drowsumaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double rowSummedTable1_3_3[3] = {0}; + double rowSummedTable1_1_9[9] = {0}; + double rowSummedTable1_9_1[1] = {0}; + double rowSummedTable2_2_5[5] = {0}; + double rowSummedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Sum Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + drowsuma(table1, 3, 3,rowSummedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowSummedTable1_3_3[%d] = %e\n", i, rowSummedTable1_3_3[i]); + } + assert(rowSummedTable1_3_3[0] == 12.0); + assert(rowSummedTable1_3_3[1] == 15.0); + assert(rowSummedTable1_3_3[2] == 18.0); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + drowsuma(table1, 1, 9,rowSummedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowSummedTable1_1_9[%d] = %e\n", i, rowSummedTable1_1_9[i]); + assert(rowSummedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + drowsuma(table1, 9, 1,rowSummedTable1_9_1); + assert(rowSummedTable1_9_1[0] == 45.0); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + drowsuma(table2, 2, 5,rowSummedTable2_2_5); + assert(rowSummedTable2_2_5[0] == 3.0); + assert(rowSummedTable2_2_5[1] == 7.0); + assert(rowSummedTable2_2_5[2] == 11.0); + assert(rowSummedTable2_2_5[3] == 15.0); + assert(rowSummedTable2_2_5[4] == 19.0); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowSummedTable2_2_5[%d] = %e\n", i, rowSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + drowsuma(table2, 5, 2,rowSummedTable2_5_2); + assert(rowSummedTable2_5_2[0] == 15.0); + assert(rowSummedTable2_5_2[1] == 40.0); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowSummedTable2_5_2[%d] = %e\n", i, rowSummedTable2_5_2[i]); + } + + return 0; +} + +static int zsumsTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex value2 = DoubleComplex(1.123456789, 1.123456789); + + printf("\n>>>> Sum Double Complex Scalar Test\n"); + assert(zreals(zsums(value1)) == 3.0); + assert(zimags(zsums(value1)) == 3.0); + assert(zreals(zsums(value2)) == 1.123456789); + assert(zimags(zsums(value2)) == 1.123456789); + return 0; +} + +static int zsumaTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex table1[3]; + doubleComplex value2 = DoubleComplex(9.186784563,9.186784563); + doubleComplex table2[5]; + + printf("\n>>>> Sum Double Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", zimags(zsuma(table1, 3))); + printf("%e\n", zreals(zsuma(table2, 5))); + printf("%e\n", zimags(zsuma(table2, 5))); + printf("%e\n", zreals(zsuma(table2, 5))); + printf("%e\n", zimags(zsuma(table2, 5))); + printf("--------\n"); +#endif + assert(zreals(zsuma(table1, 3)) == 9.0); + assert(zimags(zsuma(table1, 3)) == 9.0); + assert(zreals(zsuma(table2, 5)) == 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563); + assert(zimags(zsuma(table2, 5)) == 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563); + + return 0; +} + +static int zrowsumaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex rowSummedIn_4_3[3]; + doubleComplex rowSummedIn_3_4[4]; + doubleComplex rowSummedIn_6_2[2]; + doubleComplex rowSummedIn_2_6[6]; + doubleComplex rowSummedIn_1_12[12]; + doubleComplex rowSummedIn_12_1[1]; + + printf("\n>>>> Row Sum Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zrowsuma(in, 4, 3, rowSummedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowSummedIn_4_3[%d] = %e + %ei\n", i, zreals(rowSummedIn_4_3[i]), zimags(rowSummedIn_4_3[i])); + } + assert(fabs(zreals(rowSummedIn_4_3[0]) -0.6) < 2e-16); + assert(zimags(rowSummedIn_4_3[0]) == 3.8); + assert(zreals(rowSummedIn_4_3[1]) == 2.2); + assert(fabs(zimags(rowSummedIn_4_3[1]) - 2.2) < 1e-15); + assert(fabs(zreals(rowSummedIn_4_3[2]) - 3.8) < 1e-15); + assert(zimags(rowSummedIn_4_3[2]) == 0.6); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zrowsuma(in, 3, 4, rowSummedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowSummedIn_3_4[%d] = %e + %ei\n", i, zreals(rowSummedIn_3_4[i]), zimags(rowSummedIn_3_4[i])); + } + assert(fabs(zreals(rowSummedIn_3_4[0]) - 0.3) < 1e-16); + assert(zimags(rowSummedIn_3_4[0]) == 3.0); + assert(zreals(rowSummedIn_3_4[1]) == 1.2 && zimags(rowSummedIn_3_4[1]) == 2.1); + assert(fabs(zreals(rowSummedIn_3_4[2]) - 2.1) < 1e-15); + assert(zimags(rowSummedIn_3_4[2]) == 1.2); + assert(zreals(rowSummedIn_3_4[3]) == 3.0); + assert(fabs(zimags(rowSummedIn_3_4[3]) - 0.3) < 1e-16); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zrowsuma(in, 6, 2, rowSummedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowSummedIn_6_2[%d] = %e + %ei\n", i, zreals(rowSummedIn_6_2[i]), zimags(rowSummedIn_6_2[i])); + } + assert(zreals(rowSummedIn_6_2[0]) == 1.5 && zimags(rowSummedIn_6_2[0]) == 5.1); + assert(zreals(rowSummedIn_6_2[1]) == 5.1 && zimags(rowSummedIn_6_2[1]) == 1.5); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + zrowsuma(in, 2, 6, rowSummedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowSummedIn_2_6[%d] = %e + %ei\n", i, zreals(rowSummedIn_2_6[i]), zimags(rowSummedIn_2_6[i])); + } + assert(zreals(rowSummedIn_2_6[0]) == 0.1 && zimags(rowSummedIn_2_6[0]) == 2.1); + assert(zreals(rowSummedIn_2_6[1]) == 0.5); + assert(fabs(zimags(rowSummedIn_2_6[1]) - 1.7) < 3e-16); + assert(zreals(rowSummedIn_2_6[2]) == 0.9); + assert(fabs(zimags(rowSummedIn_2_6[2]) - 1.3) < 3e-16); + assert(fabs(zreals(rowSummedIn_2_6[3]) - 1.3) < 3e-16); + assert(zimags(rowSummedIn_2_6[3]) == 0.9); + assert(fabs(zreals(rowSummedIn_2_6[4]) - 1.7) < 3e-16); + assert(zimags(rowSummedIn_2_6[4]) == 0.5); + assert(zreals(rowSummedIn_2_6[5]) == 2.1 && zimags(rowSummedIn_2_6[5]) == 0.1); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + zrowsuma(in, 1, 12, rowSummedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowSummedIn_1_12[%d] = %e + %ei\n", i, zreals(rowSummedIn_1_12[i]), zimags(rowSummedIn_1_12[i])); + assert(zreals(rowSummedIn_1_12[i]) == zreals(in[i]) && zimags(rowSummedIn_1_12[i]) == zimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zrowsuma(in, 12, 1, rowSummedIn_12_1); + printf("rowSummedIn_12_1[%d] = %e + %ei\n", 0, zreals(rowSummedIn_12_1[0]), zimags(rowSummedIn_12_1[0])); + assert(zreals(rowSummedIn_12_1[0]) == 6.6 && zimags(rowSummedIn_12_1[0]) == 6.6); + + return 0; +} + +static int zcolumnsumaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex columnSummedIn_4_3[4]; + doubleComplex columnSummedIn_3_4[3]; + doubleComplex columnSummedIn_6_2[6]; + doubleComplex columnSummedIn_2_6[2]; + doubleComplex columnSummedIn_1_12[1]; + doubleComplex columnSummedIn_12_1[12]; + + printf("\n>>>> ColumnSum Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zcolumnsuma(in, 4, 3, columnSummedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnSummedIn_4_3[%d] = %e + %ei\n", i, zreals(columnSummedIn_4_3[i]), zimags(columnSummedIn_4_3[i])); + } + assert(fabs(zreals(columnSummedIn_4_3[0]) - 1.2) < 1e-15); + assert(zimags(columnSummedIn_4_3[0]) == 2.1); + assert(zreals(columnSummedIn_4_3[1]) == 1.5 && zimags(columnSummedIn_4_3[1]) == 1.8); + assert(zreals(columnSummedIn_4_3[2]) == 1.8 && zimags(columnSummedIn_4_3[2]) == 1.5); + assert(zreals(columnSummedIn_4_3[3]) == 2.1); + assert(fabs(zimags(columnSummedIn_4_3[3]) - 1.2) < 1e-15); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zcolumnsuma(in, 3, 4, columnSummedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnSummedIn_3_4[%d] = %e + %ei\n", i, zreals(columnSummedIn_3_4[i]), zimags(columnSummedIn_3_4[i])); + } + assert(fabs(zreals(columnSummedIn_3_4[0]) - 1.8) < 1e-15); + assert(fabs(zimags(columnSummedIn_3_4[0]) - 2.6) < 1e-15); + assert(zreals(columnSummedIn_3_4[1]) == 2.2 && zimags(columnSummedIn_3_4[1]) == 2.2); + assert(zreals(columnSummedIn_3_4[2]) == 2.6 && zimags(columnSummedIn_3_4[2]) == 1.8); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zcolumnsuma(in, 6, 2, columnSummedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnSummedIn_6_2[%d] = %e + %ei\n", i, zreals(columnSummedIn_6_2[i]), zimags(columnSummedIn_6_2[i])); + } + assert(zreals(columnSummedIn_6_2[0]) == 0.6 && zimags(columnSummedIn_6_2[0]) == 1.6); + assert(fabs(zreals(columnSummedIn_6_2[1]) - 0.8) < 1e-15); + assert(zimags(columnSummedIn_6_2[1]) == 1.4); + assert(zreals(columnSummedIn_6_2[2]) == 1.0 && zimags(columnSummedIn_6_2[2]) == 1.2); + assert(zreals(columnSummedIn_6_2[3]) == 1.2 && zimags(columnSummedIn_6_2[3]) == 1.0); + assert(zreals(columnSummedIn_6_2[4]) == 1.4); + assert(fabs(zimags(columnSummedIn_6_2[4]) - 0.8) < 1e-15); + assert(zreals(columnSummedIn_6_2[5]) == 1.6 && zimags(columnSummedIn_6_2[5]) == 0.6); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + zcolumnsuma(in, 2, 6, columnSummedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnSummedIn_2_6[%d] = %e + %ei\n", i, zreals(columnSummedIn_2_6[i]), zimags(columnSummedIn_2_6[i])); + } + assert(zreals(columnSummedIn_2_6[0]) == 3.0 && zimags(columnSummedIn_2_6[0]) == 3.6); + assert(zreals(columnSummedIn_2_6[1]) == 3.6 && zimags(columnSummedIn_2_6[1]) == 3.0); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + zcolumnsuma(in, 1, 12, columnSummedIn_1_12); + printf("columnSummedIn_1_12[%d] = %e + %ei\n", 0, zreals(columnSummedIn_1_12[0]), zimags(columnSummedIn_1_12[0])); + assert(zreals(columnSummedIn_1_12[0]) == 6.6 && zimags(columnSummedIn_1_12[0]) == 6.6); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zcolumnsuma(in, 12, 1, columnSummedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnSummedIn_12_1[%d] = %e + %ei\n", i, zreals(columnSummedIn_12_1[i]), zimags(columnSummedIn_12_1[i])); + assert(zreals(columnSummedIn_12_1[i]) == zreals(in[i]) && zimags(columnSummedIn_12_1[i]) == zimags(in[i])); + } + + return 0; +} + +static int testSum(void) { + + dsumsTest(); + dsumaTest(); + drowsumaTest(); + dcolumnsumaTest(); + zsumsTest(); + zsumaTest(); + zrowsumaTest(); + zcolumnsumaTest(); + + return 0; +} + +int main(void) { + assert(testSum() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c b/2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c new file mode 100644 index 00000000..090075c7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c @@ -0,0 +1,481 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include <assert.h> +#include <stdio.h> +#include <math.h> +#include "sum.h" + +/* #define LOCAL_DEBUG */ + +static int ssumsTest(void) { + float value1 = 3.0f; + float value2 = 1.123456789f; + + printf("\n>>>> Sum Float Scalar Test\n"); + assert(ssums(value1) == 3.0f); + assert(ssums(value2) == 1.123456789f); + + return 0; +} + +static int ssumaTest(void) { + float table1[3] = {3.0f, 3.0f, 3.0f}; + float table2[5] = {9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f}; + + printf("\n>>>> Sum Float Array Test\n"); + assert(ssuma(table1, 3) == 9.0f); + assert((ssuma(table2, 5) - (9.186784f + 9.186784f + 9.186784f + 9.186784f + 9.186784f)) / ssuma(table2, 5) < 1e-6); + return 0; +} + +static int scolumnsumaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float columnSummedTable1_3_3[3] = {0}; + float columnSummedTable1_1_9[1] = {0}; + float columnSummedTable1_9_1[9] = {0}; + float columnSummedTable2_2_5[2] = {0}; + float columnSummedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Sum Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + scolumnsuma(table1, 3, 3,columnSummedTable1_3_3); + assert(columnSummedTable1_3_3[0] == 6.0f); + assert(columnSummedTable1_3_3[1] == 15.0f); + assert(columnSummedTable1_3_3[2] == 24.0f); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + scolumnsuma(table1, 1, 9,columnSummedTable1_1_9); + assert(columnSummedTable1_1_9[0] == 45.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + scolumnsuma(table1, 9, 1,columnSummedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnSummedTable1_9_1[%d] = %e\n", i, columnSummedTable1_9_1[i]); + assert(columnSummedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + scolumnsuma(table2, 2, 5,columnSummedTable2_2_5); + assert(columnSummedTable2_2_5[0] == 25.0f); + assert(columnSummedTable2_2_5[1] == 30.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnSummedTable2_2_5[%d] = %e\n", i, columnSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + scolumnsuma(table2, 5, 2,columnSummedTable2_5_2); + assert(columnSummedTable2_5_2[0] == 7.0f); + assert(columnSummedTable2_5_2[1] == 9.0f); + assert(columnSummedTable2_5_2[2] == 11.0f); + assert(columnSummedTable2_5_2[3] == 13.0f); + assert(columnSummedTable2_5_2[4] == 15.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnSummedTable2_5_2[%d] = %e\n", i, columnSummedTable2_5_2[i]); + } + + return 0; +} + +static int srowsumaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float rowSummedTable1_3_3[3] = {0}; + float rowSummedTable1_1_9[9] = {0}; + float rowSummedTable1_9_1[1] = {0}; + float rowSummedTable2_2_5[5] = {0}; + float rowSummedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Sum Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + srowsuma(table1, 3, 3,rowSummedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowSummedTable1_3_3[%d] = %e\n", i, rowSummedTable1_3_3[i]); + } + assert(rowSummedTable1_3_3[0] == 12.0f); + assert(rowSummedTable1_3_3[1] == 15.0f); + assert(rowSummedTable1_3_3[2] == 18.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + srowsuma(table1, 1, 9,rowSummedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowSummedTable1_1_9[%d] = %e\n", i, rowSummedTable1_1_9[i]); + assert(rowSummedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + srowsuma(table1, 9, 1,rowSummedTable1_9_1); + assert(rowSummedTable1_9_1[0] == 45.0f); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + srowsuma(table2, 2, 5,rowSummedTable2_2_5); + assert(rowSummedTable2_2_5[0] == 3.0f); + assert(rowSummedTable2_2_5[1] == 7.0f); + assert(rowSummedTable2_2_5[2] == 11.0f); + assert(rowSummedTable2_2_5[3] == 15.0f); + assert(rowSummedTable2_2_5[4] == 19.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowSummedTable2_2_5[%d] = %e\n", i, rowSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + srowsuma(table2, 5, 2,rowSummedTable2_5_2); + assert(rowSummedTable2_5_2[0] == 15.0f); + assert(rowSummedTable2_5_2[1] == 40.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowSummedTable2_5_2[%d] = %e\n", i, rowSummedTable2_5_2[i]); + } + + return 0; +} + +static int csumsTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex value2 = FloatComplex(1.123456789f, 1.123456789f); + + printf("\n>>>> Sum Float Complex Scalar Test\n"); + assert(creals(csums(value1)) == 3.0f); + assert(cimags(csums(value1)) == 3.0f); + assert(creals(csums(value2)) == 1.123456789f); + assert(cimags(csums(value2)) == 1.123456789f); + return 0; +} + +static int csumaTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex table1[3]; + floatComplex value2 = FloatComplex(9.186784563f,9.186784563f); + floatComplex table2[5]; + + printf("\n>>>> Sum Float Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", cimags(csuma(table1, 3))); + printf("%e\n", creals(csuma(table2, 5))); + printf("%e\n", cimags(csuma(table2, 5))); + printf("%e\n", creals(csuma(table2, 5))); + printf("%e\n", cimags(csuma(table2, 5))); + printf("--------\n"); +#endif + assert(creals(csuma(table1, 3)) == 9.0f); + assert(cimags(csuma(table1, 3)) == 9.0f); + assert(creals(csuma(table2, 5)) == 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f); + assert(cimags(csuma(table2, 5)) == 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f); + + return 0; +} + +static int crowsumaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex rowSummedIn_4_3[3]; + floatComplex rowSummedIn_3_4[4]; + floatComplex rowSummedIn_6_2[2]; + floatComplex rowSummedIn_2_6[6]; + floatComplex rowSummedIn_1_12[12]; + floatComplex rowSummedIn_12_1[1]; + + printf("\n>>>> Row Sum Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + crowsuma(in, 4, 3, rowSummedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowSummedIn_4_3[%d] = %e + %ei\n", i, creals(rowSummedIn_4_3[i]), cimags(rowSummedIn_4_3[i])); + } + assert(creals(rowSummedIn_4_3[0]) == 0.6f && cimags(rowSummedIn_4_3[0]) == 3.8f); + assert(creals(rowSummedIn_4_3[1]) == 2.2f && cimags(rowSummedIn_4_3[1]) == 2.2f); + assert(fabs(creals(rowSummedIn_4_3[2]) - 3.8f) < 1e-06); + assert(cimags(rowSummedIn_4_3[2]) == 0.6f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + crowsuma(in, 3, 4, rowSummedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowSummedIn_3_4[%d] = %e + %ei\n", i, creals(rowSummedIn_3_4[i]), cimags(rowSummedIn_3_4[i])); + } + assert(creals(rowSummedIn_3_4[0]) == 0.3f && cimags(rowSummedIn_3_4[0]) == 3.0f); + assert(creals(rowSummedIn_3_4[1]) == 1.2f && cimags(rowSummedIn_3_4[1]) == 2.1f); + assert(creals(rowSummedIn_3_4[2]) == 2.1f && cimags(rowSummedIn_3_4[2]) == 1.2f); + assert(creals(rowSummedIn_3_4[3]) == 3.0f && cimags(rowSummedIn_3_4[3]) == 0.3f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + crowsuma(in, 6, 2, rowSummedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowSummedIn_6_2[%d] = %e + %ei\n", i, creals(rowSummedIn_6_2[i]), cimags(rowSummedIn_6_2[i])); + } + assert(creals(rowSummedIn_6_2[0]) == 1.5f && cimags(rowSummedIn_6_2[0]) == 5.1f); + assert(creals(rowSummedIn_6_2[1]) == 5.1f); + assert(fabs(cimags(rowSummedIn_6_2[1]) - 1.5f) < 1e-06); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + crowsuma(in, 2, 6, rowSummedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowSummedIn_2_6[%d] = %e + %ei\n", i, creals(rowSummedIn_2_6[i]), cimags(rowSummedIn_2_6[i])); + } + assert(creals(rowSummedIn_2_6[0]) == 0.1f && cimags(rowSummedIn_2_6[0]) == 2.1f); + assert(creals(rowSummedIn_2_6[1]) == 0.5f && cimags(rowSummedIn_2_6[1]) == 1.7f); + assert(creals(rowSummedIn_2_6[2]) == 0.9f && cimags(rowSummedIn_2_6[2]) == 1.3f); + assert(creals(rowSummedIn_2_6[3]) == 1.3f && cimags(rowSummedIn_2_6[3]) == 0.9f); + assert(creals(rowSummedIn_2_6[4]) == 1.7f && cimags(rowSummedIn_2_6[4]) == 0.5f); + assert(creals(rowSummedIn_2_6[5]) == 2.1f && cimags(rowSummedIn_2_6[5]) == 0.1f); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + crowsuma(in, 1, 12, rowSummedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowSummedIn_1_12[%d] = %e + %ei\n", i, creals(rowSummedIn_1_12[i]), cimags(rowSummedIn_1_12[i])); + assert(creals(rowSummedIn_1_12[i]) == creals(in[i]) && cimags(rowSummedIn_1_12[i]) == cimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + crowsuma(in, 12, 1, rowSummedIn_12_1); + printf("rowSummedIn_12_1[%d] = %e + %ei\n", 0, creals(rowSummedIn_12_1[0]), cimags(rowSummedIn_12_1[0])); + assert(creals(rowSummedIn_12_1[0]) == 6.6f && cimags(rowSummedIn_12_1[0]) == 6.6f); + + return 0; +} + +static int ccolumnsumaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex columnSummedIn_4_3[4]; + floatComplex columnSummedIn_3_4[3]; + floatComplex columnSummedIn_6_2[6]; + floatComplex columnSummedIn_2_6[2]; + floatComplex columnSummedIn_1_12[1]; + floatComplex columnSummedIn_12_1[12]; + + printf("\n>>>> ColumnSum Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + ccolumnsuma(in, 4, 3, columnSummedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnSummedIn_4_3[%d] = %e + %ei\n", i, creals(columnSummedIn_4_3[i]), cimags(columnSummedIn_4_3[i])); + } + assert(creals(columnSummedIn_4_3[0]) == 1.2f && cimags(columnSummedIn_4_3[0]) == 2.1f); + assert(creals(columnSummedIn_4_3[1]) == 1.5f); + assert(fabs(cimags(columnSummedIn_4_3[1]) - 1.8f) < 1e-06); + assert(creals(columnSummedIn_4_3[2]) == 1.8f && cimags(columnSummedIn_4_3[2]) == 1.5f); + assert(creals(columnSummedIn_4_3[3]) == 2.1f && cimags(columnSummedIn_4_3[3]) == 1.2f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + ccolumnsuma(in, 3, 4, columnSummedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnSummedIn_3_4[%d] = %e + %ei\n", i, creals(columnSummedIn_3_4[i]), cimags(columnSummedIn_3_4[i])); + } + assert(creals(columnSummedIn_3_4[0]) == 1.8f); + assert(fabs(cimags(columnSummedIn_3_4[0]) - 2.6f) < 1e-06); + assert(creals(columnSummedIn_3_4[1]) == 2.2f && cimags(columnSummedIn_3_4[1]) == 2.2f); + assert(creals(columnSummedIn_3_4[2]) == 2.6f && cimags(columnSummedIn_3_4[2]) == 1.8f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + ccolumnsuma(in, 6, 2, columnSummedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnSummedIn_6_2[%d] = %e + %ei\n", i, creals(columnSummedIn_6_2[i]), cimags(columnSummedIn_6_2[i])); + } + assert(creals(columnSummedIn_6_2[0]) == 0.6f && cimags(columnSummedIn_6_2[0]) == 1.6f); + assert(creals(columnSummedIn_6_2[1]) == 0.8f && cimags(columnSummedIn_6_2[1]) == 1.4f); + assert(creals(columnSummedIn_6_2[2]) == 1.0f && cimags(columnSummedIn_6_2[2]) == 1.2f); + assert(creals(columnSummedIn_6_2[3]) == 1.2f && cimags(columnSummedIn_6_2[3]) == 1.0f); + assert(creals(columnSummedIn_6_2[4]) == 1.4f && cimags(columnSummedIn_6_2[4]) == 0.8f); + assert(creals(columnSummedIn_6_2[5]) == 1.6f && cimags(columnSummedIn_6_2[5]) == 0.6f); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + ccolumnsuma(in, 2, 6, columnSummedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnSummedIn_2_6[%d] = %e + %ei\n", i, creals(columnSummedIn_2_6[i]), cimags(columnSummedIn_2_6[i])); + } + assert(creals(columnSummedIn_2_6[0]) == 3.0f && cimags(columnSummedIn_2_6[0]) == 3.6f); + assert(creals(columnSummedIn_2_6[1]) == 3.6f); + assert(fabs(cimags(columnSummedIn_2_6[1]) -3.0f) < 1e-06); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + ccolumnsuma(in, 1, 12, columnSummedIn_1_12); + printf("columnSummedIn_1_12[%d] = %e + %ei\n", 0, creals(columnSummedIn_1_12[0]), cimags(columnSummedIn_1_12[0])); + assert(creals(columnSummedIn_1_12[0]) == 6.6f && cimags(columnSummedIn_1_12[0]) == 6.6f); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + ccolumnsuma(in, 12, 1, columnSummedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnSummedIn_12_1[%d] = %e + %ei\n", i, creals(columnSummedIn_12_1[i]), cimags(columnSummedIn_12_1[i])); + assert(creals(columnSummedIn_12_1[i]) == creals(in[i]) && cimags(columnSummedIn_12_1[i]) == cimags(in[i])); + } + + return 0; +} + +static int testSum(void) { + + ssumsTest(); + ssumaTest(); + srowsumaTest(); + scolumnsumaTest(); + csumsTest(); + csumaTest(); + crowsumaTest(); + ccolumnsumaTest(); + + return 0; +} + +int main(void) { + assert(testSum() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj new file mode 100644 index 00000000..d82ed7c0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{F2A81CDC-2581-481F-B63D-3D2079B264C2}</ProjectGuid>
+ <RootNamespace>testDoubleSum</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testDoubleSum.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\statisticsFunctions.vcxproj">
+ <Project>{e11ed064-3bf2-4f70-b66e-3223c737ec60}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters new file mode 100644 index 00000000..0bb90bbf --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testDoubleSum.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj new file mode 100644 index 00000000..a8acdf08 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{450C8334-BA46-43DB-81BA-7BEDBB346126}</ProjectGuid>
+ <RootNamespace>testFloatSum</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(SolutionDir)bin\$(ProjectName).exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testFloatSum.c">
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\type\type.vcxproj">
+ <Project>{9b1bd750-1fef-4d6b-9422-782d16181cee}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\statisticsFunctions.vcxproj">
+ <Project>{e11ed064-3bf2-4f70-b66e-3223c737ec60}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters new file mode 100644 index 00000000..56ce3b30 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\testFloatSum.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c new file mode 100644 index 00000000..93e97536 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void zcolumnsuma(doubleComplex *in, int lines, int columns, doubleComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] = zadds(out[i % lines] , in[i]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c new file mode 100644 index 00000000..abb62b57 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void zrowsuma(doubleComplex *in, int lines, int columns, doubleComplex* out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] = zadds(out[(i - 1) % columns] , + in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/zsuma.c b/2.3-1/src/c/statisticsFunctions/sum/zsuma.c new file mode 100644 index 00000000..e566c95a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/zsuma.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +doubleComplex zsuma(doubleComplex *in, int size) { + doubleComplex accumulate = DoubleComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = zadds(accumulate, in[i]); + } + return accumulate; +} |