diff options
author | simon | 2008-07-11 14:22:34 +0000 |
---|---|---|
committer | simon | 2008-07-11 14:22:34 +0000 |
commit | a8f869f7366dc0125c897a60f23e8aec655c8e7d (patch) | |
tree | 1a256d64a61703cb10ece9ad493aa6b231952c42 /src/matrixOperations | |
parent | 44764e5349583f1cb88ce76c299c04df5c7adfef (diff) | |
download | scilab2c-a8f869f7366dc0125c897a60f23e8aec655c8e7d.tar.gz scilab2c-a8f869f7366dc0125c897a60f23e8aec655c8e7d.tar.bz2 scilab2c-a8f869f7366dc0125c897a60f23e8aec655c8e7d.zip |
added tranpose operation
Diffstat (limited to 'src/matrixOperations')
-rw-r--r-- | src/matrixOperations/transpose/Makefile.am | 42 | ||||
-rw-r--r-- | src/matrixOperations/transpose/Makefile.in | 638 | ||||
-rw-r--r-- | src/matrixOperations/transpose/ctransposea.c | 28 | ||||
-rw-r--r-- | src/matrixOperations/transpose/dtransposea.c | 28 | ||||
-rw-r--r-- | src/matrixOperations/transpose/stransposea.c | 27 | ||||
-rw-r--r-- | src/matrixOperations/transpose/testMatrixTranspose.c | 520 | ||||
-rw-r--r-- | src/matrixOperations/transpose/ztransposea.c | 28 |
7 files changed, 1311 insertions, 0 deletions
diff --git a/src/matrixOperations/transpose/Makefile.am b/src/matrixOperations/transpose/Makefile.am new file mode 100644 index 00000000..8c8bf385 --- /dev/null +++ b/src/matrixOperations/transpose/Makefile.am @@ -0,0 +1,42 @@ +## +## 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 +## +## + +libMatrixTranspose_la_CFLAGS = -I $(top_builddir)/type \ + -I $(top_builddir)/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixTranspose.la + +HEAD = ../includes/matrixTranspose.h + +libMatrixTranspose_la_SOURCES = $(HEAD) \ + stransposea.c \ + dtransposea.c \ + ctransposea.c \ + ztransposea.c + +check_PROGRAMS = testMatrixTranspose + +check_LDADD = $(top_builddir)/type/libDoubleComplex.la \ + $(top_builddir)/type/libFloatComplex.la \ + $(top_builddir)/lib/blas/libsciblas.la \ + libMatrixTranspose.la + +check_INCLUDES = -I $(top_builddir)/type \ + -I $(top_builddir)/matrixOperations/includes + +testMatrixTranspose_SOURCES = testMatrixTranspose.c +testMatrixTranspose_LDADD = $(check_LDADD) +testMatrixTranspose_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixTranspose diff --git a/src/matrixOperations/transpose/Makefile.in b/src/matrixOperations/transpose/Makefile.in new file mode 100644 index 00000000..3ca388d8 --- /dev/null +++ b/src/matrixOperations/transpose/Makefile.in @@ -0,0 +1,638 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 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@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@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 = testMatrixTranspose$(EXEEXT) +TESTS = testMatrixTranspose$(EXEEXT) +subdir = matrixOperations/transpose +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 = +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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkglibdir)" +pkglibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixTranspose_la_LIBADD = +am__objects_1 = +am_libMatrixTranspose_la_OBJECTS = $(am__objects_1) \ + libMatrixTranspose_la-stransposea.lo \ + libMatrixTranspose_la-dtransposea.lo \ + libMatrixTranspose_la-ctransposea.lo \ + libMatrixTranspose_la-ztransposea.lo +libMatrixTranspose_la_OBJECTS = $(am_libMatrixTranspose_la_OBJECTS) +libMatrixTranspose_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixTranspose_OBJECTS = \ + testMatrixTranspose-testMatrixTranspose.$(OBJEXT) +testMatrixTranspose_OBJECTS = $(am_testMatrixTranspose_OBJECTS) +testMatrixTranspose_DEPENDENCIES = $(check_LDADD) +testMatrixTranspose_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixTranspose_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 +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 = $(libMatrixTranspose_la_SOURCES) \ + $(testMatrixTranspose_SOURCES) +DIST_SOURCES = $(libMatrixTranspose_la_SOURCES) \ + $(testMatrixTranspose_SOURCES) +ETAGS = etags +CTAGS = ctags +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@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +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_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@ +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_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixTranspose_la_CFLAGS = -I $(top_builddir)/type \ + -I $(top_builddir)/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixTranspose.la +HEAD = ../includes/matrixTranspose.h +libMatrixTranspose_la_SOURCES = $(HEAD) \ + stransposea.c \ + dtransposea.c \ + ctransposea.c \ + ztransposea.c + +check_LDADD = $(top_builddir)/type/libDoubleComplex.la \ + $(top_builddir)/type/libFloatComplex.la \ + $(top_builddir)/lib/blas/libsciblas.la \ + libMatrixTranspose.la + +check_INCLUDES = -I $(top_builddir)/type \ + -I $(top_builddir)/matrixOperations/includes + +testMatrixTranspose_SOURCES = testMatrixTranspose.c +testMatrixTranspose_LDADD = $(check_LDADD) +testMatrixTranspose_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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign matrixOperations/transpose/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign matrixOperations/transpose/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 +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \ + 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 +libMatrixTranspose.la: $(libMatrixTranspose_la_OBJECTS) $(libMatrixTranspose_la_DEPENDENCIES) + $(libMatrixTranspose_la_LINK) -rpath $(pkglibdir) $(libMatrixTranspose_la_OBJECTS) $(libMatrixTranspose_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +testMatrixTranspose$(EXEEXT): $(testMatrixTranspose_OBJECTS) $(testMatrixTranspose_DEPENDENCIES) + @rm -f testMatrixTranspose$(EXEEXT) + $(testMatrixTranspose_LINK) $(testMatrixTranspose_OBJECTS) $(testMatrixTranspose_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-ctransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-dtransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-stransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-ztransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(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@ mv -f $(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@ mv -f $(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 $@ $< + +libMatrixTranspose_la-stransposea.lo: stransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-stransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-stransposea.Tpo -c -o libMatrixTranspose_la-stransposea.lo `test -f 'stransposea.c' || echo '$(srcdir)/'`stransposea.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTranspose_la-stransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-stransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stransposea.c' object='libMatrixTranspose_la-stransposea.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) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-stransposea.lo `test -f 'stransposea.c' || echo '$(srcdir)/'`stransposea.c + +libMatrixTranspose_la-dtransposea.lo: dtransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-dtransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-dtransposea.Tpo -c -o libMatrixTranspose_la-dtransposea.lo `test -f 'dtransposea.c' || echo '$(srcdir)/'`dtransposea.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTranspose_la-dtransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-dtransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtransposea.c' object='libMatrixTranspose_la-dtransposea.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) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-dtransposea.lo `test -f 'dtransposea.c' || echo '$(srcdir)/'`dtransposea.c + +libMatrixTranspose_la-ctransposea.lo: ctransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-ctransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-ctransposea.Tpo -c -o libMatrixTranspose_la-ctransposea.lo `test -f 'ctransposea.c' || echo '$(srcdir)/'`ctransposea.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTranspose_la-ctransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-ctransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctransposea.c' object='libMatrixTranspose_la-ctransposea.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) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-ctransposea.lo `test -f 'ctransposea.c' || echo '$(srcdir)/'`ctransposea.c + +libMatrixTranspose_la-ztransposea.lo: ztransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-ztransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-ztransposea.Tpo -c -o libMatrixTranspose_la-ztransposea.lo `test -f 'ztransposea.c' || echo '$(srcdir)/'`ztransposea.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMatrixTranspose_la-ztransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-ztransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztransposea.c' object='libMatrixTranspose_la-ztransposea.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) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-ztransposea.lo `test -f 'ztransposea.c' || echo '$(srcdir)/'`ztransposea.c + +testMatrixTranspose-testMatrixTranspose.o: testMatrixTranspose.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -MT testMatrixTranspose-testMatrixTranspose.o -MD -MP -MF $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo -c -o testMatrixTranspose-testMatrixTranspose.o `test -f 'testMatrixTranspose.c' || echo '$(srcdir)/'`testMatrixTranspose.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTranspose.c' object='testMatrixTranspose-testMatrixTranspose.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) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -c -o testMatrixTranspose-testMatrixTranspose.o `test -f 'testMatrixTranspose.c' || echo '$(srcdir)/'`testMatrixTranspose.c + +testMatrixTranspose-testMatrixTranspose.obj: testMatrixTranspose.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -MT testMatrixTranspose-testMatrixTranspose.obj -MD -MP -MF $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo -c -o testMatrixTranspose-testMatrixTranspose.obj `if test -f 'testMatrixTranspose.c'; then $(CYGPATH_W) 'testMatrixTranspose.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTranspose.c'; fi` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTranspose.c' object='testMatrixTranspose-testMatrixTranspose.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) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -c -o testMatrixTranspose-testMatrixTranspose.obj `if test -f 'testMatrixTranspose.c'; then $(CYGPATH_W) 'testMatrixTranspose.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTranspose.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; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && 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; ws='[ ]'; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + 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 \ + *$$ws$$tst$$ws*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *$$ws$$tst$$ws*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + 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 \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + 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`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + 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 $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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) + +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 + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: 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: 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/matrixOperations/transpose/ctransposea.c b/src/matrixOperations/transpose/ctransposea.c new file mode 100644 index 00000000..74291cf9 --- /dev/null +++ b/src/matrixOperations/transpose/ctransposea.c @@ -0,0 +1,28 @@ +/* + * 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 "matrixTranspose.h" + +void ctransposea ( floatComplex* in , int lines1 , int column1, floatComplex* out ){ + + + int newCoord = 0 ; + int index = 0 ; + + for(index = 0 ; index < lines1 * column1 ; index++) + { + newCoord = index % column1 * lines1 + ( index / column1); + /* Hermitian transpose*/ + out[newCoord] = FloatComplex ( creals( in[index]) , -cimags ( in[index])); + } + +} diff --git a/src/matrixOperations/transpose/dtransposea.c b/src/matrixOperations/transpose/dtransposea.c new file mode 100644 index 00000000..50352b52 --- /dev/null +++ b/src/matrixOperations/transpose/dtransposea.c @@ -0,0 +1,28 @@ +/* + * 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 "matrixTranspose.h" + +void dtransposea ( double* in , int lines1 , int column1, double* out ){ + + int newCoord = 0 ; + int index = 0 ; + + for(index = 0 ; index < lines1 * column1 ; index++) + { + newCoord = index % column1 * lines1 + ( index / column1); + + out[newCoord] = in[index]; + } + + +} diff --git a/src/matrixOperations/transpose/stransposea.c b/src/matrixOperations/transpose/stransposea.c new file mode 100644 index 00000000..27f78835 --- /dev/null +++ b/src/matrixOperations/transpose/stransposea.c @@ -0,0 +1,27 @@ +/* + * 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 "matrixTranspose.h" + +void stransposea ( float* in , int lines1 , int column1, float* out ){ + + + int newCoord = 0 ; + int index = 0 ; + + for(index = 0 ; index < lines1 * column1 ; index++) + { + newCoord = index % column1 * lines1 + ( index / column1); + + out[newCoord] = in[index]; + } + +} diff --git a/src/matrixOperations/transpose/testMatrixTranspose.c b/src/matrixOperations/transpose/testMatrixTranspose.c new file mode 100644 index 00000000..0413455f --- /dev/null +++ b/src/matrixOperations/transpose/testMatrixTranspose.c @@ -0,0 +1,520 @@ +/* + * 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 "matrixTranspose.h" +#include <assert.h> +#include <stdio.h> + +#define LINE 15 +#define COLUMN 10 + + + +static void stranspaTest (void ) { + + int i = 0 ; + + + float in[] ={0.34382718056440353f,0.11506372271105647f,0.50752213317900896f,0.15747882844880223f, + 0.97023218311369419f,0.40251684701070189f,0.22695036139339209f,0.91680057207122445f, + 0.62407150492072105f,0.61546878470107913f, +0.1970167332328856f,0.53554199635982513f,0.40760429529473186f,0.53506936598569155f, + 0.85157642932608724f,0.09831319935619831f,0.68369307881221175f,0.21228999551385641f, + 0.63760355720296502f,0.83135433867573738f, +0.21228986512869596f,0.43117330456152558f,0.84080461412668228f,0.21290646074339747f, + 0.33933044690638781f,0.26086253346875310f,0.93650726415216923f,0.26978330826386809f, + 0.42704886104911566f,0.77340125897899270f, +0.31403985014185309f,0.61453847866505384f,0.5017265700735152f,0.55914506316184998f, + 0.87725317804142833f,0.36363423336297274f,0.50530174048617482f,0.31998893804848194f, + 0.10716815060004592f,0.4244190966710448f, +0.78216253779828548f,0.92589621385559440f,0.91287807654589415f,0.43049659812822938f, + 0.11314024776220322f,0.17466178117319942f,0.25248145777732134f,0.02321802498772740f, + 0.23822965659201145f,0.72621259605512023f, +0.05409323470667005f,0.09938172809779644f,0.44357294728979468f,0.02280548494309187f, + 0.5264128320850432f,0.92341394722461700f,0.68188397912308574f,0.72654472757130861f, + 0.94629473658278584f,0.70999773032963276f, +0.91902069095522165f,0.42805786477401853f,0.59837839566171169f,0.57614597817882895f, + 0.52973940502852201f,0.76051409030333161f,0.28363681584596634f,0.15340585587546229f, + 0.45766852516680956f,0.47457459988072515f, +0.46035157097503543f,0.94318309519439936f,0.7741842647083104f,0.71491303853690624f, + 0.92917560925707221f,0.56402041297405958f,0.14094856614246964f,0.23552638292312622f, + 0.89644787041470408f,0.9438692079856992f, +0.29926850274205208f,0.03273952705785632f,0.79220082703977823f,0.93216359661892056f, + 0.97654302977025509f,0.37970651825889945f,0.67591095995157957f,0.08797382796183228f, + 0.44384705275297165f,0.14596485672518611f, +0.00291663268581033f,0.92132670804858208f,0.55046048713847995f,0.12326993141323328f, + 0.62254639761522412f,0.87762261740863323f,0.45126775791868567f,0.71059537213295698f, + 0.80895681912079453f,0.07141010463237762f, +0.89934705849736929f,0.94490244099870324f,0.40850437059998512f,0.28655522270128131f, + 0.98225832823663950f,0.82174257980659604f,0.75430292449891567f,0.68887275597080588f, + 0.68317985069006681f,0.67337385797873139f, +0.83879271661862731f,0.900706990621984f,0.72174380579963326f,0.01247995719313622f, + 0.75429888023063540f,0.67870581243187189f,0.13702143030241132f,0.65953194908797741f, + 0.03401931514963508f,0.65369247179478407f, +0.43437494523823261f,0.80943161016330123f,0.47685358580201864f,0.57694048294797540f, + 0.54547880962491035f,0.08220098121091723f,0.66082405392080545f,0.18151161121204495f, + 0.23805456422269344f,0.19968961318954825f, +0.77678761305287480f,0.02519542910158634f,0.63930579042062163f,0.39386960770934820f, + 0.72860160330310464f,0.25527314469218254f,0.38900542212650180f,0.3904965976253152f, + 0.94920115964487195f,0.60141251794993877f, +0.13953176606446505f,0.00196450622752309f,0.99638652987778187f,0.68885837262496352f, + 0.02525969501584768f,0.74444567272439599f,0.70018205419182777f,0.15869047446176410f, + 0.21827886346727610f,0.18993748771026731f}; + + + float out[(COLUMN+1 )*(LINE+1)] ; + + float Result[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353f,0.1970167332328856f,0.21228986512869596f,0.31403985014185309f, + 0.78216253779828548f,0.05409323470667005f,0.91902069095522165f,0.46035157097503543f, + 0.29926850274205208f,0.00291663268581033f,0.89934705849736929f,0.83879271661862731f, + 0.43437494523823261f,0.77678761305287480f,0.13953176606446505f, +0.11506372271105647f,0.53554199635982513f,0.43117330456152558f,0.61453847866505384f, + 0.92589621385559440f,0.09938172809779644f,0.42805786477401853f,0.94318309519439936f, + 0.03273952705785632f,0.92132670804858208f,0.94490244099870324f,0.900706990621984f, + 0.80943161016330123f,0.02519542910158634f,0.00196450622752309f, +0.50752213317900896f,0.40760429529473186f,0.84080461412668228f,0.5017265700735152f, + 0.91287807654589415f,0.44357294728979468f,0.59837839566171169f,0.7741842647083104f, + 0.79220082703977823f,0.55046048713847995f,0.40850437059998512f,0.72174380579963326f, + 0.47685358580201864f,0.63930579042062163f,0.99638652987778187f, +0.15747882844880223f,0.53506936598569155f,0.21290646074339747f,0.55914506316184998f, + 0.43049659812822938f,0.02280548494309187f,0.57614597817882895f,0.71491303853690624f, + 0.93216359661892056f,0.12326993141323328f,0.28655522270128131f,0.01247995719313622f, + 0.57694048294797540f,0.39386960770934820f,0.68885837262496352f, +0.97023218311369419f,0.85157642932608724f,0.33933044690638781f,0.87725317804142833f, + 0.11314024776220322f,0.5264128320850432f,0.52973940502852201f,0.92917560925707221f, + 0.97654302977025509f,0.62254639761522412f,0.98225832823663950f,0.75429888023063540f, + 0.54547880962491035f,0.72860160330310464f,0.02525969501584768f, +0.40251684701070189f,0.09831319935619831f,0.26086253346875310f,0.36363423336297274f, + 0.17466178117319942f,0.92341394722461700f,0.76051409030333161f,0.56402041297405958f, + 0.37970651825889945f,0.87762261740863323f,0.82174257980659604f,0.67870581243187189f, + 0.08220098121091723f,0.25527314469218254f,0.74444567272439599f, +0.22695036139339209f,0.68369307881221175f,0.93650726415216923f,0.50530174048617482f, + 0.25248145777732134f,0.68188397912308574f,0.28363681584596634f,0.14094856614246964f, + 0.67591095995157957f,0.45126775791868567f,0.75430292449891567f,0.13702143030241132f, + 0.66082405392080545f,0.38900542212650180f,0.70018205419182777f, +0.91680057207122445f,0.21228999551385641f,0.26978330826386809f,0.31998893804848194f, + 0.02321802498772740f,0.72654472757130861f,0.15340585587546229f,0.23552638292312622f, + 0.08797382796183228f,0.71059537213295698f,0.68887275597080588f,0.65953194908797741f, + 0.18151161121204495f,0.3904965976253152f,0.15869047446176410f, +0.62407150492072105f,0.63760355720296502f,0.42704886104911566f,0.10716815060004592f, + 0.23822965659201145f,0.94629473658278584f,0.45766852516680956f,0.89644787041470408f, + 0.44384705275297165f,0.80895681912079453f,0.68317985069006681f,0.03401931514963508f, + 0.23805456422269344f,0.94920115964487195f,0.21827886346727610f, +0.61546878470107913f,0.83135433867573738f,0.77340125897899270f,0.4244190966710448f, + 0.72621259605512023f,0.70999773032963276f,0.47457459988072515f,0.9438692079856992f, + 0.14596485672518611f,0.07141010463237762f,0.67337385797873139f,0.65369247179478407f, + 0.19968961318954825f,0.60141251794993877f,0.18993748771026731f}; + + stransposea ( in , LINE , COLUMN , out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-6 ) ; + } + + + +} + + +static void dtranspaTest (void ) { + + int i = 0 ; + + + double in[] ={0.34382718056440353,0.11506372271105647,0.50752213317900896,0.15747882844880223, + 0.97023218311369419,0.40251684701070189,0.22695036139339209,0.91680057207122445, + 0.62407150492072105,0.61546878470107913, +0.1970167332328856,0.53554199635982513,0.40760429529473186,0.53506936598569155, + 0.85157642932608724,0.09831319935619831,0.68369307881221175,0.21228999551385641, + 0.63760355720296502,0.83135433867573738, +0.21228986512869596,0.43117330456152558,0.84080461412668228,0.21290646074339747, + 0.33933044690638781,0.26086253346875310,0.93650726415216923,0.26978330826386809, + 0.42704886104911566,0.77340125897899270, +0.31403985014185309,0.61453847866505384,0.5017265700735152,0.55914506316184998, + 0.87725317804142833,0.36363423336297274,0.50530174048617482,0.31998893804848194, + 0.10716815060004592,0.4244190966710448, +0.78216253779828548,0.92589621385559440,0.91287807654589415,0.43049659812822938, + 0.11314024776220322,0.17466178117319942,0.25248145777732134,0.02321802498772740, + 0.23822965659201145,0.72621259605512023, +0.05409323470667005,0.09938172809779644,0.44357294728979468,0.02280548494309187, + 0.5264128320850432,0.92341394722461700,0.68188397912308574,0.72654472757130861, + 0.94629473658278584,0.70999773032963276, +0.91902069095522165,0.42805786477401853,0.59837839566171169,0.57614597817882895, + 0.52973940502852201,0.76051409030333161,0.28363681584596634,0.15340585587546229, + 0.45766852516680956,0.47457459988072515, +0.46035157097503543,0.94318309519439936,0.7741842647083104,0.71491303853690624, + 0.92917560925707221,0.56402041297405958,0.14094856614246964,0.23552638292312622, + 0.89644787041470408,0.9438692079856992, +0.29926850274205208,0.03273952705785632,0.79220082703977823,0.93216359661892056, + 0.97654302977025509,0.37970651825889945,0.67591095995157957,0.08797382796183228, + 0.44384705275297165,0.14596485672518611, +0.00291663268581033,0.92132670804858208,0.55046048713847995,0.12326993141323328, + 0.62254639761522412,0.87762261740863323,0.45126775791868567,0.71059537213295698, + 0.80895681912079453,0.07141010463237762, +0.89934705849736929,0.94490244099870324,0.40850437059998512,0.28655522270128131, + 0.98225832823663950,0.82174257980659604,0.75430292449891567,0.68887275597080588, + 0.68317985069006681,0.67337385797873139, +0.83879271661862731,0.900706990621984,0.72174380579963326,0.01247995719313622, + 0.75429888023063540,0.67870581243187189,0.13702143030241132,0.65953194908797741, + 0.03401931514963508,0.65369247179478407, +0.43437494523823261,0.80943161016330123,0.47685358580201864,0.57694048294797540, + 0.54547880962491035,0.08220098121091723,0.66082405392080545,0.18151161121204495, + 0.23805456422269344,0.19968961318954825, +0.77678761305287480,0.02519542910158634,0.63930579042062163,0.39386960770934820, + 0.72860160330310464,0.25527314469218254,0.38900542212650180,0.3904965976253152, + 0.94920115964487195,0.60141251794993877, +0.13953176606446505,0.00196450622752309,0.99638652987778187,0.68885837262496352, + 0.02525969501584768,0.74444567272439599,0.70018205419182777,0.15869047446176410, + 0.21827886346727610,0.18993748771026731}; + + + double out[(COLUMN+1 )*(LINE+1)] ; + + double Result[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353,0.1970167332328856,0.21228986512869596,0.31403985014185309, + 0.78216253779828548,0.05409323470667005,0.91902069095522165,0.46035157097503543, + 0.29926850274205208,0.00291663268581033,0.89934705849736929,0.83879271661862731, + 0.43437494523823261,0.77678761305287480,0.13953176606446505, +0.11506372271105647,0.53554199635982513,0.43117330456152558,0.61453847866505384, + 0.92589621385559440,0.09938172809779644,0.42805786477401853,0.94318309519439936, + 0.03273952705785632,0.92132670804858208,0.94490244099870324,0.900706990621984, + 0.80943161016330123,0.02519542910158634,0.00196450622752309, +0.50752213317900896,0.40760429529473186,0.84080461412668228,0.5017265700735152, + 0.91287807654589415,0.44357294728979468,0.59837839566171169,0.7741842647083104, + 0.79220082703977823,0.55046048713847995,0.40850437059998512,0.72174380579963326, + 0.47685358580201864,0.63930579042062163,0.99638652987778187, +0.15747882844880223,0.53506936598569155,0.21290646074339747,0.55914506316184998, + 0.43049659812822938,0.02280548494309187,0.57614597817882895,0.71491303853690624, + 0.93216359661892056,0.12326993141323328,0.28655522270128131,0.01247995719313622, + 0.57694048294797540,0.39386960770934820,0.68885837262496352, +0.97023218311369419,0.85157642932608724,0.33933044690638781,0.87725317804142833, + 0.11314024776220322,0.5264128320850432,0.52973940502852201,0.92917560925707221, + 0.97654302977025509,0.62254639761522412,0.98225832823663950,0.75429888023063540, + 0.54547880962491035,0.72860160330310464,0.02525969501584768, +0.40251684701070189,0.09831319935619831,0.26086253346875310,0.36363423336297274, + 0.17466178117319942,0.92341394722461700,0.76051409030333161,0.56402041297405958, + 0.37970651825889945,0.87762261740863323,0.82174257980659604,0.67870581243187189, + 0.08220098121091723,0.25527314469218254,0.74444567272439599, +0.22695036139339209,0.68369307881221175,0.93650726415216923,0.50530174048617482, + 0.25248145777732134,0.68188397912308574,0.28363681584596634,0.14094856614246964, + 0.67591095995157957,0.45126775791868567,0.75430292449891567,0.13702143030241132, + 0.66082405392080545,0.38900542212650180,0.70018205419182777, +0.91680057207122445,0.21228999551385641,0.26978330826386809,0.31998893804848194, + 0.02321802498772740,0.72654472757130861,0.15340585587546229,0.23552638292312622, + 0.08797382796183228,0.71059537213295698,0.68887275597080588,0.65953194908797741, + 0.18151161121204495,0.3904965976253152,0.15869047446176410, +0.62407150492072105,0.63760355720296502,0.42704886104911566,0.10716815060004592, + 0.23822965659201145,0.94629473658278584,0.45766852516680956,0.89644787041470408, + 0.44384705275297165,0.80895681912079453,0.68317985069006681,0.03401931514963508, + 0.23805456422269344,0.94920115964487195,0.21827886346727610, +0.61546878470107913,0.83135433867573738,0.77340125897899270,0.4244190966710448, + 0.72621259605512023,0.70999773032963276,0.47457459988072515,0.9438692079856992, + 0.14596485672518611,0.07141010463237762,0.67337385797873139,0.65369247179478407, + 0.19968961318954825,0.60141251794993877,0.18993748771026731}; + + dtransposea ( in , LINE , COLUMN , out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-16 ) ; + } + + + +} + + + +static void ctranspaTest (void ) { + + int i = 0 ; + + + float Pin[] ={0.34382718056440353f,0.11506372271105647f,0.50752213317900896f,0.15747882844880223f, + 0.97023218311369419f,0.40251684701070189f,0.22695036139339209f,0.91680057207122445f, + 0.62407150492072105f,0.61546878470107913f, +0.1970167332328856f,0.53554199635982513f,0.40760429529473186f,0.53506936598569155f, + 0.85157642932608724f,0.09831319935619831f,0.68369307881221175f,0.21228999551385641f, + 0.63760355720296502f,0.83135433867573738f, +0.21228986512869596f,0.43117330456152558f,0.84080461412668228f,0.21290646074339747f, + 0.33933044690638781f,0.26086253346875310f,0.93650726415216923f,0.26978330826386809f, + 0.42704886104911566f,0.77340125897899270f, +0.31403985014185309f,0.61453847866505384f,0.5017265700735152f,0.55914506316184998f, + 0.87725317804142833f,0.36363423336297274f,0.50530174048617482f,0.31998893804848194f, + 0.10716815060004592f,0.4244190966710448f, +0.78216253779828548f,0.92589621385559440f,0.91287807654589415f,0.43049659812822938f, + 0.11314024776220322f,0.17466178117319942f,0.25248145777732134f,0.02321802498772740f, + 0.23822965659201145f,0.72621259605512023f, +0.05409323470667005f,0.09938172809779644f,0.44357294728979468f,0.02280548494309187f, + 0.5264128320850432f,0.92341394722461700f,0.68188397912308574f,0.72654472757130861f, + 0.94629473658278584f,0.70999773032963276f, +0.91902069095522165f,0.42805786477401853f,0.59837839566171169f,0.57614597817882895f, + 0.52973940502852201f,0.76051409030333161f,0.28363681584596634f,0.15340585587546229f, + 0.45766852516680956f,0.47457459988072515f, +0.46035157097503543f,0.94318309519439936f,0.7741842647083104f,0.71491303853690624f, + 0.92917560925707221f,0.56402041297405958f,0.14094856614246964f,0.23552638292312622f, + 0.89644787041470408f,0.9438692079856992f, +0.29926850274205208f,0.03273952705785632f,0.79220082703977823f,0.93216359661892056f, + 0.97654302977025509f,0.37970651825889945f,0.67591095995157957f,0.08797382796183228f, + 0.44384705275297165f,0.14596485672518611f, +0.00291663268581033f,0.92132670804858208f,0.55046048713847995f,0.12326993141323328f, + 0.62254639761522412f,0.87762261740863323f,0.45126775791868567f,0.71059537213295698f, + 0.80895681912079453f,0.07141010463237762f, +0.89934705849736929f,0.94490244099870324f,0.40850437059998512f,0.28655522270128131f, + 0.98225832823663950f,0.82174257980659604f,0.75430292449891567f,0.68887275597080588f, + 0.68317985069006681f,0.67337385797873139f, +0.83879271661862731f,0.900706990621984f,0.72174380579963326f,0.01247995719313622f, + 0.75429888023063540f,0.67870581243187189f,0.13702143030241132f,0.65953194908797741f, + 0.03401931514963508f,0.65369247179478407f, +0.43437494523823261f,0.80943161016330123f,0.47685358580201864f,0.57694048294797540f, + 0.54547880962491035f,0.08220098121091723f,0.66082405392080545f,0.18151161121204495f, + 0.23805456422269344f,0.19968961318954825f, +0.77678761305287480f,0.02519542910158634f,0.63930579042062163f,0.39386960770934820f, + 0.72860160330310464f,0.25527314469218254f,0.38900542212650180f,0.3904965976253152f, + 0.94920115964487195f,0.60141251794993877f, +0.13953176606446505f,0.00196450622752309f,0.99638652987778187f,0.68885837262496352f, + 0.02525969501584768f,0.74444567272439599f,0.70018205419182777f,0.15869047446176410f, + 0.21827886346727610f,0.18993748771026731f}; + + + floatComplex out[(COLUMN+1 )*(LINE+1)] ; + floatComplex in[(COLUMN+1 )*(LINE+1)] ; + floatComplex Result[(COLUMN+1 )*(LINE+1)] ; + + float PResult[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353f,0.1970167332328856f,0.21228986512869596f,0.31403985014185309f, + 0.78216253779828548f,0.05409323470667005f,0.91902069095522165f,0.46035157097503543f, + 0.29926850274205208f,0.00291663268581033f,0.89934705849736929f,0.83879271661862731f, + 0.43437494523823261f,0.77678761305287480f,0.13953176606446505f, +0.11506372271105647f,0.53554199635982513f,0.43117330456152558f,0.61453847866505384f, + 0.92589621385559440f,0.09938172809779644f,0.42805786477401853f,0.94318309519439936f, + 0.03273952705785632f,0.92132670804858208f,0.94490244099870324f,0.900706990621984f, + 0.80943161016330123f,0.02519542910158634f,0.00196450622752309f, +0.50752213317900896f,0.40760429529473186f,0.84080461412668228f,0.5017265700735152f, + 0.91287807654589415f,0.44357294728979468f,0.59837839566171169f,0.7741842647083104f, + 0.79220082703977823f,0.55046048713847995f,0.40850437059998512f,0.72174380579963326f, + 0.47685358580201864f,0.63930579042062163f,0.99638652987778187f, +0.15747882844880223f,0.53506936598569155f,0.21290646074339747f,0.55914506316184998f, + 0.43049659812822938f,0.02280548494309187f,0.57614597817882895f,0.71491303853690624f, + 0.93216359661892056f,0.12326993141323328f,0.28655522270128131f,0.01247995719313622f, + 0.57694048294797540f,0.39386960770934820f,0.68885837262496352f, +0.97023218311369419f,0.85157642932608724f,0.33933044690638781f,0.87725317804142833f, + 0.11314024776220322f,0.5264128320850432f,0.52973940502852201f,0.92917560925707221f, + 0.97654302977025509f,0.62254639761522412f,0.98225832823663950f,0.75429888023063540f, + 0.54547880962491035f,0.72860160330310464f,0.02525969501584768f, +0.40251684701070189f,0.09831319935619831f,0.26086253346875310f,0.36363423336297274f, + 0.17466178117319942f,0.92341394722461700f,0.76051409030333161f,0.56402041297405958f, + 0.37970651825889945f,0.87762261740863323f,0.82174257980659604f,0.67870581243187189f, + 0.08220098121091723f,0.25527314469218254f,0.74444567272439599f, +0.22695036139339209f,0.68369307881221175f,0.93650726415216923f,0.50530174048617482f, + 0.25248145777732134f,0.68188397912308574f,0.28363681584596634f,0.14094856614246964f, + 0.67591095995157957f,0.45126775791868567f,0.75430292449891567f,0.13702143030241132f, + 0.66082405392080545f,0.38900542212650180f,0.70018205419182777f, +0.91680057207122445f,0.21228999551385641f,0.26978330826386809f,0.31998893804848194f, + 0.02321802498772740f,0.72654472757130861f,0.15340585587546229f,0.23552638292312622f, + 0.08797382796183228f,0.71059537213295698f,0.68887275597080588f,0.65953194908797741f, + 0.18151161121204495f,0.3904965976253152f,0.15869047446176410f, +0.62407150492072105f,0.63760355720296502f,0.42704886104911566f,0.10716815060004592f, + 0.23822965659201145f,0.94629473658278584f,0.45766852516680956f,0.89644787041470408f, + 0.44384705275297165f,0.80895681912079453f,0.68317985069006681f,0.03401931514963508f, + 0.23805456422269344f,0.94920115964487195f,0.21827886346727610f, +0.61546878470107913f,0.83135433867573738f,0.77340125897899270f,0.4244190966710448f, + 0.72621259605512023f,0.70999773032963276f,0.47457459988072515f,0.9438692079856992f, + 0.14596485672518611f,0.07141010463237762f,0.67337385797873139f,0.65369247179478407f, + 0.19968961318954825f,0.60141251794993877f,0.18993748771026731f}; + + + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + in[i] = FloatComplex ( Pin[i] , Pin[i] ) ; + Result[i] = FloatComplex ( PResult[i] , - PResult[i] ) ; + } + + + ctransposea ( in , LINE , COLUMN , out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-07 ); + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-07 ) ; + + } + + + +} + + + + + + +static void ztranspaTest (void ) { + + int i = 0 ; + + + double Pin[] ={0.34382718056440353f,0.11506372271105647f,0.50752213317900896f,0.15747882844880223f, + 0.97023218311369419f,0.40251684701070189f,0.22695036139339209f,0.91680057207122445f, + 0.62407150492072105f,0.61546878470107913f, +0.1970167332328856f,0.53554199635982513f,0.40760429529473186f,0.53506936598569155f, + 0.85157642932608724f,0.09831319935619831f,0.68369307881221175f,0.21228999551385641f, + 0.63760355720296502f,0.83135433867573738f, +0.21228986512869596f,0.43117330456152558f,0.84080461412668228f,0.21290646074339747f, + 0.33933044690638781f,0.26086253346875310f,0.93650726415216923f,0.26978330826386809f, + 0.42704886104911566f,0.77340125897899270f, +0.31403985014185309f,0.61453847866505384f,0.5017265700735152f,0.55914506316184998f, + 0.87725317804142833f,0.36363423336297274f,0.50530174048617482f,0.31998893804848194f, + 0.10716815060004592f,0.4244190966710448f, +0.78216253779828548f,0.92589621385559440f,0.91287807654589415f,0.43049659812822938f, + 0.11314024776220322f,0.17466178117319942f,0.25248145777732134f,0.02321802498772740f, + 0.23822965659201145f,0.72621259605512023f, +0.05409323470667005f,0.09938172809779644f,0.44357294728979468f,0.02280548494309187f, + 0.5264128320850432f,0.92341394722461700f,0.68188397912308574f,0.72654472757130861f, + 0.94629473658278584f,0.70999773032963276f, +0.91902069095522165f,0.42805786477401853f,0.59837839566171169f,0.57614597817882895f, + 0.52973940502852201f,0.76051409030333161f,0.28363681584596634f,0.15340585587546229f, + 0.45766852516680956f,0.47457459988072515f, +0.46035157097503543f,0.94318309519439936f,0.7741842647083104f,0.71491303853690624f, + 0.92917560925707221f,0.56402041297405958f,0.14094856614246964f,0.23552638292312622f, + 0.89644787041470408f,0.9438692079856992f, +0.29926850274205208f,0.03273952705785632f,0.79220082703977823f,0.93216359661892056f, + 0.97654302977025509f,0.37970651825889945f,0.67591095995157957f,0.08797382796183228f, + 0.44384705275297165f,0.14596485672518611f, +0.00291663268581033f,0.92132670804858208f,0.55046048713847995f,0.12326993141323328f, + 0.62254639761522412f,0.87762261740863323f,0.45126775791868567f,0.71059537213295698f, + 0.80895681912079453f,0.07141010463237762f, +0.89934705849736929f,0.94490244099870324f,0.40850437059998512f,0.28655522270128131f, + 0.98225832823663950f,0.82174257980659604f,0.75430292449891567f,0.68887275597080588f, + 0.68317985069006681f,0.67337385797873139f, +0.83879271661862731f,0.900706990621984f,0.72174380579963326f,0.01247995719313622f, + 0.75429888023063540f,0.67870581243187189f,0.13702143030241132f,0.65953194908797741f, + 0.03401931514963508f,0.65369247179478407f, +0.43437494523823261f,0.80943161016330123f,0.47685358580201864f,0.57694048294797540f, + 0.54547880962491035f,0.08220098121091723f,0.66082405392080545f,0.18151161121204495f, + 0.23805456422269344f,0.19968961318954825f, +0.77678761305287480f,0.02519542910158634f,0.63930579042062163f,0.39386960770934820f, + 0.72860160330310464f,0.25527314469218254f,0.38900542212650180f,0.3904965976253152f, + 0.94920115964487195f,0.60141251794993877f, +0.13953176606446505f,0.00196450622752309f,0.99638652987778187f,0.68885837262496352f, + 0.02525969501584768f,0.74444567272439599f,0.70018205419182777f,0.15869047446176410f, + 0.21827886346727610f,0.18993748771026731f}; + + + doubleComplex out[(COLUMN+1 )*(LINE+1)] ; + doubleComplex in[(COLUMN+1 )*(LINE+1)] ; + doubleComplex Result[(COLUMN+1 )*(LINE+1)] ; + + double PResult[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353f,0.1970167332328856f,0.21228986512869596f,0.31403985014185309f, + 0.78216253779828548f,0.05409323470667005f,0.91902069095522165f,0.46035157097503543f, + 0.29926850274205208f,0.00291663268581033f,0.89934705849736929f,0.83879271661862731f, + 0.43437494523823261f,0.77678761305287480f,0.13953176606446505f, +0.11506372271105647f,0.53554199635982513f,0.43117330456152558f,0.61453847866505384f, + 0.92589621385559440f,0.09938172809779644f,0.42805786477401853f,0.94318309519439936f, + 0.03273952705785632f,0.92132670804858208f,0.94490244099870324f,0.900706990621984f, + 0.80943161016330123f,0.02519542910158634f,0.00196450622752309f, +0.50752213317900896f,0.40760429529473186f,0.84080461412668228f,0.5017265700735152f, + 0.91287807654589415f,0.44357294728979468f,0.59837839566171169f,0.7741842647083104f, + 0.79220082703977823f,0.55046048713847995f,0.40850437059998512f,0.72174380579963326f, + 0.47685358580201864f,0.63930579042062163f,0.99638652987778187f, +0.15747882844880223f,0.53506936598569155f,0.21290646074339747f,0.55914506316184998f, + 0.43049659812822938f,0.02280548494309187f,0.57614597817882895f,0.71491303853690624f, + 0.93216359661892056f,0.12326993141323328f,0.28655522270128131f,0.01247995719313622f, + 0.57694048294797540f,0.39386960770934820f,0.68885837262496352f, +0.97023218311369419f,0.85157642932608724f,0.33933044690638781f,0.87725317804142833f, + 0.11314024776220322f,0.5264128320850432f,0.52973940502852201f,0.92917560925707221f, + 0.97654302977025509f,0.62254639761522412f,0.98225832823663950f,0.75429888023063540f, + 0.54547880962491035f,0.72860160330310464f,0.02525969501584768f, +0.40251684701070189f,0.09831319935619831f,0.26086253346875310f,0.36363423336297274f, + 0.17466178117319942f,0.92341394722461700f,0.76051409030333161f,0.56402041297405958f, + 0.37970651825889945f,0.87762261740863323f,0.82174257980659604f,0.67870581243187189f, + 0.08220098121091723f,0.25527314469218254f,0.74444567272439599f, +0.22695036139339209f,0.68369307881221175f,0.93650726415216923f,0.50530174048617482f, + 0.25248145777732134f,0.68188397912308574f,0.28363681584596634f,0.14094856614246964f, + 0.67591095995157957f,0.45126775791868567f,0.75430292449891567f,0.13702143030241132f, + 0.66082405392080545f,0.38900542212650180f,0.70018205419182777f, +0.91680057207122445f,0.21228999551385641f,0.26978330826386809f,0.31998893804848194f, + 0.02321802498772740f,0.72654472757130861f,0.15340585587546229f,0.23552638292312622f, + 0.08797382796183228f,0.71059537213295698f,0.68887275597080588f,0.65953194908797741f, + 0.18151161121204495f,0.3904965976253152f,0.15869047446176410f, +0.62407150492072105f,0.63760355720296502f,0.42704886104911566f,0.10716815060004592f, + 0.23822965659201145f,0.94629473658278584f,0.45766852516680956f,0.89644787041470408f, + 0.44384705275297165f,0.80895681912079453f,0.68317985069006681f,0.03401931514963508f, + 0.23805456422269344f,0.94920115964487195f,0.21827886346727610f, +0.61546878470107913f,0.83135433867573738f,0.77340125897899270f,0.4244190966710448f, + 0.72621259605512023f,0.70999773032963276f,0.47457459988072515f,0.9438692079856992f, + 0.14596485672518611f,0.07141010463237762f,0.67337385797873139f,0.65369247179478407f, + 0.19968961318954825f,0.60141251794993877f,0.18993748771026731f}; + + + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + in[i] = DoubleComplex ( Pin[i] , Pin[i] ) ; + Result[i] = DoubleComplex ( PResult[i] , - PResult[i] ) ; + } + + + + + ztransposea ( in , LINE , COLUMN , out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-17 ); + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-17 ) ; + + } + + + +} + + + + +static int testTranspa (void) { + + printf("\n>>>> Float real Tests\n"); + stranspaTest(); +printf("\t>>>> Double real Tests\n"); + dtranspaTest(); +printf("\t>>>> Double complex Tests\n"); +ctranspaTest(); +printf("\t>>>> Float complex Tests\n"); +ztranspaTest(); + return 0; +} + + +int main(void) { + assert(testTranspa() == 0); + return 0; +} + + diff --git a/src/matrixOperations/transpose/ztransposea.c b/src/matrixOperations/transpose/ztransposea.c new file mode 100644 index 00000000..54aeaf1c --- /dev/null +++ b/src/matrixOperations/transpose/ztransposea.c @@ -0,0 +1,28 @@ +/* + * 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 "matrixTranspose.h" + +void ztransposea ( doubleComplex* in , int lines1 , int column1, doubleComplex* out ){ + int newCoord = 0 ; + int index = 0 ; + + for(index = 0 ; index < lines1 * column1 ; index++) + { + newCoord = index % column1 * lines1 + ( index / column1); + /* Hermitian transpose*/ + out[newCoord] = DoubleComplex ( zreals( in[index]) , -zimags ( in[index])); + } + + + +} |