diff options
Diffstat (limited to 'src/c/matrixOperations/division')
24 files changed, 3282 insertions, 0 deletions
diff --git a/src/c/matrixOperations/division/Makefile.am b/src/c/matrixOperations/division/Makefile.am new file mode 100644 index 0000000..919ce99 --- /dev/null +++ b/src/c/matrixOperations/division/Makefile.am @@ -0,0 +1,73 @@ +## +## 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 +## +## + +libMatrixDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixDivision.la + +HEAD = ../includes/matrixDivision.h + +libMatrixDivision_la_SOURCES = $(HEAD) \ + srdivma.c \ + sldivma.c \ + drdivma.c \ + dldivma.c \ + zrdivma.c \ + zldivma.c \ + crdivma.c \ + cldivma.c \ + crdivcsv.c \ + crdivscv.c \ + crdivv.c \ + drdivv.c \ + srdivv.c \ + zrdivdzv.c \ + zrdivv.c \ + zrdivzdv.c + +check_PROGRAMS = testMatrixRDivision \ + testMatrixLDivision + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +ztestMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_LDADD = $(check_LDADD) +testMatrixLDivision_CFLAGS = $(check_INCLUDES) + +testMatrixRDivision_SOURCES = testMatrixRDivision.c +testMatrixRDivision_LDADD = $(check_LDADD) +testMatrixRDivision_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixRDivision \ + testMatrixLDivision diff --git a/src/c/matrixOperations/division/Makefile.in b/src/c/matrixOperations/division/Makefile.in new file mode 100644 index 0000000..02a150d --- /dev/null +++ b/src/c/matrixOperations/division/Makefile.in @@ -0,0 +1,880 @@ +# 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 = testMatrixRDivision$(EXEEXT) \ + testMatrixLDivision$(EXEEXT) +TESTS = testMatrixRDivision$(EXEEXT) testMatrixLDivision$(EXEEXT) +subdir = src/c/matrixOperations/division +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) +libMatrixDivision_la_LIBADD = +am__objects_1 = +am_libMatrixDivision_la_OBJECTS = $(am__objects_1) \ + libMatrixDivision_la-srdivma.lo \ + libMatrixDivision_la-sldivma.lo \ + libMatrixDivision_la-drdivma.lo \ + libMatrixDivision_la-dldivma.lo \ + libMatrixDivision_la-zrdivma.lo \ + libMatrixDivision_la-zldivma.lo \ + libMatrixDivision_la-crdivma.lo \ + libMatrixDivision_la-cldivma.lo \ + libMatrixDivision_la-crdivcsv.lo \ + libMatrixDivision_la-crdivscv.lo \ + libMatrixDivision_la-crdivv.lo libMatrixDivision_la-drdivv.lo \ + libMatrixDivision_la-srdivv.lo \ + libMatrixDivision_la-zrdivdzv.lo \ + libMatrixDivision_la-zrdivv.lo \ + libMatrixDivision_la-zrdivzdv.lo +libMatrixDivision_la_OBJECTS = $(am_libMatrixDivision_la_OBJECTS) +libMatrixDivision_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixDivision_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +testMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_OBJECTS = \ + testMatrixLDivision-testMatrixLDivision.$(OBJEXT) +testMatrixLDivision_DEPENDENCIES = $(check_LDADD) +testMatrixLDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixLDivision_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixRDivision_OBJECTS = \ + testMatrixRDivision-testMatrixRDivision.$(OBJEXT) +testMatrixRDivision_OBJECTS = $(am_testMatrixRDivision_OBJECTS) +testMatrixRDivision_DEPENDENCIES = $(check_LDADD) +testMatrixRDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixRDivision_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 = $(libMatrixDivision_la_SOURCES) testMatrixLDivision.c \ + $(testMatrixRDivision_SOURCES) +DIST_SOURCES = $(libMatrixDivision_la_SOURCES) testMatrixLDivision.c \ + $(testMatrixRDivision_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@ +libMatrixDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixDivision.la +HEAD = ../includes/matrixDivision.h +libMatrixDivision_la_SOURCES = $(HEAD) \ + srdivma.c \ + sldivma.c \ + drdivma.c \ + dldivma.c \ + zrdivma.c \ + zldivma.c \ + crdivma.c \ + cldivma.c \ + crdivcsv.c \ + crdivscv.c \ + crdivv.c \ + drdivv.c \ + srdivv.c \ + zrdivdzv.c \ + zrdivv.c \ + zrdivzdv.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +ztestMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_LDADD = $(check_LDADD) +testMatrixLDivision_CFLAGS = $(check_INCLUDES) +testMatrixRDivision_SOURCES = testMatrixRDivision.c +testMatrixRDivision_LDADD = $(check_LDADD) +testMatrixRDivision_CFLAGS = $(check_INCLUDES) +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/matrixOperations/division/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/division/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 +libMatrixDivision.la: $(libMatrixDivision_la_OBJECTS) $(libMatrixDivision_la_DEPENDENCIES) + $(libMatrixDivision_la_LINK) -rpath $(pkglibdir) $(libMatrixDivision_la_OBJECTS) $(libMatrixDivision_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 +testMatrixLDivision$(EXEEXT): $(testMatrixLDivision_OBJECTS) $(testMatrixLDivision_DEPENDENCIES) + @rm -f testMatrixLDivision$(EXEEXT) + $(testMatrixLDivision_LINK) $(testMatrixLDivision_OBJECTS) $(testMatrixLDivision_LDADD) $(LIBS) +testMatrixRDivision$(EXEEXT): $(testMatrixRDivision_OBJECTS) $(testMatrixRDivision_DEPENDENCIES) + @rm -f testMatrixRDivision$(EXEEXT) + $(testMatrixRDivision_LINK) $(testMatrixRDivision_OBJECTS) $(testMatrixRDivision_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-cldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivcsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivscv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-dldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-drdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-drdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-sldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-srdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-srdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivdzv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivzdv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixRDivision-testMatrixRDivision.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 $@ $< + +libMatrixDivision_la-srdivma.lo: srdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-srdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-srdivma.Tpo -c -o libMatrixDivision_la-srdivma.lo `test -f 'srdivma.c' || echo '$(srcdir)/'`srdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-srdivma.Tpo $(DEPDIR)/libMatrixDivision_la-srdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivma.c' object='libMatrixDivision_la-srdivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-srdivma.lo `test -f 'srdivma.c' || echo '$(srcdir)/'`srdivma.c + +libMatrixDivision_la-sldivma.lo: sldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-sldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-sldivma.Tpo -c -o libMatrixDivision_la-sldivma.lo `test -f 'sldivma.c' || echo '$(srcdir)/'`sldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-sldivma.Tpo $(DEPDIR)/libMatrixDivision_la-sldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sldivma.c' object='libMatrixDivision_la-sldivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-sldivma.lo `test -f 'sldivma.c' || echo '$(srcdir)/'`sldivma.c + +libMatrixDivision_la-drdivma.lo: drdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-drdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-drdivma.Tpo -c -o libMatrixDivision_la-drdivma.lo `test -f 'drdivma.c' || echo '$(srcdir)/'`drdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-drdivma.Tpo $(DEPDIR)/libMatrixDivision_la-drdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivma.c' object='libMatrixDivision_la-drdivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-drdivma.lo `test -f 'drdivma.c' || echo '$(srcdir)/'`drdivma.c + +libMatrixDivision_la-dldivma.lo: dldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-dldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-dldivma.Tpo -c -o libMatrixDivision_la-dldivma.lo `test -f 'dldivma.c' || echo '$(srcdir)/'`dldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-dldivma.Tpo $(DEPDIR)/libMatrixDivision_la-dldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dldivma.c' object='libMatrixDivision_la-dldivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-dldivma.lo `test -f 'dldivma.c' || echo '$(srcdir)/'`dldivma.c + +libMatrixDivision_la-zrdivma.lo: zrdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivma.Tpo -c -o libMatrixDivision_la-zrdivma.lo `test -f 'zrdivma.c' || echo '$(srcdir)/'`zrdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivma.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivma.c' object='libMatrixDivision_la-zrdivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivma.lo `test -f 'zrdivma.c' || echo '$(srcdir)/'`zrdivma.c + +libMatrixDivision_la-zldivma.lo: zldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zldivma.Tpo -c -o libMatrixDivision_la-zldivma.lo `test -f 'zldivma.c' || echo '$(srcdir)/'`zldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zldivma.Tpo $(DEPDIR)/libMatrixDivision_la-zldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zldivma.c' object='libMatrixDivision_la-zldivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zldivma.lo `test -f 'zldivma.c' || echo '$(srcdir)/'`zldivma.c + +libMatrixDivision_la-crdivma.lo: crdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivma.Tpo -c -o libMatrixDivision_la-crdivma.lo `test -f 'crdivma.c' || echo '$(srcdir)/'`crdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivma.Tpo $(DEPDIR)/libMatrixDivision_la-crdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivma.c' object='libMatrixDivision_la-crdivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivma.lo `test -f 'crdivma.c' || echo '$(srcdir)/'`crdivma.c + +libMatrixDivision_la-cldivma.lo: cldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-cldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-cldivma.Tpo -c -o libMatrixDivision_la-cldivma.lo `test -f 'cldivma.c' || echo '$(srcdir)/'`cldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-cldivma.Tpo $(DEPDIR)/libMatrixDivision_la-cldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cldivma.c' object='libMatrixDivision_la-cldivma.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-cldivma.lo `test -f 'cldivma.c' || echo '$(srcdir)/'`cldivma.c + +libMatrixDivision_la-crdivcsv.lo: crdivcsv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivcsv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivcsv.Tpo -c -o libMatrixDivision_la-crdivcsv.lo `test -f 'crdivcsv.c' || echo '$(srcdir)/'`crdivcsv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivcsv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivcsv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivcsv.c' object='libMatrixDivision_la-crdivcsv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivcsv.lo `test -f 'crdivcsv.c' || echo '$(srcdir)/'`crdivcsv.c + +libMatrixDivision_la-crdivscv.lo: crdivscv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivscv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivscv.Tpo -c -o libMatrixDivision_la-crdivscv.lo `test -f 'crdivscv.c' || echo '$(srcdir)/'`crdivscv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivscv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivscv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivscv.c' object='libMatrixDivision_la-crdivscv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivscv.lo `test -f 'crdivscv.c' || echo '$(srcdir)/'`crdivscv.c + +libMatrixDivision_la-crdivv.lo: crdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivv.Tpo -c -o libMatrixDivision_la-crdivv.lo `test -f 'crdivv.c' || echo '$(srcdir)/'`crdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivv.c' object='libMatrixDivision_la-crdivv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivv.lo `test -f 'crdivv.c' || echo '$(srcdir)/'`crdivv.c + +libMatrixDivision_la-drdivv.lo: drdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-drdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-drdivv.Tpo -c -o libMatrixDivision_la-drdivv.lo `test -f 'drdivv.c' || echo '$(srcdir)/'`drdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-drdivv.Tpo $(DEPDIR)/libMatrixDivision_la-drdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivv.c' object='libMatrixDivision_la-drdivv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-drdivv.lo `test -f 'drdivv.c' || echo '$(srcdir)/'`drdivv.c + +libMatrixDivision_la-srdivv.lo: srdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-srdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-srdivv.Tpo -c -o libMatrixDivision_la-srdivv.lo `test -f 'srdivv.c' || echo '$(srcdir)/'`srdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-srdivv.Tpo $(DEPDIR)/libMatrixDivision_la-srdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivv.c' object='libMatrixDivision_la-srdivv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-srdivv.lo `test -f 'srdivv.c' || echo '$(srcdir)/'`srdivv.c + +libMatrixDivision_la-zrdivdzv.lo: zrdivdzv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivdzv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Tpo -c -o libMatrixDivision_la-zrdivdzv.lo `test -f 'zrdivdzv.c' || echo '$(srcdir)/'`zrdivdzv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivdzv.c' object='libMatrixDivision_la-zrdivdzv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivdzv.lo `test -f 'zrdivdzv.c' || echo '$(srcdir)/'`zrdivdzv.c + +libMatrixDivision_la-zrdivv.lo: zrdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivv.Tpo -c -o libMatrixDivision_la-zrdivv.lo `test -f 'zrdivv.c' || echo '$(srcdir)/'`zrdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivv.c' object='libMatrixDivision_la-zrdivv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivv.lo `test -f 'zrdivv.c' || echo '$(srcdir)/'`zrdivv.c + +libMatrixDivision_la-zrdivzdv.lo: zrdivzdv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivzdv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Tpo -c -o libMatrixDivision_la-zrdivzdv.lo `test -f 'zrdivzdv.c' || echo '$(srcdir)/'`zrdivzdv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivzdv.c' object='libMatrixDivision_la-zrdivzdv.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) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivzdv.lo `test -f 'zrdivzdv.c' || echo '$(srcdir)/'`zrdivzdv.c + +testMatrixLDivision-testMatrixLDivision.o: testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -MT testMatrixLDivision-testMatrixLDivision.o -MD -MP -MF $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo -c -o testMatrixLDivision-testMatrixLDivision.o `test -f 'testMatrixLDivision.c' || echo '$(srcdir)/'`testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixLDivision.c' object='testMatrixLDivision-testMatrixLDivision.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) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -c -o testMatrixLDivision-testMatrixLDivision.o `test -f 'testMatrixLDivision.c' || echo '$(srcdir)/'`testMatrixLDivision.c + +testMatrixLDivision-testMatrixLDivision.obj: testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -MT testMatrixLDivision-testMatrixLDivision.obj -MD -MP -MF $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo -c -o testMatrixLDivision-testMatrixLDivision.obj `if test -f 'testMatrixLDivision.c'; then $(CYGPATH_W) 'testMatrixLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixLDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixLDivision.c' object='testMatrixLDivision-testMatrixLDivision.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) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -c -o testMatrixLDivision-testMatrixLDivision.obj `if test -f 'testMatrixLDivision.c'; then $(CYGPATH_W) 'testMatrixLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixLDivision.c'; fi` + +testMatrixRDivision-testMatrixRDivision.o: testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -MT testMatrixRDivision-testMatrixRDivision.o -MD -MP -MF $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo -c -o testMatrixRDivision-testMatrixRDivision.o `test -f 'testMatrixRDivision.c' || echo '$(srcdir)/'`testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixRDivision.c' object='testMatrixRDivision-testMatrixRDivision.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) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -c -o testMatrixRDivision-testMatrixRDivision.o `test -f 'testMatrixRDivision.c' || echo '$(srcdir)/'`testMatrixRDivision.c + +testMatrixRDivision-testMatrixRDivision.obj: testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -MT testMatrixRDivision-testMatrixRDivision.obj -MD -MP -MF $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo -c -o testMatrixRDivision-testMatrixRDivision.obj `if test -f 'testMatrixRDivision.c'; then $(CYGPATH_W) 'testMatrixRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixRDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixRDivision.c' object='testMatrixRDivision-testMatrixRDivision.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) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -c -o testMatrixRDivision-testMatrixRDivision.obj `if test -f 'testMatrixRDivision.c'; then $(CYGPATH_W) 'testMatrixRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixRDivision.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/src/c/matrixOperations/division/cldivma.c b/src/c/matrixOperations/division/cldivma.c new file mode 100644 index 0000000..d21510c --- /dev/null +++ b/src/c/matrixOperations/division/cldivma.c @@ -0,0 +1,65 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +/******FIXME********/ +/**** WARNING NOT WORK AT ALL FOR THE MOMENT ***/ +/**** Because of problem of conversion float-> double ****/ +#include "matrixDivision.h" +#include "lapack.h" + +void cldivma ( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin1 = NULL; + doubleComplex *dblin2 = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = DoubleComplex ( (double) creals( in1[i]) , (double) cimags ( in1[i])) ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = DoubleComplex ( (double) creals( in2[i]) , (double) cimags ( in2[i])) ; + } + + zldivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/crdivcsv.c b/src/c/matrixOperations/division/crdivcsv.c new file mode 100644 index 0000000..77b7750 --- /dev/null +++ b/src/c/matrixOperations/division/crdivcsv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include "zeros.h" +#include "matrixDivision.h" + +floatComplex crdivcsv (floatComplex* in1,float* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return crdivv(in1 , FloatComplexMatrix(in2,ZEROS,size),size ); + } diff --git a/src/c/matrixOperations/division/crdivma.c b/src/c/matrixOperations/division/crdivma.c new file mode 100644 index 0000000..ca6f356 --- /dev/null +++ b/src/c/matrixOperations/division/crdivma.c @@ -0,0 +1,62 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include "matrixDivision.h" +#include "lapack.h" + +void crdivma ( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin1 = NULL; + doubleComplex *dblin2 = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = DoubleComplex ( (double) creals( in1[i]) , (double) cimags ( in1[i])) ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = DoubleComplex ( (double) creals( in2[i]) , (double) cimags ( in2[i])) ; + } + + zrdivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/crdivscv.c b/src/c/matrixOperations/division/crdivscv.c new file mode 100644 index 0000000..0f4de32 --- /dev/null +++ b/src/c/matrixOperations/division/crdivscv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include "zeros.h" +#include "matrixDivision.h" + +floatComplex crdivscv (float* in1, floatComplex* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return crdivv(FloatComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/src/c/matrixOperations/division/crdivv.c b/src/c/matrixOperations/division/crdivv.c new file mode 100644 index 0000000..db7a81c --- /dev/null +++ b/src/c/matrixOperations/division/crdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 "matrixDivision.h" + +floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size){ + + floatComplex out[1] ={ FloatComplex (0.0f , 0.0f)}; + crdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/dldivma.c b/src/c/matrixOperations/division/dldivma.c new file mode 100644 index 0000000..2c81d84 --- /dev/null +++ b/src/c/matrixOperations/division/dldivma.c @@ -0,0 +1,111 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include <string.h> +#include "matrixDivision.h" +#include "lapack.h" + +void dldivma (double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + double *pAf = NULL; + double *pXb = NULL; + double *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (double*)malloc(sizeof(double) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (double*)malloc(sizeof(double) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (double*)malloc(sizeof(double) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/src/c/matrixOperations/division/drdivma.c b/src/c/matrixOperations/division/drdivma.c new file mode 100644 index 0000000..aad029a --- /dev/null +++ b/src/c/matrixOperations/division/drdivma.c @@ -0,0 +1,129 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include <string.h> +#include "matrixDivision.h" +#include "lapack.h" + +void drdivma ( double * in1, int lines1, int columns1, + double * in2, int lines2, int columns2, + double * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + double *pAf = NULL; + double *pAt = NULL; + double *pBt = NULL; + double *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (double*)malloc(sizeof(double) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (double*)malloc(sizeof(double) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (double*)malloc(sizeof(double) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/src/c/matrixOperations/division/drdivv.c b/src/c/matrixOperations/division/drdivv.c new file mode 100644 index 0000000..c6c2bf6 --- /dev/null +++ b/src/c/matrixOperations/division/drdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 "matrixDivision.h" + +double drdivv(double *in1, double *in2, int size){ + + double out[1] = { 0.0} ; + drdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/sldivma.c b/src/c/matrixOperations/division/sldivma.c new file mode 100644 index 0000000..766cfff --- /dev/null +++ b/src/c/matrixOperations/division/sldivma.c @@ -0,0 +1,61 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include "matrixDivision.h" +#include "lapack.h" +void sldivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin1 = NULL; + double *dblin2 = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (double*)malloc(sizeof(double) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = (double) in1[i] ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = (double) in2[i] ; + } + + dldivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = (float) dblout[i] ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/srdivma.c b/src/c/matrixOperations/division/srdivma.c new file mode 100644 index 0000000..bc1f035 --- /dev/null +++ b/src/c/matrixOperations/division/srdivma.c @@ -0,0 +1,63 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +/****FIXME****/ +/**** WARNING NOT WORK AT ALL FOR THE MOMENT ***/ +/**** Because of problem of conversion float-> double ****/ +#include "matrixDivision.h" +#include "lapack.h" +void srdivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin1 = NULL; + double *dblin2 = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (double*)malloc(sizeof(double) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = (double) in1[i] ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = (double) in2[i] ; + } + + drdivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = (float) dblout[i] ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/srdivv.c b/src/c/matrixOperations/division/srdivv.c new file mode 100644 index 0000000..023e06f --- /dev/null +++ b/src/c/matrixOperations/division/srdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 "matrixDivision.h" + +float srdivv(float *in1, float *in2, int size){ + + float out[1] = {0.0f} ; + srdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/testMatrixLDivision.c b/src/c/matrixOperations/division/testMatrixLDivision.c new file mode 100644 index 0000000..b2f8319 --- /dev/null +++ b/src/c/matrixOperations/division/testMatrixLDivision.c @@ -0,0 +1,456 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 "matrixDivision.h" + + +#define LINES 2 +#define COLUMNS1 2 +#define COLUMNS2 2 + +#define ZLINES 2 +#define ZCOLUMNS1 2 +#define ZCOLUMNS2 1 + + +static void sldivmaTest ( void ){ + int i = 0; + + float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ; + float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ; + float result[] = { -1.25f , 0.75f , -1.166666666666666f ,0.83333333333333333f }; + + + float out [(COLUMNS2)*(LINES)] ; + + sldivma( in1 , LINES , COLUMNS1 , in2 , LINES , COLUMNS2 , out ) ; + for ( i = 0 ; i < LINES *COLUMNS2 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-06 ) ; + } + + + +} + + +static void dldivmaTest ( void ) +{ + int i = 0 ; +/* here the matrixes are linearized in the wrong way so need to transpose them */ +/* double in1[] = +{0.84155184263363481,0.26385784195736051,0.52570608118548989,0.54653349192813039, + 0.62128817522898316,0.98085420625284314,0.74896081397309899,0.01432593585923314, + 0.23678414756432176,0.70614896761253476,0.27255953708663583,0.06706167431548238, + 0.43117330456152558,0.7741842647083104,0.57694048294797540,0.26086253346875310, + 0.14094856614246964, +0.40620247554033995,0.52535630855709314,0.99312098976224661,0.98854076582938433, + 0.34549844544380903,0.81870661024004221,0.94149570073932409,0.81914897728711367, + 0.70153435599058867,0.67878311965614557,0.34376550372689962,0.76511315722018480, + 0.61453847866505384,0.79220082703977823,0.39386960770934820,0.36363423336297274, + 0.67591095995157957, +0.40948254754766822,0.53762298030778766,0.64885628735646605,0.73956565884873271, + 0.70648676296696067,0.42568723810836673,0.21240556007251143,0.13049928424879909, + 0.12025266280397773,0.41329363686963916,0.20337020372971892,0.04173615900799632, + 0.92589621385559440,0.55046048713847995,0.68885837262496352,0.17466178117319942, + 0.45126775791868567, +0.87841258011758327,0.11999255046248436,0.99231909401714802,0.00371731072664261, + 0.52114724926650524,0.24615605548024178,0.57950199581682682,0.96820035576820374, + 0.82874121330678463,0.14022908732295036,0.30119446106255054,0.34382718056440353, + 0.09938172809779644,0.40850437059998512,0.97023218311369419,0.92341394722461700, + 0.75430292449891567, +0.11383596854284406,0.2256303490139544,0.05004197778180242,0.59005728596821427, + 0.28704008506610990,0.92295324662700295,0.26281475694850087,0.6561381467618048, + 0.31610729591920972,0.49523561308160424,0.27625959040597081,0.1970167332328856, + 0.42805786477401853,0.72174380579963326,0.85157642932608724,0.76051409030333161, + 0.13702143030241132, +0.19983377400785685,0.62740930821746588,0.74855065811425447,0.3096467358991504, + 0.65027950797230005,0.10007458087056875,0.43609866220504045,0.24455389659851789, + 0.53051907662302256,0.41948772873729467,0.29445307422429323,0.21228986512869596, + 0.94318309519439936,0.47685358580201864,0.33933044690638781,0.56402041297405958, + 0.66082405392080545, +0.56186607433483005,0.76084325974807143,0.41040589986369014,0.25522057106718421, + 0.08813347620889544,0.46782181179150939,0.91105451015755534,0.52831235667690635, + 0.57151748193427920,0.86262222891673446,0.57180739520117640,0.31403985014185309, + 0.03273952705785632,0.63930579042062163,0.87725317804142833,0.37970651825889945, + 0.38900542212650180, +0.58961773291230202,0.04855662025511265,0.60845263302326202,0.62518793903291225, + 0.44987633451819420,0.39504976756870747,0.80826673656702042,0.84689256362617016, + 0.04780154302716255,0.28575096465647221,0.21417701244354248,0.78216253779828548, + 0.92132670804858208,0.99638652987778187,0.11314024776220322,0.87762261740863323, + 0.70018205419182777, +0.68539796629920602,0.67239497276023030,0.85442108893766999,0.11574173765257001, + 0.72272530803456903,0.03661171020939946,0.81026530498638749,0.78766220854595304, + 0.82486197212710977,0.25121363671496511,0.68954616272822022,0.05409323470667005, + 0.94490244099870324,0.15747882844880223,0.5264128320850432,0.82174257980659604, + 0.91680057207122445, +0.89062247332185507,0.20171726960688829,0.06426467280834913,0.61170040909200907, + 0.89767962601035833,0.51753685344010592,0.25904283951967955,0.12620826158672571, + 0.5798843121156096,0.33891015965491533,0.58555728476494551,0.91902069095522165, + 0.900706990621984,0.53506936598569155,0.52973940502852201,0.67870581243187189, + 0.21228999551385641, +0.50422128057107329,0.39115739194676280,0.82790829380974174,0.67839562846347690, + 0.24278218811377883,0.83254515705630183,0.41390872886404395,0.78838609857484698, + 0.27918082987889647,0.39219759730622172,0.42041230341419578,0.46035157097503543, + 0.80943161016330123,0.21290646074339747,0.92917560925707221,0.08220098121091723, + 0.26978330826386809, +0.34936154074966908,0.83003165572881699,0.92623437754809856,0.33200952783226967, + 0.43377211131155491,0.61048321425914764,0.35999277792870998,0.34530424699187279, + 0.95451109297573566,0.46815521270036697,0.42775720171630383,0.29926850274205208, + 0.02519542910158634,0.55914506316184998,0.97654302977025509,0.25527314469218254, + 0.31998893804848194, +0.38737787725403905,0.58787201577797532,0.56672112690284848,0.02587099233642220, + 0.96770532103255391,0.18711117887869477,0.69127879338338971,0.26598573336377740, + 0.90711546363309026,0.33616027468815446,0.31845858739688993,0.00291663268581033, + 0.00196450622752309,0.43049659812822938,0.62254639761522412,0.74444567272439599, + 0.02321802498772740, +0.92228986788541079,0.48291792999953032,0.57116389367729425,0.51744682248681784, + 0.50685344357043505,0.01895748358219862,0.76568587962538004,0.97098186518996954, + 0.33601493109017611,0.53368766140192747,0.57618944440037012,0.89934705849736929, + 0.50752213317900896,0.02280548494309187,0.98225832823663950,0.22695036139339209, + 0.72654472757130861, +0.94881842611357570,0.22328650346025825,0.81601104838773608,0.39168732380494475, + 0.52329764096066356,0.84335647663101554,0.35726496530696750,0.88752476638182998, + 0.11756130633875728,0.20390639593824744,0.42549022240564227,0.83879271661862731, + 0.40760429529473186,0.57614597817882895,0.75429888023063540,0.68369307881221175, + 0.15340585587546229, +0.34353372454643250,0.84008856676518917,0.05689279362559319,0.24135384149849415, + 0.5596947595477104,0.07485948316752911,0.76933998242020607,0.20667528547346592, + 0.92537237703800201,0.15899897180497646,0.97619816288352013,0.43437494523823261, + 0.84080461412668228,0.71491303853690624,0.54547880962491035,0.93650726415216923, + 0.23552638292312622, +0.37601187312975526,0.12059959070757031,0.55959366867318749,0.50644348980858922, + 0.56173070007935166,0.85328151332214475,0.54776339093223214,0.85251609655097127, + 0.72636712575331330,0.01818151073530316,0.25189600000157952,0.77678761305287480, + 0.5017265700735152,0.93216359661892056,0.72860160330310464,0.50530174048617482, + 0.08797382796183228, +0.73409405630081892,0.28553641680628061,0.12493403162807226,0.42361020017415285, + 0.46817600261420012,0.01245901081711054,0.09622887428849936,0.67446978110820055, + 0.90094979386776686,0.40983706060796976,0.43911290075629950,0.13953176606446505, + 0.91287807654589415,0.12326993141323328,0.02525969501584768,0.25248145777732134, + 0.71059537213295698, +0.26157614728435874,0.86075146449729800,0.72792222863063216,0.28937275288626552, + 0.77945467224344611,0.18675393564626575,0.95611717319115996,0.91528743831440806, + 0.39489932497963309,0.01058345986530185,0.07593036955222487,0.11506372271105647, + 0.44357294728979468,0.28655522270128131,0.40251684701070189,0.68188397912308574, + 0.68887275597080588, +0.49934938363730907,0.84941016510128975,0.26777664758265018,0.08879321813583374, + 0.79010718129575253,0.49205840751528740,0.22074085660278797,0.02848597615957260, + 0.56551797501742840,0.19653097167611122,0.25593801774084568,0.53554199635982513, + 0.59837839566171169,0.01247995719313622,0.09831319935619831,0.28363681584596634, + 0.65953194908797741}; + + + double in2[] = +{0.18151161121204495,0.77340125897899270,0.25145971449092031,0.37096222722902894, + 0.46179189579561353,0.47909884760156274,0.66919379355385900,0.06942595774307847, + 0.56079538213089108,0.69204960623756051,0.99401472182944417,0.00291080260649323, +0.3904965976253152,0.4244190966710448,0.38433500844985247,0.30322382133454084, + 0.62512917164713144,0.28169692959636450,0.20426016021519899,0.11522095929831266, + 0.94247916433960199,0.70065794046968222,0.18287624139338732,0.30681814532727003, +0.15869047446176410,0.72621259605512023,0.43964602379128337,0.95195201179012656, + 0.70597065938636661,0.23800977831706405,0.8310431349091232,0.48626806726679206, + 0.68177247745916247,0.88706119870766997,0.30219173757359385,0.79026939114555717, +0.62407150492072105,0.70999773032963276,0.65407369285821915,0.71278580836951733, + 0.70181696489453316,0.32942054606974125,0.01221632957458496,0.76715826056897640, + 0.27342410013079643,0.69797694869339466,0.37854864448308945,0.95779503695666790, +0.63760355720296502,0.47457459988072515,0.58781063789501786,0.11923700617626309, + 0.40879997471347451,0.23067280324175954,0.48844617092981935,0.08805298106744885, + 0.20717754075303674,0.67989911558106542,0.71531985932961106,0.66892711864784360, +0.42704886104911566,0.9438692079856992,0.60208318661898375,0.50091631803661585, + 0.06362213846296072,0.21362966019660234,0.95498770754784346,0.70085612777620554, + 0.19379387702792883,0.36159398127347231,0.95241537224501371,0.29296159837394953, +0.10716815060004592,0.14596485672518611,0.04535020282492042,0.32900535268709064, + 0.06573933875188231,0.40549980429932475,0.05874312063679099,0.18791387928649783, + 0.67978375917300582,0.26739976881071925,0.47039186349138618,0.82238993747159839, +0.23822965659201145,0.07141010463237762,0.20294443331658840,0.48089468106627464, + 0.53310041315853596,0.30953712016344070,0.82584649138152599,0.20178856328129768, + 0.58836574293673038,0.07736870646476746,0.18709417246282101,0.01798455044627190, +0.94629473658278584,0.67337385797873139,0.78442738251760602,0.33036959776654840, + 0.03315818728879094,0.67629716033115983,0.29807415651157498,0.40628212550655007, + 0.93317538173869252,0.14941003406420350,0.25571879046037793,0.87107013771310449, +0.45766852516680956,0.65369247179478407,0.26375361625105143,0.63044753577560186, + 0.31578356493264437,0.97069163154810667,0.07757596764713526,0.40966569539159536, + 0.55091228801757097,0.32018390577286482,0.44350660685449839,0.31810243334621191, +0.89644787041470408,0.19968961318954825,0.43832763982936740,0.21171907847747207, + 0.37858232436701655,0.54417965700849891,0.58460923237726092,0.17695645010098815, + 0.80405469564720988,0.20260545751079917,0.72340781940147281,0.57244732743129134, +0.44384705275297165,0.60141251794993877,0.86648589745163918,0.44860231317579746, + 0.46195234358310699,0.02047479711472988,0.75287136062979698,0.33129312284290791, + 0.10744897276163101,0.44988587312400341,0.87619100883603096,0.57386581040918827, +0.80895681912079453,0.18993748771026731,0.37921421090140939,0.59145097108557820, + 0.62873698258772492,0.89413649635389447,0.05172297963872552,0.05184767069295049, + 0.74039250845089555,0.77075743721798062,0.03733208635821939,0.34920182498171926, +0.68317985069006681,0.25839814636856318,0.76687160786241293,0.68067426700145006, + 0.28785153012722731,0.34903638903051615,0.59586250688880682,0.41492417920380831, + 0.56103316973894835,0.24352242145687342,0.42934664245694876,0.7067297669127584, +0.03401931514963508,0.09878737432882190,0.60066213225945830,0.07392961112782359, + 0.3292048736475408,0.11053651524707675,0.38337053125724196,0.72212355909869075, + 0.76611549546942115,0.21261148853227496,0.31572330510243773,0.35992007283493876, +0.23805456422269344,0.06199027225375175,0.78567356057465076,0.94336947053670883, + 0.47192330472171307,0.20233777537941933,0.49002202786505222,0.07746253907680511, + 0.78306589089334011,0.10992341861128807,0.36824773438274860,0.40523112565279007, +0.94920115964487195,0.04034968325868249,0.73871155502274632,0.12863306934013963, + 0.33537696348503232,0.13046909729018807,0.52727950783446431,0.58558783913031220, + 0.14388314681127667,0.69814807781949639,0.14587742509320378,0.61408105725422502, +0.21827886346727610,0.74001471605151892,0.55442603398114443,0.20190807711333036, + 0.55530697200447321,0.85739529784768820,0.06889454741030931,0.37079446297138929, + 0.16471924725919962,0.41509064938873053,0.67683792579919100,0.65240467619150877, +0.61546878470107913,0.61626600986346602,0.99291495559737086,0.19693034281954169, + 0.11960808141157031,0.63780163740739226,0.88430777518078685,0.21161167463287711, + 0.31774142337962985,0.50298188393935561,0.52619793592020869,0.02951709320768714, +0.83135433867573738,0.6583583448082209,0.97574284672737122,0.89286901615560055, + 0.76139996573328972,0.40711227245628834,0.71912937611341476,0.19032685272395611, + 0.50265956297516823,0.75116067565977573,0.400362566113472,0.56688958965241909} +; + + double result[] = +{-1.35304848520861487,0.45754085729476712,-0.6736280871889024,0.33207797896852592, + 0.43686665386108053,1.19699150804728482,-0.53382978138054371,0.29027772826683890, + -0.00827371705993142,-0.14056593966637726,0.97528495242825564,-0.50640321961329704, +-1.02292396789679763,0.14683824772822532,0.07187827219700703,0.26493234152584039, + 0.19039952557132572,0.55480813680166574,0.39823783903528059,0.10487653718583664, + -0.01169765032881238,-0.12935543309398898,0.91373948525086457,-0.42095065668914605, +-0.19349758378824730,-0.02882981029864774,-0.22391869192699457,-0.15720068678475169, + -0.07066729236062046,-0.22778476192919797,-0.07232798550562215,0.25736303036550690, + 0.46282933263406362,-0.30812642599955187,-0.13899968979779151,-0.29110054036689564, +-1.03603776312515605,0.41831226411022665,-0.26815455630947649,0.32749202801394556, + 0.71958381253175108,0.50743495139986494,-0.77843454048260496,-0.65128619093814355, + 0.45389989732032809,0.25340453725266349,-0.22487431273588654,-0.69327413947497007, +1.23257217178938916,-0.20500752874670841,1.17935058240805546,-0.07005924340124725, + 0.02202972751083646,-0.74349480264981749,0.78826180830363013,0.00378475165255014, + 0.20312102001296634,0.76317680003707100,-1.2444586343524908,0.61835799875331021, +0.82435969088956451,0.14161838805165022,0.54413699368884894,-0.35024810526933553, + 0.10736628125177422,-0.30342706713796774,0.16551618468279145,-0.33044241080800685, + 0.26090949768379634,0.36311977822561886,-0.02216943459020578,0.28290526888357609, +0.60758986375566237,-0.17769508155988095,-0.37428738263361294,0.06973138803028064, + -0.26917609149376737,0.57488494776039478,-0.16182837448139925,-0.54589681560051329, + 0.35855708857331126,-0.06225155630035748,-0.01420478239284544,-0.51044946988565809, +0.30247332250465692,-0.58709398545244817,0.52755056373610110,-0.87395680874726944, + -0.25878588799924235,-0.14016351767195534,0.26932123245105705,0.18741971186875042, + -0.10443218008098379,-0.04666556894424437,-0.28998246181099013,0.39888953797173432, +0.29894996645459254,0.44648385188893014,-0.2747623990687768,0.12767005544410789, + 0.31187612680253268,0.93787911555703019,-0.69506239058785912,0.05675543905552551, + -0.38364317006532606,0.3015716880761152,0.60874303825197718,-0.02132168933396992, +0.28919354677500908,0.08791044194229901,-0.66719204004654808,-0.38892391716572344, + -0.35074795512020418,0.52079480741130679,-0.12341534994946383,0.10603293453188402, + 0.13292792440340936,-0.03924161719101939,0.50135087079896590,0.13741552942080246, +0.38584460158392103,-1.05581700070645756,1.33305654920496308,-0.4661197871120432, + -0.29411616444505956,-2.27258047015748854,0.15783833704105082,-0.52713266629484568, + 1.16440529465468257,-0.45001368365485012,-2.15999736051125257,1.01319717905315843, +0.29660053528020919,-0.30427398541498984,-0.12504282968902436,0.25589579382097077, + -0.08693274594974670,-0.03498727188829748,0.07574429063044799,0.24558509581470137, + -0.11120224069858284,-0.21580250756805028,-0.02724340730221109,-0.16362172134690667, +0.39424507332817937,0.26915663350224511,-0.48616892178714571,0.06722217755862435, + -0.30789732141190385,0.93830157987553686,0.36043785223845126,0.42644383761017990, + -0.13641385018671429,-0.30094945006660034,1.13850388440322159,-0.12250602188987858, +-0.66991170773376507,-0.33568935537136302,0.34616388717968199,0.16394571168478128, + 0.11497788571365419,-1.12355992799920523,0.90321218371657097,0.51843407168999134, + -0.5333460102169536,0.19508185891564755,-0.24491167665302710,0.43625522780082732, +0.52362419925864290,0.35626701996484733,0.07409894473807596,0.6687300563276672, + 0.02130172947699538,0.07525160898747016,0.33548314852403621,0.36350170853544833, + -0.43456386741360986,0.30564069254711729,0.60413672598431878,0.62344267157598554, +-0.55671778762503188,0.51384740986051547,-0.66364280764764905,0.20946393028509858, + 0.21734134196942456,1.01080770232414596,-0.81218225821401002,-0.14076620249135630, + 0.32963958497594853,-0.23647842638263297,0.58596014599473090,-0.68150457913031526, +0.52872556238983059,0.57098625620273025,1.06212082783082407,0.59423966432136910, + 0.34731906030365728,-1.35636228486699051,0.60027136476023302,-0.01921912593105047, + -0.26023872041264290,0.60546432820947238,-0.64774098495099597,1.07329929083653908} +; + +*/ + + + double in1[] = { 4 , 3 , 8 , 9 } ; + double in2[] = { 1 , 3 , 2 , 4 } ; + double result[] = { -1.25 , 0.75 , -1.166666666666666 ,0.83333333333333333 }; + + + double out [(COLUMNS2)*(LINES)] ; + + dldivma( in1 , LINES , COLUMNS1 , in2 , LINES , COLUMNS2 , out ) ; + for ( i = 0 ; i < LINES *COLUMNS2 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-15 ) ; + } + +} + + + +static void cldivmaTest (void ) +{ + int i = 0 ; + + float tin1[] = { 10.0f , 9.0f , 2.0f ,4.0f}; + float tin2[] = { 1.0f , 2.0f}; + + + + floatComplex* in1 ; + floatComplex* in2 ; + floatComplex* out ; + floatComplex Result[ZLINES*ZLINES] ; + + in1 = FloatComplexMatrix ( tin1 , tin1 , ZLINES*ZCOLUMNS1 ); + in2 = FloatComplexMatrix ( tin2 , tin2 , ZLINES*ZCOLUMNS2 ); + out = FloatComplexMatrix ( tin2 , tin2 , ZLINES*ZLINES ); + + Result[0] = FloatComplex ( 0 , 0 ); + Result[1] = FloatComplex ( 0.5f , 0 ); + + + cldivma ( in1 , ZLINES , ZCOLUMNS1 , in2 ,ZLINES , ZCOLUMNS2 , out) ; + + for ( i = 0 ; i < (ZCOLUMNS1*ZCOLUMNS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-06 && creals (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-16 ); + + + if ( cimags(out[i]) < 1e-06 && cimags (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-16 ) ; +} + +} + + + + + + + + + +static void zldivmaTest (void ) +{ + int i = 0 ; + + double tin1[] = { 10 , 9 , 2 ,4}; + double tin2[] = { 1 , 2}; +/* + double tin1[] = { 4 , 3 , 8 , 9 } ; + double tin2[] = { 1 , 3 , 2 , 4 } ; +*/ + + + doubleComplex* in1 ; + doubleComplex* in2 ; + doubleComplex* out ; + doubleComplex Result[ZLINES*ZLINES] ; + + in1 = DoubleComplexMatrix ( tin1 , tin1 , ZLINES*ZCOLUMNS1 ); + in2 = DoubleComplexMatrix ( tin2 , tin2 , ZLINES*ZCOLUMNS2 ); + out = DoubleComplexMatrix ( tin2 , tin2 , ZLINES*ZLINES ); + + Result[0] = DoubleComplex ( 0 , 0 ); + Result[1] = DoubleComplex ( 0.5 , 0 ); + /* + Result[0] = DoubleComplex ( -1.25 , 0 ); + Result[1] = DoubleComplex ( 0.75 , 0 ); + Result[2] = DoubleComplex ( -1.16666666 , 0 ); + Result[3] = DoubleComplex ( 0.833333333333 , 0 ); */ + + zldivma ( in1 , ZLINES , ZCOLUMNS1 , in2 ,ZLINES , ZCOLUMNS2 , out) ; + + for ( i = 0 ; i < (ZCOLUMNS1*ZCOLUMNS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + if ( zreals(out[i]) < 1e-16 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-16 ); + + + if ( zimags(out[i]) < 1e-16 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-16 ) ; + + } + +} + + + +static void mytest (void ){ + double in1[2] = { 1 , 4 } ; + double in2[3] = { 1 , 2 , 3 }; + double out[6] = { 0 , 0 , 0 , 0 ,0 , 0 } ; + + int i = 0 ; + + dldivma ( in1 , 1, 2, in2 , 1, 3 , out ); + + for ( i = 0 ; i <6; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + +static int testLDivma (void) { + printf ("&&&& WARNING , TESTS FOR COMPLEX ARE STILL WRONG &&&&&&\n\n" ) ; + + printf("\n\n\n\n*********************\n"); + printf("***** Left Tests ****\n"); + printf("*********************\n"); + + + + printf("\n\n\n\t>>> MY TEST Tests\n"); + mytest () ; + + printf("\n\t>>>>Float real Tests\n"); + sldivmaTest(); + + printf("\n\n\n\t>>>> Double real Tests\n"); + dldivmaTest(); + + + + printf("\n\t>>>> Double complex Tests\n"); + zldivmaTest(); + printf("\n\t>>>> Float complex Tests\n"); + cldivmaTest(); + + return 0; +} + +int main(void) { + assert(testLDivma () == 0); + return 0; +} + diff --git a/src/c/matrixOperations/division/testMatrixRDivision.c b/src/c/matrixOperations/division/testMatrixRDivision.c new file mode 100644 index 0000000..9f4bf27 --- /dev/null +++ b/src/c/matrixOperations/division/testMatrixRDivision.c @@ -0,0 +1,504 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include <assert.h> +#include <stdio.h> +#include "matrixDivision.h" + +#define LINES1 2 +#define LINES2 1 +#define COLUMNS 2 + +#define ZLINES1 2 +#define ZLINES2 1 +#define ZCOLUMNS 2 + + + + +static void sdivmaTest ( void ) +{ + int i = 0 ; +/* + float in1[] = + {0.51323400903493166f,0.6807207581587136f,0.54669387824833393f,0.24904179340228438f, + 0.95017496403306723f,0.91187966475263238f,0.78931419923901558f,0.30985609395429492f, + 0.71984737459570169f,0.9819172923453152f,0.76060794852674007f,0.504620002117008f, + 0.06844846438616514f,0.1693508871831f,0.76318027824163437f,0.30514528928324580f, + 0.92679917532950640f,0.04813073994591832f,0.93056132830679417f,0.31760499393567443f, +0.20109100220724940f,0.75775502342730761f,0.15586951794102788f,0.59756303764879704f, + 0.93055095290765166f,0.94091763999313116f,0.42790159443393350f,0.01439402624964714f, + 0.85971397114917636f,0.11901073250919580f,0.59864782588556409f,0.15444914810359478f, + 0.44080717256292701f,0.09636751096695662f,0.47461007768288255f,0.42803008854389191f, + 0.92924218205735087f,0.47864412236958742f,0.44434435339644551f,0.52509398944675922f, +0.78608208894729614f,0.46497652260586619f,0.06789979804307222f,0.24485790403559804f, + 0.71605867333710194f,0.99458031123504043f,0.84305586572736502f,0.45727639505639672f, + 0.29075053706765175f,0.55482550663873553f,0.28596154693514109f,0.07587631093338132f, + 0.66903266869485378f,0.32733985921368f,0.90166416298598051f,0.83553476119413972f, + 0.80835641175508499f,0.73590047238394618f,0.83198319096118212f,0.93355408729985356f, +0.78650354826822877f,0.74095427244901657f,0.95994638977572322f,0.51785656530410051f, + 0.78444739105179906f,0.13383972086012363f,0.43243235861882567f,0.74689115490764380f, + 0.96420694747939706f,0.22162469848990440f,0.41627834690734744f,0.81930211279541254f, + 0.21618453459814191f,0.08386900834739208f,0.48852836480364203f,0.20842899661511183f, + 0.22902313107624650f,0.78962677717208862f,0.25109061924740672f,0.57858273852616549f, +0.69515300076454878f,0.48902340466156602f,0.47249071300029755f,0.59868981270119548f, + 0.75798543263226748f,0.80475882859900594f,0.61186199076473713f,0.6943939602933824f, + 0.10014689620584249f,0.01250550756230950f,0.47080435231328011f,0.58039451343938708f, + 0.95630660001188517f,0.32801365898922086f,0.27026554010808468f,0.52016736706718802f, + 0.16067446302622557f,0.04408275568857789f,0.88035558909177780f,0.92851745663210750f, +0.42481321236118674f,0.73924016486853361f,0.16896168375387788f,0.39154956489801407f, + 0.97163037536665797f,0.88981838244944811f,0.90427244128659368f,0.31537816859781742f, + 0.06473635649308562f,0.58296835329383612f,0.14059370616450906f,0.63762421533465385f, + 0.67373040271922946f,0.44792105350643396f,0.60066422121599317f,0.06632651202380657f, + 0.66453591873869300f,0.19733488839119673f,0.45683057839050889f,0.08710412681102753f, +0.34466254524886608f,0.09304937114939094f,0.06055234652012587f,0.10790407890453935f, + 0.15703585743904114f,0.72192603675648570f,0.34105927217751741f,0.62482782872393727f, + 0.68893781490623951f,0.03671516245231032f,0.98292266484349966f,0.73650254914537072f, + 0.13196587935090065f,0.18807678623124957f,0.43376339320093393f,0.47929613338783383f, + 0.15195304714143276f,0.18539744755253196f,0.92726647388190031f,0.80549291754141450f, +0.64977857517078519f,0.70831089280545712f,0.90016864379867911f,0.51403949689120054f, + 0.49954565847292542f,0.55090149492025375f,0.92046913085505366f,0.74058383423835039f, + 0.82662396552041173f,0.3313873652368784f,0.68757036840543151f,0.06999884452670813f, + 0.41287241736426950f,0.04925781115889549f,0.85545881045982242f,0.31712341401726007f, + 0.03992868261411786f,0.92384314350783825f,0.74299975624307990f,0.00424729567021132f, +0.01225362811237574f,0.3223448325879872f,0.93296645395457745f,0.08063758304342628f, + 0.74957344215363264f,0.82469086581841111f,0.35314525663852692f,0.44088636664673686f, + 0.79343967605382204f,0.06321920128539205f,0.87087013013660908f,0.05352633958682418f, + 0.47160778101533651f,0.38195306668058038f,0.04547535255551338f,0.02313599688932300f, + 0.63996278587728739f,0.36444053100422025f,0.37049167416989803f,0.76907502254471183f, +0.89965870184823871f,0.89933154825121164f,0.64569224463775754f,0.34696785174310207f, + 0.39040711661800742f,0.08694788347929716f,0.22625351930037141f,0.21681279689073563f, + 0.33453882811591029f,0.15584628004580736f,0.95653126062825322f,0.83982629515230656f, + 0.50479181623086333f,0.54758223798125982f,0.83060362795367837f,0.21214072033762932f, + 0.02860224200412631f,0.95791505370289087f,0.91556971566751599f,0.94719038717448711f, +0.30791273340582848f,0.81771020544692874f,0.74679336044937372f,0.87552759842947125f, + 0.49545058421790600f,0.48191254725679755f,0.39087839704006910f,0.88425681227818131f, + 0.54299664497375488f,0.20552197424694896f,0.31019500363618135f,0.57183724315837026f, + 0.54999292083084583f,0.12055991357192397f,0.26517685409635305f,0.29529260704293847f, + 0.95132300630211830f,0.57458581728860736f,0.71528563741594553f,0.91191364871338010f, +0.18359116325154901f,0.45608301833271980f,0.17441136343404651f,0.18253823462873697f, + 0.77341705607250333f,0.01534702442586422f,0.27907355269417167f,0.94600243400782347f, + 0.39083331311121583f,0.35583620518445969f,0.58566563902422786f,0.44004907924681902f, + 0.79277362348511815f,0.96740394271910191f,0.06400812184438109f,0.07406814303249121f, + 0.03709788480773568f,0.85063817724585533f,0.10404936922714114f,0.12005183193832636f, +0.52963322307914495f,0.42104291776195168f,0.92252827808260918f,0.17444357229396701f, + 0.34813721571117640f,0.98178615467622876f,0.51038642041385174f,0.35229418566450477f, + 0.33187932055443525f,0.12522496515884995f,0.17751775681972504f,0.30953403143212199f, + 0.30514361429959536f,0.69633625121787190f,0.58739017136394978f,0.95729830628260970f, + 0.78135449346154928f,0.41670671710744500f,0.55824907496571541f,0.17518991930410266f, +0.11329598492011428f,0.87877958174794912f,0.81112976977601647f,0.1327551044523716f, + 0.88772260351106524f,0.77383322361856699f,0.39891980635002255f,0.42609489522874355f, + 0.29346287390217185f,0.29799025785177946f,0.62878308678045869f,0.90327445417642593f, + 0.88942573545500636f,0.11638559121638536f,0.92788035096600652f,0.30957929231226444f, + 0.2565767071209848f,0.42655616905540228f,0.26941573480144143f,0.65786541625857353f, +0.98608913458883762f,0.04273471748456359f,0.26294819917529821f,0.66961710015311837f, + 0.19781696423888206f,0.62439860356971622f,0.25354105327278376f,0.55396229820325971f, + 0.92479544691741467f,0.09095242014154792f,0.63873832207173109f,0.97996837133541703f, + 0.67638632655143738f,0.89037371007725596f,0.41085386741906404f,0.07612052233889699f, + 0.31289586611092091f,0.62697393959388137f,0.15661530848592520f,0.28013094374909997f}; + +float in2[] = + {0.56034345272928476f,0.89566554129123688f,0.53930272068828344f,0.3547350224107504f, + 0.80800013709813356f,0.62323769554495811f,0.58200186025351286f,0.56180121190845966f, + 0.23549679014831781f,0.28873602300882339f,0.43252215441316366f,0.7673156540840864f, + 0.06873596925288439f,0.18797885254025459f,0.86748637538403273f,0.73920361138880253f, + 0.97392784897238016f,0.86080306768417358f,0.39093428757041693f,0.57339327596127987f, +0.16198171628639102f,0.66783405328169465f,0.1454864419065416f,0.32747871475294232f, + 0.51621831534430385f,0.79978153714910150f,0.09275748720392585f,0.14153907122090459f, + 0.06119967205449939f,0.32070356840267777f,0.73968251561746001f,0.37837028549984097f, + 0.56752133695408702f,0.11224916437640786f,0.28770424565300345f,0.00037088664248586f, + 0.79149663401767612f,0.58377730334177613f,0.59390504425391555f,0.02694623963907361f, +0.76592414453625679f,0.02564378362149000f,0.74512455798685551f,0.02366107050329447f, + 0.06156063079833984f,0.04258572962135077f,0.63941287063062191f,0.38405111897736788f, + 0.14321060106158257f,0.42103306483477354f,0.05339348502457142f,0.93415357265621424f, + 0.59929492324590683f,0.66478141304105520f,0.14329732768237591f,0.42867958266288042f, + 0.10990926995873451f,0.63394964020699263f,0.05351450480520725f,0.54702291730791330f, +0.69746216991916299f,0.03159578284248710f,0.25769635709002614f,0.59392183972522616f, + 0.01609914982691407f,0.86753786867484450f,0.32879876391962171f,0.22861831961199641f, + 0.33929981896653771f,0.75886590173467994f,0.61312689306214452f,0.48855357570573688f, + 0.10645245248451829f,0.14542592084035277f,0.18745915638282895f,0.87820987729355693f, + 0.92918653646484017f,0.92348486324772239f,0.39261205168440938f,0.68466226710006595f, +0.08946218248456717f,0.42732305638492107f,0.77090662438422441f,0.924068246036768f, + 0.50982708018273115f,0.34508761204779148f,0.10317245963960886f,0.63696919381618500f, + 0.88041578140109777f,0.65034613572061062f,0.80938913393765688f,0.9986613355576992f, + 0.38141551148146391f,0.43060396797955036f,0.61948752496391535f,0.80996788293123245f, + 0.05324298795312643f,0.29668187908828259f,0.00448737759143114f,0.82276185229420662f, +0.19805425917729735f,0.10866974340751767f,0.99788628844544291f,0.6723356381990016f, + 0.46966064115986228f,0.79823006363585591f,0.67132972134277225f,0.35570297623053193f, + 0.52579802041873336f,0.25843874411657453f,0.19287035940214992f,0.59324032673612237f, + 0.25955950608476996f,0.61404782952740788f,0.21750316722318530f,0.81994143361225724f, + 0.19624035572633147f,0.8358787004835904f,0.42109713284298778f,0.31491625169292092f, +0.25988535769283772f,0.76794129703193903f,0.84549946337938309f,0.48446214850991964f, + 0.52822500281035900f,0.37241784948855639f,0.85067357495427132f,0.16846220474690199f, + 0.71482414938509464f,0.78300847951322794f,0.54156896471977234f,0.89239248540252447f, + 0.00643130205571651f,0.21658254135400057f,0.44520513340830803f,0.32618630956858397f, + 0.52326664514839649f,0.32250450644642115f,0.26230763643980026f,0.23438148852437735f, +0.50999558391049504f,0.37397424085065722f,0.64668390387669206f,0.64172910666093230f, + 0.03306737588718534f,0.18668571440503001f,0.83025926211848855f,0.99121205648407340f, + 0.38945918949320912f,0.27384403301402926f,0.41589357936754823f,0.99599931901320815f, + 0.81049045221880078f,0.96830060658976436f,0.40803860733285546f,0.52525822212919593f, + 0.33058117749169469f,0.23706211848184466f,0.17479355866089463f,0.62723324215039611f, +0.16741782892495394f,0.15187738463282585f,0.72003478836268187f,0.59474316425621510f, + 0.71126131806522608f,0.50548844784498215f,0.43874060269445181f,0.84671537391841412f, + 0.46396317798644304f,0.84823036566376686f,0.28646126668900251f,0.48104315437376499f, + 0.26604998949915171f,0.66378767788410187f,0.63686545100063086f,0.79531485401093960f, + 0.95694970060139894f,0.70720722898840904f,0.83713256847113371f,0.62996550090610981f, +0.34009417472407222f,0.72199993440881371f,0.67456434061750770f,0.10675506712868810f, + 0.79017778439447284f,0.34282173449173570f,0.58765271818265319f,0.07389529095962644f, + 0.16408033994957805f,0.12704358855262399f,0.51104495069012046f,0.07703803153708577f, + 0.12485344661399722f,0.51966900611296296f,0.49762418633326888f,0.77279568510130048f, + 0.95798523304983974f,0.22388020763173699f,0.83013197174295783f,0.04275623383000493f}; + + +float result[] = +{-0.13425098694507090f,0.24735018618193444f,-0.13997367470679392f,0.11987585715392905f, + -0.07023550140255914f,-0.32818483956327921f,0.82293845909628660f,-0.04825208923032670f, + 0.41107043821212774f,0.28834120500378574f, +0.26097631689267364f,0.41112922481604613f,-0.48704150701173060f,0.16756167892414930f, + 0.18525816194433214f,0.24194769618197037f,0.04516579999951376f,0.08210988946198612f, + -0.17724539433971653f,0.21570365259908197f, +0.46476238563747729f,0.12929328091152756f,0.03791742144738922f,0.33232469296313982f, + -0.14531956716307623f,-0.04355937726216118f,-0.32871318476723438f,0.16208735115250936f, + 0.27759742819012267f,0.20883772519304408f, +0.60589399320385928f,0.06028369176400562f,0.33610957414517950f,-0.32741653379843827f, + 0.32006732568590329f,0.12357809346654614f,0.26645037101516444f,-0.15778041923768410f, + -0.02281069075548223f,-0.21831876232917027f, +0.11316162639341981f,0.44869069077875356f,0.05087241573803265f,-0.07310286041500898f, + 0.24172631454502305f,0.20582249789901347f,-0.49030030296647070f,0.49725834464740676f, + -0.15098926456955386f,0.29845287904710704f, +0.26126025652717821f,0.61602266860724408f,-0.04395376298763495f,-0.31468851985942192f, + -0.42610430769336133f,0.07619666627024707f,0.42141080474076514f,0.34732212135875368f, + 0.21966932936729675f,-0.16465486570712187f, +0.01801836442044520f,0.13867951307716378f,-0.22823955222461578f,0.35528257041935002f, + 0.3416886047495104f,-0.05324845913867078f,-0.18334602929956423f,0.34486570917896908f, + -0.09850219178062529f,0.15717539967151753f, +0.26027320955453370f,0.24744146889140337f,-0.164185466873868f,-0.18897859269730288f, + -0.10286928200189474f,0.54800666111794050f,0.32097861553203794f,0.16617893447929227f, + -0.03433269255504845f,-0.01421332288783149f, +-0.24887241840873561f,0.52303584234440914f,0.02976416459895397f,-0.12264750867737524f, + 0.30087087321455463f,0.28120264259279731f,-0.02981261204955734f,-0.05832040687613257f, + 0.09480786369785668f,0.26640553810556677f, +0.28112837735944118f,0.53844297257991636f,0.87478164836631844f,-0.1409682347398108f, + 0.66145942836153393f,-0.26119505204825816f,-0.34297154024663806f,-0.24798246038042729f, + -0.30432340939641339f,0.37887301625026215f, +0.38327878821721156f,0.28922881585078497f,-0.34742629642806333f,-0.03677194909448467f, + -0.04829379940842784f,0.06878313210496664f,0.04495930782786764f,0.47892284040726463f, + 0.32833980213443120f,-0.23534654463679133f, +-0.02763634740677747f,0.72078725530634646f,0.48763002329592203f,-0.57876872035917137f, + 0.23063708055466298f,0.04745273757978258f,-0.28751023415434818f,0.138229588096174f, + 0.36392895348902060f,-0.15741181362164816f, +0.13480297497174423f,-0.06082319210597478f,-0.03346206227374363f,0.157369564795072f, + -0.09939329142432089f,0.50801256096451919f,-0.21552055455365590f,0.18726599728475304f, + -0.09981549922929681f,0.56837678961938298f, +0.51101691288362061f,0.72117205689181529f,0.47311124338037619f,-0.59816447223287172f, + 0.56148184747810326f,0.06803537921378118f,-0.12236345370998958f,-0.2366952577209536f, + -0.10560524465448745f,-0.03700000431544657f, +-0.07318875604760167f,0.49681103126620946f,0.16658812117729807f,0.19247716660649325f, + 0.17479922937365650f,0.20305642078183334f,-0.11893261285117168f,0.52167729786941019f, + -0.26590601210923126f,-0.17052720242327102f}; + */ + + /*float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ; + float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ; + float result[] = { 4.0f , 7.5f , 0.0f ,-1.5f }; +float out[(COLUMNS)*(LINES2)] ;*/ + + float in1[] = { 1.0f ,3.0f ,2.0f ,4.0f } ; + float in2[] = { 1.0f , 2.0f } ; + float result[] = { 1.0f , 2.2f }; + float out [(COLUMNS)*(LINES2)] ; + + + + srdivma ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ; + + for ( i = 0 ; i < LINES2 *COLUMNS ; ++i ) + { + printf ( "\t\t %d out : %e result : %e assert : %e \n" , + i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-6 ) ; + } + +} + + + + + + + +static void drdivmaTest ( void ) +{ + int i = 0 ; + +/* double in1[] = { 4 , 3 , 8 , 9 } ; + double in2[] = { 1 , 3 , 2 , 4 } ; + double result[] = { 4 , 7.5 , 0 ,-1.5 };*/ + + + double in1[] = { 1 ,3 ,2 ,4 } ; + double in2[] = { 1 , 2 } ; + double result[] = { 1 , 2.2 }; + double out [(COLUMNS)*(LINES2)] ; + + drdivma ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ; + for ( i = 0 ; i < LINES2 *COLUMNS ; i++ ) + { + printf ( "\t\t %d out : %e result : %e assert : %e \n" , + i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-16 ) ; + } + +} + +static void crdivmaTest (void ) +{ + int i = 0 ; + + float tin1[] = { 1.0f , 3.0f , 2.0f ,4.0f}; + float tin2[] = { 1.0f , 2.0f}; + + + floatComplex* in1 ; + floatComplex* in2 ; + floatComplex out[ZLINES2*ZCOLUMNS] ; + floatComplex Result[ZLINES1*ZLINES2] ; + + in1 = FloatComplexMatrix ( tin1 , tin1 , ZLINES1*ZCOLUMNS ); + in2 = FloatComplexMatrix ( tin2 , tin2 , ZLINES2*ZCOLUMNS ); + + + Result[0] = FloatComplex ( 1.0f , 0 ); + Result[1] = FloatComplex ( 2.2f , 0 ); + + crdivma ( in1 , ZLINES1 , ZCOLUMNS , in2 ,ZLINES2 , ZCOLUMNS , out) ; + + for ( i = 0 ; i < (ZLINES2*ZCOLUMNS ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-06 && creals (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-16 ); + + + if ( cimags(out[i]) < 1e-06 && cimags (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-16 ) ; + + } + +} + + + + + +static void zrdivmaTest ( void ){ + int i = 0 ; + +/* double tin1 [] = + {0.69949407549574971,0.25834653992205858,0.61552664963528514,0.19030105322599411, + 0.46075769001618028,0.52200102340430021,0.70538004627451301,0.88748936913907528, + 0.18582182424142957,0.09225247148424387,0.37796644819900393,0.93693156912922859, + 0.19805216649547219, +0.47020285483449697,0.37788185989484191,0.36296494491398335,0.27933338703587651, + 0.67214426863938570,0.69089507637545466,0.5104757994413376,0.06106034899130464, + 0.93353842478245497,0.14489983161911368,0.57212112657725811,0.54598869429901242, + 0.05166801903396845, +0.50110132200643420,0.92609716579318047,0.85469480464234948,0.58570997323840857, + 0.8791871047578752,0.25320483185350895,0.7903951373882592,0.63298055250197649, + 0.86023237137123942,0.90196201950311661,0.31587493652477860,0.40010235738009214, + 0.11108959605917335, +0.47051278315484524,0.53627631859853864,0.28784319106489420,0.87401255918666720, + 0.07408339157700539,0.28149573365226388,0.70837680157274008,0.16526474570855498, + 0.26673525758087635,0.88194080116227269,0.35371549893170595,0.02646211860701442, + 0.08616474270820618, +0.23139652097597718,0.13406464736908674,0.67240026732906699,0.19029983691871166, + 0.73075085924938321,0.50484903249889612,0.87911593122407794,0.55444371327757835, + 0.2063297093845904,0.40116110350936651,0.45593289798125625,0.69771515764296055, + 0.39659122796729207, +0.49838109035044909,0.14524227706715465,0.90753587335348129,0.10092954570427537, + 0.01771899592131376,0.79376714816316962,0.43091466091573238,0.58433785336092114, + 0.79542846325784922,0.13906158460304141,0.10127847269177437,0.331680862698704, + 0.83444251772016287, +0.05499405181035399,0.36960034258663654,0.74532664241269231,0.05718118418008089, + 0.59996518073603511,0.20857419073581696,0.87988782906904817,0.47828097920864820, + 0.71160991629585624,0.85858650319278240,0.80782221304252744,0.51599627826362848, + 0.89173404080793262, +0.88423488661646843,0.70964269945397973,0.66102255787700415,0.72523507243022323, + 0.51014349795877934,0.28248664410784841,0.22149151284247637,0.57675753859803081, + 0.70482534915208817,0.56079456442967057,0.36288804840296507,0.30883262446150184, + 0.98134148679673672, +0.74284822540357709,0.16163914743810892,0.36525219632312655,0.38350704684853554, + 0.11691810050979257,0.89112461265176535,0.06342720007523894,0.62639418430626392, + 0.68077020766213536,0.25885968375951052,0.43948043463751674,0.85988187789916992, + 0.54828232014551759, +0.81359952967613935,0.48982370039448142,0.02400260977447033,0.73691955255344510, + 0.24111561570316553,0.15296932263299823,0.26483592018485069,0.42981932172551751, + 0.76739394571632147,0.87532604997977614,0.37969883717596531,0.30623568268492818, + 0.38800517935305834} +; + double tin2[] = + {0.10472932783886790,0.76038318127393723,0.03409303957596421,0.14239662420004606, + 0.55545594682916999,0.80318974517285824,0.51839923160150647, +0.15185610298067331,0.58847306622192264,0.25450934842228889,0.99926799396052957, + 0.63989769574254751,0.55067161237820983,0.46070076711475849, +0.59330079378560185,0.65381935704499483,0.41683405218645930,0.99101553857326508, + 0.37207804108038545,0.70618240814656019,0.57808654149994254, +0.60231964103877544,0.57150967465713620,0.05496290419250727,0.12058544857427478, + 0.01436204835772514,0.02579512307420373,0.84112487640231848, +0.43818825250491500,0.46434015966951847,0.41974264057353139,0.80236544925719500, + 0.52285881666466594,0.50951210409402847,0.45319801801815629, +0.78178183268755674,0.77655703714117408,0.04660592041909695,0.51133266882970929, + 0.75021018926054239,0.68836286617442966,0.01677561178803444, +0.93454108992591500,0.56098637636750937,0.22058471059426665,0.76485407538712025, + 0.48169769765809178,0.15587856341153383,0.24760220525786281, +0.5216529071331024,0.08052303874865174,0.44094172399491072,0.89119336148723960, + 0.97805908136069775,0.45880937622860074,0.55104400310665369, +0.09609609050676227,0.41967850551009178,0.75025565037503839,0.72181495930999517, + 0.28955410188063979,0.39077644981443882,0.66866181464865804, +0.48776568192988634,0.46859717695042491,0.35626485198736191,0.34423254663124681, + 0.42533078324049711,0.55880581727251410,0.33048649691045284}; + + double tresult [] = +{0.09451169317317064,0.75015055776907902,0.36496074775718695,0.68454978838459446, + 0.13580235186649750,-0.73350613524989861,0.36833823393043919,0.27427787570717332, + 0.17435767433670571,1.27922130237729870,-0.15718152608891298,-0.66812523122285583, + 0.43535989166783623, +-0.17216817930992268,-1.11920478787033972,0.09365729285784405,-0.91168598672719281, + -0.5256902016286176,1.47418373212534837,0.32785551967187748,0.09665910045214705, + 0.38963814934750451,-0.74599090807052515,0.77435560834796702,1.17862196275483577, + 0.41913747422722752, +0.65168405083167491,-0.79778304970274549,-0.36689764540805470,-0.07037790812871010, + -0.90964747913660449,0.87009086524746737,-0.86086796711204328,0.69420170666117553, + 0.39900228216491013,0.01839542030829135,0.34079166496122038,0.94979559344928910, + 1.29342689865858507, +-0.64010890644433138,0.43942520236508265,0.36871562427022309,-0.23543430717113373, + 0.9837594524525952,-0.15541789413277388,0.51832027142464965,-0.49730447418173146, + 0.37785363034287500,0.05031307256758123,0.14529056591993289,-0.19261761155662854, + -0.65165849136819898, +0.56992829732488970,-0.67626872453203313,0.08987541550832115,-0.27809079516465274, + -0.52685742082861620,0.87085948155471882,-0.36015598439076552,0.24628281709439132, + 0.16018284982540432,-0.78765458348414275,0.4868803314915888,0.67004786693098373, + 1.38638653773561149, +0.49065638508775172,1.15002211885645633,0.31098171282535453,0.772677804931936, + 0.77563266454559698,-0.93158860042668212,0.20092451587523308,0.56834988643083173, + -0.03774794264631696,0.70322729924980754,-0.84660509947179974,-0.48910607201144141, + -0.91999377725600595, +0.57044463605090034,0.85729374705550832,0.03549271915962299,1.08806327983132478, + 0.40323683962485551,-0.27978276073461661,0.45277262688908537,0.06218152458345420, + -0.2153422115217984,0.68840508909853904,0.09945644614561956,-0.17861252621808085, + -0.44037299008464365} +;*/ + + double bR[6]={1,4,2,5,3,6}; + double bI[6]={1,0,4,0,1,2}; + double dR[9]={4,8,3,2,8,4,3,4,5}; + double dI[9]={0,0,4,0,-1,0,0,0,0}; + double rR[6]={0.9845119462120300868335,1.191739704646416209144,- 0.1118981870572697823185, + 0.2069876335694560698375,0.0988113819185977154680,0.3193660703565854852570}; + double rI[6]={- 1.3492616160403412273183,- 0.3196061952215153434409,0.5309160763597071674980, + - 0.3168447592748228625048,0.5848241085364388469614,0.8452395245527674072505}; + doubleComplex* in1 ; + doubleComplex* in2 ; + doubleComplex* out ; + doubleComplex* Result ; + + in1 = DoubleComplexMatrix ( bR,bI,6 ); + in2 = DoubleComplexMatrix ( dR,dI,9 ); + out = (doubleComplex*)malloc((unsigned int)6*sizeof(doubleComplex)); + Result = (doubleComplex*)malloc((unsigned int)6*sizeof(doubleComplex)); + + Result = DoubleComplexMatrix ( rR , rI , 6 ); + + zrdivma ( in1 , 2 , 3 , in2 ,3 , 3 , out) ; + + for ( i = 0 ; i < (6 ) ; i++ ) + { + printf ( "\t\t %d out : %1.20f + %1.20f * i result : %1.20f + %1.20f * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + if ( zreals(out[i]) < 1e-16 && zreals (Result[i]) < 1e-16 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-16 && zimags (Result[i]) < 1e-16 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(Result); + free(out); +} + + + +static void mytest (void ){ + double in1[16] = { 1 , 5 , 9 , 13 } ; + double in2[16] = { 2 , 6 , 10 } ; + + double out[16] = { 0 } ; + + int i = 0 ; + + drdivma ( in1 , 1 , 4 , in2 ,1, 3 , out ); + + for ( i = 0 ; i <1; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + + +static int testRDivma (void) { + + printf("\n\n\n\n**********************\n"); + printf("***** Right Tests ****\n"); + printf("**********************\n"); + mytest ( ); + printf("\n\t>>>> Float real Tests\n"); + sdivmaTest(); + + printf("\n\n\n\n\t>>>> Double real Tests\n"); + drdivmaTest(); + + printf("\n\t>>>> Float complex Tests\n"); + crdivmaTest(); + + printf("\n\t>>>> Double complex Tests\n"); + zrdivmaTest(); + return 0; +} + + +int main(void) { + assert(testRDivma () == 0); + return 0; +} diff --git a/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj new file mode 100644 index 0000000..73c770d --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.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>{B1F2A8CE-764A-4D51-AABD-998D48783894}</ProjectGuid>
+ <RootNamespace>testMatrixLDivision</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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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="..\testMatrixLDivision.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="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</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/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters new file mode 100644 index 0000000..c7100b4 --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.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="..\testMatrixLDivision.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj new file mode 100644 index 0000000..5e554d6 --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.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>{33833932-6973-483B-B0D1-B3CC800BDFF5}</ProjectGuid>
+ <RootNamespace>testMatrixRDivision</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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/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="..\testMatrixRDivision.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="..\..\matrixOperations.vcxproj">
+ <Project>{fd335544-52bf-4736-a34e-77f591d158d5}</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/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters new file mode 100644 index 0000000..edfc100 --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.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="..\testMatrixRDivision.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/src/c/matrixOperations/division/zldivma.c b/src/c/matrixOperations/division/zldivma.c new file mode 100644 index 0000000..8557735 --- /dev/null +++ b/src/c/matrixOperations/division/zldivma.c @@ -0,0 +1,125 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include <string.h> +#include "matrixDivision.h" +#include "lapack.h" + +void zldivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ) +{ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int iRank = 0; + + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + doubleComplex *pAf = NULL; + doubleComplex *pXb = NULL; + doubleComplex *pDwork = NULL; + + + double *pRwork = NULL; + + + int *pIpiv = NULL; + int *pJpvt = NULL; + + iWork = max(2*columns2, min(lines2, columns2) + max(2 * min(lines2, columns2), max(lines2 + 1, min(lines2, columns2) + lines1))); + + + + /* Array allocations*/ + + + pAf = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) lines1 *(unsigned int)columns1); + pXb = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) max(lines1,columns1) *(unsigned int) columns2); + + + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns1); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)columns1); + pRwork = (double*)malloc(sizeof(double) * (unsigned int)columns1*2); + + + cNorm = '1'; + pDwork = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = C2F(zlange)(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + + if(lines1 == columns1) + { + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + + C2F(zlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, pXb, &columns1); + C2F(zgetrf)(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(zgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pRwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(zgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, pXb, &columns1, &iInfo); + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns2, pXb, &columns1, out, &columns1); + + iExit = 1; + } + + } + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(zlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int)columns1); + C2F(zgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &iRank, pDwork, &iWork, pRwork, &iInfo); + + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + + } + } + + + + + + free(pAf); + free(pXb); + free(pIpiv); + free(pJpvt); + free(pRwork); + free(pDwork); + +} diff --git a/src/c/matrixOperations/division/zrdivdzv.c b/src/c/matrixOperations/division/zrdivdzv.c new file mode 100644 index 0000000..eb17a8b --- /dev/null +++ b/src/c/matrixOperations/division/zrdivdzv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include "zeros.h" +#include "matrixDivision.h" + +doubleComplex zrdivdzv (double* in1, doubleComplex* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zrdivv(DoubleComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/src/c/matrixOperations/division/zrdivma.c b/src/c/matrixOperations/division/zrdivma.c new file mode 100644 index 0000000..73e69f4 --- /dev/null +++ b/src/c/matrixOperations/division/zrdivma.c @@ -0,0 +1,165 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include <string.h> +#include "matrixDivision.h" + +void zrdivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ) +{ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + + doubleComplex *poAf = NULL; + doubleComplex *poAt = NULL; + doubleComplex *poBt = NULL; + doubleComplex *poDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + double *pRwork = NULL; + + iWork = max(2*columns2, min(lines2, columns2) + max(2 * min(lines2, columns2), max(lines2 + 1, min(lines2, columns2) + lines1))); + + + + /* Array allocations*/ + + + poAf = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) lines2 *(unsigned int) columns2); + poAt = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines2 *(unsigned int) columns2); + poBt = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) max(lines2, columns2) *(unsigned int) lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns2); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) lines2); + pRwork = (double*)malloc(sizeof(double) * 2 *(unsigned int) lines2); + + + + cNorm = '1'; + poDwork = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = C2F(zlange)(&cNorm, &lines2, &columns2, in2, &lines2, poDwork); + + /* hermitian tranpose A (transpose + conjugate )*/ + + ztransposea(in2, lines2, columns2, poAt); + zconja ( poAt , lines2*columns2 , poAt ); + { + int i,j,ij,ji; + for(j = 0 ; j < lines1 ; j++) + { + for(i = 0 ; i < columns2 ; i++) + { + ij = i + j * max(lines2, columns2); + ji = j + i * lines1; + + poBt[ij] = DoubleComplex (zreals ( in1[ji] ) , - zimags ( in1[ji] ) ); + } + } + } + + if(lines2 == columns2) + { + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns2, &columns2, poAt, &columns1, poAf, &columns2); + C2F(zgetrf)(&columns2, &columns2, poAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(zgecon)(&cNorm, &columns2, poAf, &columns2, &dblAnorm, + &dblRcond, poDwork, pRwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(zgetrs)(&cNorm, &columns2, &lines1, poAf, &columns2, pIpiv, poBt, &columns2, &iInfo); + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = DoubleComplex ( zreals( poBt[ji]) , -zimags ( poBt[ji])); + + } + } + } + + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + + memset(pJpvt, 0x00,(unsigned int) sizeof(int) *(unsigned int) lines2); + C2F(zgelsy)(&columns2, &lines2, &lines1, poAt, &columns2, poBt, &iMax, + pJpvt, &dblRcond, &pRank[0], poDwork, &iWork, pRwork, &iInfo); + + if(iInfo == 0) + { + + /*// TransposeRealMatrix(pBt, lines1, lines2, _pdblRealOut, Max(lines1,columns1), lines2); + + //Mega caca de la mort qui tue des ours a mains nues + //mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = DoubleComplex ( zreals( poBt[ji]) , -zimags ( poBt[ji])); + } + } + } + } + } + + + + free(poAf); + free(poAt); + free(poBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pRwork); + free(poDwork); + +} + + diff --git a/src/c/matrixOperations/division/zrdivv.c b/src/c/matrixOperations/division/zrdivv.c new file mode 100644 index 0000000..f06abc4 --- /dev/null +++ b/src/c/matrixOperations/division/zrdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 "division.h" +#include "matrixDivision.h" + +doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size){ + + doubleComplex out[1] ={ DoubleComplex (0.0 , 0.0) }; + zrdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + diff --git a/src/c/matrixOperations/division/zrdivzdv.c b/src/c/matrixOperations/division/zrdivzdv.c new file mode 100644 index 0000000..9a0e283 --- /dev/null +++ b/src/c/matrixOperations/division/zrdivzdv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * 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 <stdlib.h> +#include "zeros.h" +#include "matrixDivision.h" + +doubleComplex zrdivzdv (doubleComplex* in1,double* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zrdivv(in1 , DoubleComplexMatrix(in2,ZEROS,size),size ); + } |