summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c')
-rw-r--r--src/c/operations/includes/multiplication.h35
-rw-r--r--src/c/operations/interfaces/int_OpStar.h12
-rw-r--r--src/c/operations/multiplication/Makefile.in89
-rw-r--r--src/c/operations/multiplication/cmulv.c26
-rw-r--r--src/c/operations/multiplication/dmulv.c26
-rw-r--r--src/c/operations/multiplication/smulv.c27
-rw-r--r--src/c/operations/multiplication/zmulv.c27
7 files changed, 214 insertions, 28 deletions
diff --git a/src/c/operations/includes/multiplication.h b/src/c/operations/includes/multiplication.h
index 0fedf227..7eb32231 100644
--- a/src/c/operations/includes/multiplication.h
+++ b/src/c/operations/includes/multiplication.h
@@ -45,6 +45,15 @@ EXTERN_OPERATIONS float smuls(float in1, float in2);
EXTERN_OPERATIONS void smula(float *in1, float *in2, int size2, float *out);
/*
+** \brief Compute a multiplication for floats.
+** \param in1 : input array.
+** \param in2 : input array.
+** \param size : size of in2 array.
+** \return : scalar that contains the multiplication of the two vectors = in1 .* in2.
+*/
+EXTERN_OPERATIONS float smulv(float *in1, float *in2, int size2);
+
+/*
** \brief Compute a multiplication with double.
** \param in1 : input double.
** \param in2 : input double.
@@ -62,6 +71,15 @@ EXTERN_OPERATIONS double dmuls(double in1, double in2);
EXTERN_OPERATIONS void dmula(double *in1, double *in2, int size,double * out);
/*
+** \brief Compute a multiplication for floats.
+** \param in1 : input array.
+** \param in2 : input array.
+** \param size : size of in2 array.
+** \return : scalar that contains the multiplication of the two vectors = in1 .* in2.
+*/
+EXTERN_OPERATIONS double dmulv(double *in1, double *in2, int size2);
+
+/*
** \brief Compute a multiplication with floats Complex.
** \param in1 : input float complex.
** \param in2 : input float complex.
@@ -79,6 +97,15 @@ EXTERN_OPERATIONS floatComplex cmuls(floatComplex in1, floatComplex in2);
EXTERN_OPERATIONS void cmula(floatComplex *in1, floatComplex *in2, int size, floatComplex *out);
/*
+** \brief Compute a multiplication for floats.
+** \param in1 : input array.
+** \param in2 : input array.
+** \param size : size of in2 array.
+** \return : scalar that contains the multiplication of the two vectors = in1 .* in2.
+*/
+EXTERN_OPERATIONS floatComplex cmulv(floatComplex *in1, floatComplex *in2, int size2);
+
+/*
** \brief Compute a multiplication with double complex.
** \param in1 : input double complex.
** \param in2 : input double conplex.
@@ -95,6 +122,14 @@ EXTERN_OPERATIONS doubleComplex zmuls(doubleComplex in1, doubleComplex in2);
*/
EXTERN_OPERATIONS void zmula(doubleComplex *in1, doubleComplex *in2, int size, doubleComplex *out);
+/*
+** \brief Compute a multiplication for floats.
+** \param in1 : input array.
+** \param in2 : input array.
+** \param size : size of in2 array.
+** \return : scalar that contains the multiplication of the two vectors = in1 .* in2.
+*/
+EXTERN_OPERATIONS doubleComplex zmulv(doubleComplex *in1, doubleComplex *in2, int size2);
/*
** \function ctimess
diff --git a/src/c/operations/interfaces/int_OpStar.h b/src/c/operations/interfaces/int_OpStar.h
index f8ef73fe..403b6689 100644
--- a/src/c/operations/interfaces/int_OpStar.h
+++ b/src/c/operations/interfaces/int_OpStar.h
@@ -127,4 +127,16 @@
dfilla(temp,size1[0],size1[1],0);\
z2z2OpStarz2(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]), size1, in2, size2, out);}
+/* Vector * Vector, so there is a scalar output */
+
+#define MAX(a, b) (a > b ? a : b)
+
+#define s2s2OpStars0(in1, size1, in2, size2) smulv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1])))
+
+#define d2d2OpStard0(in1, size1, in2, size2) dmulv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1])))
+
+#define c2c2OpStarc0(in1, size1, in2, size2) cmulv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1])))
+
+#define z2z2OpStarz0(in1, size1, in2, size2) zmulv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1])))
+
#endif /* !__INT_OPSTAR_H__ */
diff --git a/src/c/operations/multiplication/Makefile.in b/src/c/operations/multiplication/Makefile.in
index 0a273d41..e3f388ad 100644
--- a/src/c/operations/multiplication/Makefile.in
+++ b/src/c/operations/multiplication/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,8 +59,8 @@ am_libMultiplication_la_OBJECTS = $(am__objects_1) \
libMultiplication_la-cmuls.lo libMultiplication_la-zmuls.lo \
libMultiplication_la-smula.lo libMultiplication_la-dmula.lo \
libMultiplication_la-cmula.lo libMultiplication_la-zmula.lo \
- libMultiplication_la-ctimess.lo \
- libMultiplication_la-ztimess.lo
+ libMultiplication_la-smulv.lo libMultiplication_la-dmulv.lo \
+ libMultiplication_la-cmulv.lo libMultiplication_la-zmulv.lo
libMultiplication_la_OBJECTS = $(am_libMultiplication_la_OBJECTS)
libMultiplication_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -142,6 +142,7 @@ MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
@@ -209,6 +210,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
libMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \
@@ -226,8 +228,10 @@ libMultiplication_la_SOURCES = $(HEAD) \
dmula.c \
cmula.c \
zmula.c \
- ctimess.c \
- ztimess.c
+ smulv.c \
+ dmulv.c \
+ cmulv.c \
+ zmulv.c
check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \
$(top_builddir)/src/c/type/libFloatComplex.la \
@@ -247,8 +251,8 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
@@ -320,14 +324,16 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmula.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmuls.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-ctimess.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmulv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-dmula.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-dmuls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-dmulv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-smula.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-smuls.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-smulv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmula.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmuls.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-ztimess.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmulv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMultiplication-testMultiplication.Po@am__quote@
.c.o:
@@ -407,19 +413,33 @@ libMultiplication_la-zmula.lo: zmula.c
@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) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmula.lo `test -f 'zmula.c' || echo '$(srcdir)/'`zmula.c
-libMultiplication_la-ctimess.lo: ctimess.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-ctimess.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-ctimess.Tpo -c -o libMultiplication_la-ctimess.lo `test -f 'ctimess.c' || echo '$(srcdir)/'`ctimess.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMultiplication_la-ctimess.Tpo $(DEPDIR)/libMultiplication_la-ctimess.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctimess.c' object='libMultiplication_la-ctimess.lo' libtool=yes @AMDEPBACKSLASH@
+libMultiplication_la-smulv.lo: smulv.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-smulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-smulv.Tpo -c -o libMultiplication_la-smulv.lo `test -f 'smulv.c' || echo '$(srcdir)/'`smulv.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMultiplication_la-smulv.Tpo $(DEPDIR)/libMultiplication_la-smulv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smulv.c' object='libMultiplication_la-smulv.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) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-ctimess.lo `test -f 'ctimess.c' || echo '$(srcdir)/'`ctimess.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-smulv.lo `test -f 'smulv.c' || echo '$(srcdir)/'`smulv.c
-libMultiplication_la-ztimess.lo: ztimess.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-ztimess.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-ztimess.Tpo -c -o libMultiplication_la-ztimess.lo `test -f 'ztimess.c' || echo '$(srcdir)/'`ztimess.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMultiplication_la-ztimess.Tpo $(DEPDIR)/libMultiplication_la-ztimess.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztimess.c' object='libMultiplication_la-ztimess.lo' libtool=yes @AMDEPBACKSLASH@
+libMultiplication_la-dmulv.lo: dmulv.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-dmulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-dmulv.Tpo -c -o libMultiplication_la-dmulv.lo `test -f 'dmulv.c' || echo '$(srcdir)/'`dmulv.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMultiplication_la-dmulv.Tpo $(DEPDIR)/libMultiplication_la-dmulv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmulv.c' object='libMultiplication_la-dmulv.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) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-ztimess.lo `test -f 'ztimess.c' || echo '$(srcdir)/'`ztimess.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-dmulv.lo `test -f 'dmulv.c' || echo '$(srcdir)/'`dmulv.c
+
+libMultiplication_la-cmulv.lo: cmulv.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-cmulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-cmulv.Tpo -c -o libMultiplication_la-cmulv.lo `test -f 'cmulv.c' || echo '$(srcdir)/'`cmulv.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMultiplication_la-cmulv.Tpo $(DEPDIR)/libMultiplication_la-cmulv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmulv.c' object='libMultiplication_la-cmulv.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) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-cmulv.lo `test -f 'cmulv.c' || echo '$(srcdir)/'`cmulv.c
+
+libMultiplication_la-zmulv.lo: zmulv.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-zmulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-zmulv.Tpo -c -o libMultiplication_la-zmulv.lo `test -f 'zmulv.c' || echo '$(srcdir)/'`zmulv.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libMultiplication_la-zmulv.Tpo $(DEPDIR)/libMultiplication_la-zmulv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmulv.c' object='libMultiplication_la-zmulv.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) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmulv.lo `test -f 'zmulv.c' || echo '$(srcdir)/'`zmulv.c
testMultiplication-testMultiplication.o: testMultiplication.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMultiplication_CFLAGS) $(CFLAGS) -MT testMultiplication-testMultiplication.o -MD -MP -MF $(DEPDIR)/testMultiplication-testMultiplication.Tpo -c -o testMultiplication-testMultiplication.o `test -f 'testMultiplication.c' || echo '$(srcdir)/'`testMultiplication.c
@@ -446,7 +466,7 @@ ID: $(HEADERS) $(SOURCES) $(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; } \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -489,7 +509,7 @@ 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='[ ]'; \
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
list=' $(TESTS) '; \
if test -n "$$list"; then \
@@ -500,7 +520,7 @@ check-TESTS: $(TESTS)
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
- *$$ws$$tst$$ws*) \
+ *[\ \ ]$$tst[\ \ ]*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
@@ -512,7 +532,7 @@ check-TESTS: $(TESTS)
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
- *$$ws$$tst$$ws*) \
+ *[\ \ ]$$tst[\ \ ]*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
@@ -526,23 +546,36 @@ check-TESTS: $(TESTS)
echo "SKIP: $$tst"; \
fi; \
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"; \
+ banner="$$All$$all $$tests passed"; \
else \
- banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ 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"; \
+ banner="$$failed of $$all $$tests failed"; \
else \
- banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ 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 \
- skipped="($$skip tests were not run)"; \
+ 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; \
diff --git a/src/c/operations/multiplication/cmulv.c b/src/c/operations/multiplication/cmulv.c
new file mode 100644
index 00000000..c26372cd
--- /dev/null
+++ b/src/c/operations/multiplication/cmulv.c
@@ -0,0 +1,26 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "addition.h"
+#include "multiplication.h"
+
+floatComplex cmulv(floatComplex* in1, floatComplex* in2, int size)
+{
+ floatComplex out = FloatComplex(0, 0);
+ int i = 0;
+ for (i = 0 ; i < size ; ++i)
+ {
+ out = cadds(out, cmuls(in1[i], in2[i]));
+ }
+
+ return out;
+}
diff --git a/src/c/operations/multiplication/dmulv.c b/src/c/operations/multiplication/dmulv.c
new file mode 100644
index 00000000..0793ee3f
--- /dev/null
+++ b/src/c/operations/multiplication/dmulv.c
@@ -0,0 +1,26 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "multiplication.h"
+
+double dmulv(double* in1, double* in2, int size)
+{
+ double dOut = 0;
+ int i = 0;
+ for ( i = 0 ; i < size ; ++i)
+ {
+ dOut += dmuls(in1[i], in2[i]);
+ }
+
+ return dOut;
+}
diff --git a/src/c/operations/multiplication/smulv.c b/src/c/operations/multiplication/smulv.c
new file mode 100644
index 00000000..e757cb35
--- /dev/null
+++ b/src/c/operations/multiplication/smulv.c
@@ -0,0 +1,27 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "multiplication.h"
+
+float smulv(float* in1, float* in2, int size)
+{
+ float out = 0;
+ int i = 0;
+
+ for (i = 0 ; i < size ; ++i)
+ {
+ out += smuls(in1[i], in2[i]);
+ }
+
+ return out;
+}
diff --git a/src/c/operations/multiplication/zmulv.c b/src/c/operations/multiplication/zmulv.c
new file mode 100644
index 00000000..1ac27f53
--- /dev/null
+++ b/src/c/operations/multiplication/zmulv.c
@@ -0,0 +1,27 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET
+ *
+ * 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 "addition.h"
+#include "multiplication.h"
+
+doubleComplex zmulv(doubleComplex* in1, doubleComplex* in2, int size)
+{
+ int i = 0;
+ doubleComplex out = DoubleComplex(0, 0);
+
+ for (i = 0 ; i < size ; ++i)
+ {
+ out = zadds(out, zmuls(in1[i],in2[i]));
+ }
+
+ return out;
+}