diff options
author | yash1112 | 2017-07-07 21:20:49 +0530 |
---|---|---|
committer | yash1112 | 2017-07-07 21:20:49 +0530 |
commit | 3f52712f806fbd80d66dfdcaff401e5cf94dcca4 (patch) | |
tree | a8333b8187cb44b505b9fe37fc9a7ac8a1711c10 /src/c/matrixOperations/transpose | |
download | Scilab2C_fossee_old-3f52712f806fbd80d66dfdcaff401e5cf94dcca4.tar.gz Scilab2C_fossee_old-3f52712f806fbd80d66dfdcaff401e5cf94dcca4.tar.bz2 Scilab2C_fossee_old-3f52712f806fbd80d66dfdcaff401e5cf94dcca4.zip |
sci2c arduino updated
Diffstat (limited to 'src/c/matrixOperations/transpose')
13 files changed, 1695 insertions, 0 deletions
diff --git a/src/c/matrixOperations/transpose/Makefile.am b/src/c/matrixOperations/transpose/Makefile.am new file mode 100644 index 0000000..f36910f --- /dev/null +++ b/src/c/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)/src/c/type \ + -I $(top_builddir)/src/c/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)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixTranspose.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTranspose_SOURCES = testMatrixTranspose.c +testMatrixTranspose_LDADD = $(check_LDADD) +testMatrixTranspose_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixTranspose diff --git a/src/c/matrixOperations/transpose/Makefile.in b/src/c/matrixOperations/transpose/Makefile.in new file mode 100644 index 0000000..1b14f44 --- /dev/null +++ b/src/c/matrixOperations/transpose/Makefile.in @@ -0,0 +1,718 @@ +# 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 = testMatrixTranspose$(EXEEXT) +TESTS = testMatrixTranspose$(EXEEXT) +subdir = src/c/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 = +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) +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 +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 = $(libMatrixTranspose_la_SOURCES) \ + $(testMatrixTranspose_SOURCES) +DIST_SOURCES = $(libMatrixTranspose_la_SOURCES) \ + $(testMatrixTranspose_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@ +libMatrixTranspose_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/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)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixTranspose.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/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 ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/transpose/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/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 +$(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 +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)'; 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 +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@ $(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 $@ $< + +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@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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@ $(am__mv) $(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; 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/transpose/ctransposea.c b/src/c/matrixOperations/transpose/ctransposea.c new file mode 100644 index 0000000..571d3b7 --- /dev/null +++ b/src/c/matrixOperations/transpose/ctransposea.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 ctransposea ( floatComplex* in , int lines , int columns, floatComplex* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + +} diff --git a/src/c/matrixOperations/transpose/dtransposea.c b/src/c/matrixOperations/transpose/dtransposea.c new file mode 100644 index 0000000..11a5fc0 --- /dev/null +++ b/src/c/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 lines , int columns, double* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + + +} diff --git a/src/c/matrixOperations/transpose/i16transposea.c b/src/c/matrixOperations/transpose/i16transposea.c new file mode 100644 index 0000000..e370c63 --- /dev/null +++ b/src/c/matrixOperations/transpose/i16transposea.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "matrixTranspose.h" + +void i16transposea ( int16* in , int lines , int columns, int16* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = (int16)in[i+j*lines]; + } + +} diff --git a/src/c/matrixOperations/transpose/i8transposea.c b/src/c/matrixOperations/transpose/i8transposea.c new file mode 100644 index 0000000..a05ee06 --- /dev/null +++ b/src/c/matrixOperations/transpose/i8transposea.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "matrixTranspose.h" + +void i8transposea ( int8* in , int lines , int columns, int8* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = (int8)in[i+j*lines]; + } + +} diff --git a/src/c/matrixOperations/transpose/stransposea.c b/src/c/matrixOperations/transpose/stransposea.c new file mode 100644 index 0000000..219f221 --- /dev/null +++ b/src/c/matrixOperations/transpose/stransposea.c @@ -0,0 +1,26 @@ +/* + * 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 lines , int columns, float* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + +} diff --git a/src/c/matrixOperations/transpose/testMatrixTranspose.c b/src/c/matrixOperations/transpose/testMatrixTranspose.c new file mode 100644 index 0000000..fe2123d --- /dev/null +++ b/src/c/matrixOperations/transpose/testMatrixTranspose.c @@ -0,0 +1,519 @@ +/* + * 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 , COLUMN , LINE , 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 , COLUMN , LINE , 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 , COLUMN , LINE , 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 , COLUMN , LINE, 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/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj b/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj new file mode 100644 index 0000000..2e6acf7 --- /dev/null +++ b/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.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>{8D483B26-A264-4BA6-BB6A-36306BCFA8E3}</ProjectGuid>
+ <RootNamespace>testMatrixTranspose</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;%(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;%(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;%(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;%(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="..\testMatrixTranspose.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/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters b/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters new file mode 100644 index 0000000..a8d84ab --- /dev/null +++ b/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.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="..\testMatrixTranspose.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/src/c/matrixOperations/transpose/u16transposea.c b/src/c/matrixOperations/transpose/u16transposea.c new file mode 100644 index 0000000..8bf659d --- /dev/null +++ b/src/c/matrixOperations/transpose/u16transposea.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "matrixTranspose.h" + +void u16transposea ( uint16* in , int lines , int columns, uint16* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = (uint16)in[i+j*lines]; + } + +} diff --git a/src/c/matrixOperations/transpose/u8transposea.c b/src/c/matrixOperations/transpose/u8transposea.c new file mode 100644 index 0000000..54b5332 --- /dev/null +++ b/src/c/matrixOperations/transpose/u8transposea.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Siddhesh Wani + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "matrixTranspose.h" + +void u8transposea ( uint8* in , int lines , int columns, uint8* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = (uint8)in[i+j*lines]; + } + +} diff --git a/src/c/matrixOperations/transpose/ztransposea.c b/src/c/matrixOperations/transpose/ztransposea.c new file mode 100644 index 0000000..e42d74d --- /dev/null +++ b/src/c/matrixOperations/transpose/ztransposea.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 ztransposea ( doubleComplex* in , int lines , int columns, doubleComplex* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + +} |