From 3f52712f806fbd80d66dfdcaff401e5cf94dcca4 Mon Sep 17 00:00:00 2001 From: yash1112 Date: Fri, 7 Jul 2017 21:20:49 +0530 Subject: sci2c arduino updated --- src/c/matrixOperations/Makefile.am | 38 + src/c/matrixOperations/Makefile.in | 583 +++++++++++++ src/c/matrixOperations/cat/Makefile.am | 52 ++ src/c/matrixOperations/cat/Makefile.in | 792 +++++++++++++++++ src/c/matrixOperations/cat/ccata.c | 54 ++ src/c/matrixOperations/cat/ccats.c | 23 + src/c/matrixOperations/cat/dcata.c | 55 ++ src/c/matrixOperations/cat/dcats.c | 23 + src/c/matrixOperations/cat/i16cata.c | 63 ++ src/c/matrixOperations/cat/i16cats.c | 26 + src/c/matrixOperations/cat/i8cata.c | 60 ++ src/c/matrixOperations/cat/i8cats.c | 26 + src/c/matrixOperations/cat/scata.c | 55 ++ src/c/matrixOperations/cat/scats.c | 23 + .../cat/testDoubleMatrixConcatenation.c | 342 ++++++++ .../cat/testFloatMatrixConcatenation.c | 341 ++++++++ .../testDoubleMatrixConcatenation.vcxproj | 178 ++++ .../testDoubleMatrixConcatenation.vcxproj.filters | 22 + .../testFloatMatrixConcatenation.vcxproj | 178 ++++ .../testFloatMatrixConcatenation.vcxproj.filters | 22 + src/c/matrixOperations/cat/u16cata.c | 63 ++ src/c/matrixOperations/cat/u16cats.c | 27 + src/c/matrixOperations/cat/u8cata.c | 60 ++ src/c/matrixOperations/cat/u8cats.c | 26 + src/c/matrixOperations/cat/zcata.c | 54 ++ src/c/matrixOperations/cat/zcats.c | 24 + src/c/matrixOperations/chol/Makefile.am | 71 ++ src/c/matrixOperations/chol/Makefile.in | 772 +++++++++++++++++ src/c/matrixOperations/chol/cchola.c | 91 ++ src/c/matrixOperations/chol/dchola.c | 69 ++ src/c/matrixOperations/chol/dchols.c | 22 + src/c/matrixOperations/chol/schola.c | 80 ++ src/c/matrixOperations/chol/schols.c | 23 + src/c/matrixOperations/chol/testDoubleChol.c | 152 ++++ src/c/matrixOperations/chol/testFloatChol.c | 97 +++ .../chol/test_DoubleChol/testDoubleChol.vcxproj | 178 ++++ .../test_DoubleChol/testDoubleChol.vcxproj.filters | 22 + .../chol/test_FloatChol/testFloatChol.vcxproj | 178 ++++ .../test_FloatChol/testFloatChol.vcxproj.filters | 22 + src/c/matrixOperations/chol/zchola.c | 80 ++ src/c/matrixOperations/cumprod/dcolumncumproda.c | 39 + src/c/matrixOperations/cumprod/dcumproda.c | 31 + src/c/matrixOperations/cumprod/drowcumproda.c | 38 + src/c/matrixOperations/cumprod/i16columncumproda.c | 39 + src/c/matrixOperations/cumprod/i16cumproda.c | 31 + src/c/matrixOperations/cumprod/i16rowcumproda.c | 38 + src/c/matrixOperations/cumprod/i8columncumproda.c | 39 + src/c/matrixOperations/cumprod/i8cumproda.c | 31 + src/c/matrixOperations/cumprod/i8rowcumproda.c | 38 + src/c/matrixOperations/cumprod/scolumncumproda.c | 39 + src/c/matrixOperations/cumprod/scumproda.c | 31 + src/c/matrixOperations/cumprod/srowcumproda.c | 38 + src/c/matrixOperations/cumprod/u16columncumproda.c | 39 + src/c/matrixOperations/cumprod/u16cumproda.c | 31 + src/c/matrixOperations/cumprod/u16rowcumproda.c | 38 + src/c/matrixOperations/cumprod/u8columncumproda.c | 39 + src/c/matrixOperations/cumprod/u8cumproda.c | 31 + src/c/matrixOperations/cumprod/u8rowcumproda.c | 38 + src/c/matrixOperations/cumsum/dcolumncumsuma.c | 39 + src/c/matrixOperations/cumsum/dcumsuma.c | 31 + src/c/matrixOperations/cumsum/drowcumsuma.c | 38 + src/c/matrixOperations/cumsum/i16columncumsuma.c | 39 + src/c/matrixOperations/cumsum/i16cumsuma.c | 31 + src/c/matrixOperations/cumsum/i16rowcumsuma.c | 38 + src/c/matrixOperations/cumsum/i8columncumsuma.c | 39 + src/c/matrixOperations/cumsum/i8cumsuma.c | 31 + src/c/matrixOperations/cumsum/i8rowcumsuma.c | 38 + src/c/matrixOperations/cumsum/scolumncumsuma.c | 39 + src/c/matrixOperations/cumsum/scumsuma.c | 31 + src/c/matrixOperations/cumsum/srowcumsuma.c | 38 + src/c/matrixOperations/cumsum/u16columncumsuma.c | 39 + src/c/matrixOperations/cumsum/u16cumsuma.c | 31 + src/c/matrixOperations/cumsum/u16rowcumsuma.c | 38 + src/c/matrixOperations/cumsum/u8columncumsuma.c | 39 + src/c/matrixOperations/cumsum/u8cumsuma.c | 31 + src/c/matrixOperations/cumsum/u8rowcumsuma.c | 38 + src/c/matrixOperations/determ/Makefile.am | 64 ++ src/c/matrixOperations/determ/Makefile.in | 750 +++++++++++++++++ src/c/matrixOperations/determ/cdeterma.c | 150 ++++ src/c/matrixOperations/determ/ddeterma.c | 92 ++ src/c/matrixOperations/determ/i16determa.c | 92 ++ src/c/matrixOperations/determ/i8determa.c | 92 ++ src/c/matrixOperations/determ/sdeterma.c | 97 +++ src/c/matrixOperations/determ/testDoubleDeterm.c | 451 ++++++++++ src/c/matrixOperations/determ/testFloatDeterm.c | 453 ++++++++++ .../test_DoubleDeterm/testDoubleDeterm.vcxproj | 186 ++++ .../testDoubleDeterm.vcxproj.filters | 22 + .../determ/test_DoubleDist/testDoubleDist.vcxproj | 178 ++++ .../test_DoubleDist/testDoubleDist.vcxproj.filters | 22 + .../test_FloatDeterm/testFloatDeterm.vcxproj | 178 ++++ .../testFloatDeterm.vcxproj.filters | 22 + src/c/matrixOperations/determ/u16determa.c | 92 ++ src/c/matrixOperations/determ/u8determa.c | 92 ++ src/c/matrixOperations/determ/zdeterma.c | 138 +++ src/c/matrixOperations/diag/ddiaga.c | 40 + src/c/matrixOperations/diag/ddiagexa.c | 130 +++ src/c/matrixOperations/diag/ddiagexs.c | 53 ++ src/c/matrixOperations/diag/ddiagina.c | 59 ++ src/c/matrixOperations/diag/ddiagins.c | 37 + src/c/matrixOperations/diag/ddiags.c | 20 + src/c/matrixOperations/diag/i16diaga.c | 40 + src/c/matrixOperations/diag/i16diagexa.c | 130 +++ src/c/matrixOperations/diag/i16diagexs.c | 53 ++ src/c/matrixOperations/diag/i16diagina.c | 58 ++ src/c/matrixOperations/diag/i16diagins.c | 37 + src/c/matrixOperations/diag/i16diags.c | 20 + src/c/matrixOperations/diag/i8diaga.c | 40 + src/c/matrixOperations/diag/i8diagexa.c | 130 +++ src/c/matrixOperations/diag/i8diagexs.c | 53 ++ src/c/matrixOperations/diag/i8diagina.c | 58 ++ src/c/matrixOperations/diag/i8diagins.c | 37 + src/c/matrixOperations/diag/i8diags.c | 20 + src/c/matrixOperations/diag/u16diaga.c | 40 + src/c/matrixOperations/diag/u16diagexa.c | 130 +++ src/c/matrixOperations/diag/u16diagexs.c | 53 ++ src/c/matrixOperations/diag/u16diagina.c | 58 ++ src/c/matrixOperations/diag/u16diagins.c | 37 + src/c/matrixOperations/diag/u16diags.c | 20 + src/c/matrixOperations/diag/u8diaga.c | 40 + src/c/matrixOperations/diag/u8diagexa.c | 130 +++ src/c/matrixOperations/diag/u8diagexs.c | 53 ++ src/c/matrixOperations/diag/u8diagina.c | 58 ++ src/c/matrixOperations/diag/u8diagins.c | 37 + src/c/matrixOperations/diag/u8diags.c | 20 + src/c/matrixOperations/dist/Makefile.am | 87 ++ src/c/matrixOperations/dist/Makefile.in | 803 ++++++++++++++++++ src/c/matrixOperations/dist/cdista.c | 54 ++ src/c/matrixOperations/dist/cdists.c | 25 + src/c/matrixOperations/dist/ddista.c | 53 ++ src/c/matrixOperations/dist/ddists.c | 21 + src/c/matrixOperations/dist/sdista.c | 53 ++ src/c/matrixOperations/dist/sdists.c | 20 + src/c/matrixOperations/dist/testDoubleDist.c | 116 +++ src/c/matrixOperations/dist/testFloatDist.c | 116 +++ .../dist/test_FloatDist/testFloatDist.vcxproj | 178 ++++ .../test_FloatDist/testFloatDist.vcxproj.filters | 22 + src/c/matrixOperations/dist/zdista.c | 54 ++ src/c/matrixOperations/dist/zdists.c | 25 + src/c/matrixOperations/division/Makefile.am | 73 ++ src/c/matrixOperations/division/Makefile.in | 880 +++++++++++++++++++ src/c/matrixOperations/division/cldivma.c | 65 ++ src/c/matrixOperations/division/crdivcsv.c | 23 + src/c/matrixOperations/division/crdivma.c | 62 ++ src/c/matrixOperations/division/crdivscv.c | 23 + src/c/matrixOperations/division/crdivv.c | 24 + src/c/matrixOperations/division/dldivma.c | 111 +++ src/c/matrixOperations/division/drdivma.c | 129 +++ src/c/matrixOperations/division/drdivv.c | 24 + src/c/matrixOperations/division/i16ldivma.c | 111 +++ src/c/matrixOperations/division/i16rdivma.c | 129 +++ src/c/matrixOperations/division/i16rdivv.c | 24 + src/c/matrixOperations/division/i8ldivma.c | 111 +++ src/c/matrixOperations/division/i8rdivma.c | 129 +++ src/c/matrixOperations/division/i8rdivv.c | 24 + src/c/matrixOperations/division/sldivma.c | 61 ++ src/c/matrixOperations/division/srdivma.c | 63 ++ src/c/matrixOperations/division/srdivv.c | 24 + .../division/testMatrixLDivision.c | 456 ++++++++++ .../division/testMatrixRDivision.c | 504 +++++++++++ .../testMatrixLDivision.vcxproj | 178 ++++ .../testMatrixLDivision.vcxproj.filters | 22 + .../testMatrixRDivision.vcxproj | 178 ++++ .../testMatrixRDivision.vcxproj.filters | 22 + src/c/matrixOperations/division/u16ldivma.c | 111 +++ src/c/matrixOperations/division/u16rdivma.c | 129 +++ src/c/matrixOperations/division/u16rdivv.c | 24 + src/c/matrixOperations/division/u8ldivma.c | 111 +++ src/c/matrixOperations/division/u8rdivma.c | 129 +++ src/c/matrixOperations/division/u8rdivv.c | 24 + src/c/matrixOperations/division/zldivma.c | 125 +++ src/c/matrixOperations/division/zrdivdzv.c | 23 + src/c/matrixOperations/division/zrdivma.c | 165 ++++ src/c/matrixOperations/division/zrdivv.c | 24 + src/c/matrixOperations/division/zrdivzdv.c | 23 + src/c/matrixOperations/expm/Makefile.am | 79 ++ src/c/matrixOperations/expm/Makefile.in | 753 +++++++++++++++++ src/c/matrixOperations/expm/cexpma.c | 173 ++++ src/c/matrixOperations/expm/dexpma.c | 163 ++++ src/c/matrixOperations/expm/sexpma.c | 167 ++++ .../matrixOperations/expm/testMatrixExponential.c | 570 +++++++++++++ .../testMatrixExponential.vcxproj | 178 ++++ .../testMatrixExponential.vcxproj.filters | 22 + src/c/matrixOperations/expm/zexpma.c | 178 ++++ src/c/matrixOperations/eye/Makefile.am | 46 + src/c/matrixOperations/eye/Makefile.in | 712 ++++++++++++++++ src/c/matrixOperations/eye/ceyea.c | 24 + src/c/matrixOperations/eye/deyea.c | 23 + src/c/matrixOperations/eye/i16eyea.c | 23 + src/c/matrixOperations/eye/i8eyea.c | 23 + src/c/matrixOperations/eye/seyea.c | 23 + src/c/matrixOperations/eye/testMatrixEye.c | 348 ++++++++ .../eye/test_MatrixEye/testMatrixEye.vcxproj | 178 ++++ .../test_MatrixEye/testMatrixEye.vcxproj.filters | 22 + src/c/matrixOperations/eye/u16eyea.c | 23 + src/c/matrixOperations/eye/u8eyea.c | 23 + src/c/matrixOperations/eye/zeyea.c | 24 + src/c/matrixOperations/fill/Makefile.am | 55 ++ src/c/matrixOperations/fill/Makefile.in | 739 ++++++++++++++++ src/c/matrixOperations/fill/cfilla.c | 21 + src/c/matrixOperations/fill/dfilla.c | 22 + src/c/matrixOperations/fill/sfilla.c | 22 + src/c/matrixOperations/fill/testDoubleFill.c | 49 ++ src/c/matrixOperations/fill/testFloatFill.c | 47 ++ .../fill/test_DoubleFill/testDoubleFill.vcxproj | 178 ++++ .../test_DoubleFill/testDoubleFill.vcxproj.filters | 22 + .../fill/test_FloatFill/testFloatFill.vcxproj | 178 ++++ .../test_FloatFill/testFloatFill.vcxproj.filters | 22 + src/c/matrixOperations/fill/zfilla.c | 22 + src/c/matrixOperations/flipdim/dflipdima.c | 81 ++ src/c/matrixOperations/flipdim/i16flipdima.c | 81 ++ src/c/matrixOperations/flipdim/i8flipdima.c | 81 ++ src/c/matrixOperations/flipdim/sflipdima.c | 81 ++ src/c/matrixOperations/flipdim/u16flipdima.c | 81 ++ src/c/matrixOperations/flipdim/u8flipdima.c | 80 ++ src/c/matrixOperations/hilb/Makefile.am | 37 + src/c/matrixOperations/hilb/Makefile.in | 688 +++++++++++++++ src/c/matrixOperations/hilb/dhilba.c | 43 + src/c/matrixOperations/hilb/shilba.c | 44 + src/c/matrixOperations/hilb/testHilbert.c | 112 +++ .../hilb/test_Hilbert/testHilbert.vcxproj | 174 ++++ .../hilb/test_Hilbert/testHilbert.vcxproj.filters | 22 + src/c/matrixOperations/includes/cat.h | 162 ++++ src/c/matrixOperations/includes/chol.h | 43 + src/c/matrixOperations/includes/cumprod.h | 53 ++ src/c/matrixOperations/includes/cumsum.h | 53 ++ src/c/matrixOperations/includes/determ.h | 39 + src/c/matrixOperations/includes/diag.h | 97 +++ src/c/matrixOperations/includes/dist.h | 48 ++ .../includes/dynlib_matrixoperations.h | 26 + src/c/matrixOperations/includes/eye.h | 110 +++ src/c/matrixOperations/includes/fill.h | 40 + src/c/matrixOperations/includes/flipdim.h | 40 + src/c/matrixOperations/includes/hilb.h | 46 + src/c/matrixOperations/includes/infiniteNorm.h | 67 ++ src/c/matrixOperations/includes/jmat.h | 29 + src/c/matrixOperations/includes/kron.h | 32 + src/c/matrixOperations/includes/logm.h | 37 + src/c/matrixOperations/includes/matrixDivision.h | 102 +++ .../matrixOperations/includes/matrixExponential.h | 51 ++ src/c/matrixOperations/includes/matrixInversion.h | 104 +++ src/c/matrixOperations/includes/matrixMagnitude.h | 54 ++ .../includes/matrixMultiplication.h | 150 ++++ src/c/matrixOperations/includes/matrixPow.h | 43 + .../includes/matrixSquaredMagnitude.h | 41 + src/c/matrixOperations/includes/matrixTrace.h | 109 +++ src/c/matrixOperations/includes/matrixTranspose.h | 101 +++ src/c/matrixOperations/includes/norm.h | 32 + src/c/matrixOperations/includes/ones.h | 112 +++ src/c/matrixOperations/includes/spec.h | 56 ++ src/c/matrixOperations/includes/tril.h | 34 + src/c/matrixOperations/includes/triu.h | 34 + src/c/matrixOperations/includes/zeros.h | 114 +++ src/c/matrixOperations/infiniteNorm/Makefile.am | 58 ++ src/c/matrixOperations/infiniteNorm/Makefile.in | 734 ++++++++++++++++ src/c/matrixOperations/infiniteNorm/cinfnorma.c | 36 + src/c/matrixOperations/infiniteNorm/dinfnorma.c | 35 + src/c/matrixOperations/infiniteNorm/sinfnorma.c | 37 + .../infiniteNorm/testMatrixInfiniteNorm.c | 316 +++++++ .../testMatrixInfiniteNorm.vcxproj | 178 ++++ .../testMatrixInfiniteNorm.vcxproj.filters | 22 + src/c/matrixOperations/infiniteNorm/zinfnorma.c | 34 + src/c/matrixOperations/interfaces/int_OpApex.h | 34 + .../matrixOperations/interfaces/int_OpBackSlash.h | 37 + src/c/matrixOperations/interfaces/int_OpCc.h | 134 +++ src/c/matrixOperations/interfaces/int_OpDotApex.h | 34 + src/c/matrixOperations/interfaces/int_OpRc.h | 139 +++ src/c/matrixOperations/interfaces/int_OpSlash.h | 38 + src/c/matrixOperations/interfaces/int_OpStar.h | 45 + src/c/matrixOperations/interfaces/int_cat.h | 359 ++++++++ src/c/matrixOperations/interfaces/int_chol.h | 34 + src/c/matrixOperations/interfaces/int_cumprod.h | 54 ++ src/c/matrixOperations/interfaces/int_cumsum.h | 54 ++ src/c/matrixOperations/interfaces/int_det.h | 34 + src/c/matrixOperations/interfaces/int_diag.h | 85 ++ src/c/matrixOperations/interfaces/int_dist.h | 34 + src/c/matrixOperations/interfaces/int_expm.h | 26 + src/c/matrixOperations/interfaces/int_eye.h | 88 ++ src/c/matrixOperations/interfaces/int_fill.h | 51 ++ src/c/matrixOperations/interfaces/int_flipdim.h | 109 +++ src/c/matrixOperations/interfaces/int_invert.h | 50 ++ src/c/matrixOperations/interfaces/int_kron.h | 43 + src/c/matrixOperations/interfaces/int_norm.h | 53 ++ src/c/matrixOperations/interfaces/int_ones.h | 87 ++ src/c/matrixOperations/interfaces/int_permute.h | 28 + src/c/matrixOperations/interfaces/int_spec.h | 71 ++ src/c/matrixOperations/interfaces/int_trace.h | 48 ++ src/c/matrixOperations/interfaces/int_transpose.h | 51 ++ src/c/matrixOperations/interfaces/int_tril.h | 62 ++ src/c/matrixOperations/interfaces/int_triu.h | 62 ++ src/c/matrixOperations/interfaces/int_v2magn.h | 34 + src/c/matrixOperations/interfaces/int_vmagn.h | 51 ++ src/c/matrixOperations/interfaces/int_zeros.h | 89 ++ src/c/matrixOperations/interfaces/interface.sh | 6 + src/c/matrixOperations/inversion/Makefile.am | 56 ++ src/c/matrixOperations/inversion/Makefile.in | 731 ++++++++++++++++ src/c/matrixOperations/inversion/cinverma.c | 53 ++ src/c/matrixOperations/inversion/dinverma.c | 38 + src/c/matrixOperations/inversion/i16inverma.c | 55 ++ src/c/matrixOperations/inversion/i8inverma.c | 55 ++ src/c/matrixOperations/inversion/sinverma.c | 55 ++ .../inversion/testMatrixInversion.c | 581 +++++++++++++ .../testMatrixInversion.vcxproj | 178 ++++ .../testMatrixInversion.vcxproj.filters | 22 + src/c/matrixOperations/inversion/u16inverma.c | 55 ++ src/c/matrixOperations/inversion/u8inverma.c | 55 ++ src/c/matrixOperations/inversion/zinverma.c | 36 + src/c/matrixOperations/jmat/Makefile.am | 35 + src/c/matrixOperations/jmat/Makefile.in | 684 +++++++++++++++ src/c/matrixOperations/jmat/djmata.c | 22 + src/c/matrixOperations/jmat/sjmata.c | 22 + src/c/matrixOperations/jmat/testJmat.c | 20 + .../jmat/test_Jmat/testJmat.vcxproj | 178 ++++ .../jmat/test_Jmat/testJmat.vcxproj.filters | 22 + src/c/matrixOperations/kron/dkrona.c | 39 + src/c/matrixOperations/kron/skrona.c | 39 + src/c/matrixOperations/logm/Makefile.am | 81 ++ src/c/matrixOperations/logm/Makefile.in | 763 +++++++++++++++++ src/c/matrixOperations/logm/clogma.c | 37 + src/c/matrixOperations/logm/dlogma.c | 31 + src/c/matrixOperations/logm/slogma.c | 32 + src/c/matrixOperations/logm/testDoubleLogm.c | 185 ++++ src/c/matrixOperations/logm/testFloatLogm.c | 185 ++++ .../logm/test_DoubleLogm/testDoubleLogm.vcxproj | 178 ++++ .../test_DoubleLogm/testDoubleLogm.vcxproj.filters | 22 + .../logm/test_FloatLogm/testFloatLogm.vcxproj | 178 ++++ .../test_FloatLogm/testFloatLogm.vcxproj.filters | 22 + src/c/matrixOperations/logm/zlogma.c | 100 +++ src/c/matrixOperations/magnitude/Makefile.am | 66 ++ src/c/matrixOperations/magnitude/Makefile.in | 805 ++++++++++++++++++ src/c/matrixOperations/magnitude/cmagna.c | 44 + src/c/matrixOperations/magnitude/cmagns.c | 23 + src/c/matrixOperations/magnitude/dmagna.c | 43 + src/c/matrixOperations/magnitude/dmagns.c | 23 + src/c/matrixOperations/magnitude/i16magna.c | 43 + src/c/matrixOperations/magnitude/i16magns.c | 22 + src/c/matrixOperations/magnitude/i8magna.c | 43 + src/c/matrixOperations/magnitude/i8magns.c | 22 + src/c/matrixOperations/magnitude/smagna.c | 45 + src/c/matrixOperations/magnitude/smagns.c | 23 + .../magnitude/testDoubleMagnitude.c | 192 +++++ .../magnitude/testFloatMagnitude.c | 183 ++++ .../testDoubleMagnitude.vcxproj | 178 ++++ .../testDoubleMagnitude.vcxproj.filters | 22 + .../test_FloatMagnitude/testFloatMagnitude.vcxproj | 178 ++++ .../testFloatMagnitude.vcxproj.filters | 22 + src/c/matrixOperations/magnitude/u16magna.c | 33 + src/c/matrixOperations/magnitude/u16magns.c | 13 + src/c/matrixOperations/magnitude/u8magna.c | 33 + src/c/matrixOperations/magnitude/u8magns.c | 13 + src/c/matrixOperations/magnitude/zmagna.c | 46 + src/c/matrixOperations/magnitude/zmagns.c | 23 + src/c/matrixOperations/matrixOperations.vcxproj | 934 +++++++++++++++++++++ .../matrixOperations.vcxproj.filters | 576 +++++++++++++ src/c/matrixOperations/multiplication/Makefile.am | 49 ++ src/c/matrixOperations/multiplication/Makefile.in | 756 +++++++++++++++++ src/c/matrixOperations/multiplication/cmulma.c | 44 + src/c/matrixOperations/multiplication/dmulma.c | 67 ++ src/c/matrixOperations/multiplication/i16mulma.c | 54 ++ src/c/matrixOperations/multiplication/i8mulma.c | 54 ++ src/c/matrixOperations/multiplication/smulma.c | 49 ++ .../testDoubleMatrixMultiplication.c | 354 ++++++++ .../multiplication/testFloatMatrixMultiplication.c | 213 +++++ .../testDoubleMatrixMultiplication.vcxproj | 178 ++++ .../testDoubleMatrixMultiplication.vcxproj.filters | 22 + .../testFloatMatrixMultiplication.vcxproj | 178 ++++ .../testFloatMatrixMultiplication.vcxproj.filters | 22 + src/c/matrixOperations/multiplication/u16mulma.c | 54 ++ src/c/matrixOperations/multiplication/u8mulma.c | 54 ++ src/c/matrixOperations/multiplication/zmulma.c | 103 +++ src/c/matrixOperations/norm/dnorma.c | 72 ++ src/c/matrixOperations/norm/dnormv.c | 60 ++ src/c/matrixOperations/norm/snorma.c | 72 ++ src/c/matrixOperations/norm/snormv.c | 60 ++ src/c/matrixOperations/ones/Makefile.am | 42 + src/c/matrixOperations/ones/Makefile.in | 710 ++++++++++++++++ src/c/matrixOperations/ones/conesa.c | 25 + src/c/matrixOperations/ones/donesa.c | 26 + src/c/matrixOperations/ones/i16onesa.c | 28 + src/c/matrixOperations/ones/i8onesa.c | 28 + src/c/matrixOperations/ones/sonesa.c | 28 + src/c/matrixOperations/ones/testMatrixOnes.c | 160 ++++ .../ones/test_MatrixOnes/testMatrixOnes.vcxproj | 178 ++++ .../test_MatrixOnes/testMatrixOnes.vcxproj.filters | 22 + src/c/matrixOperations/ones/u16onesa.c | 28 + src/c/matrixOperations/ones/u8onesa.c | 28 + src/c/matrixOperations/ones/zonesa.c | 25 + src/c/matrixOperations/powm/Makefile.am | 86 ++ src/c/matrixOperations/powm/Makefile.in | 784 +++++++++++++++++ src/c/matrixOperations/powm/cpowma.c | 64 ++ src/c/matrixOperations/powm/dpowma.c | 72 ++ src/c/matrixOperations/powm/spowma.c | 72 ++ src/c/matrixOperations/powm/testDoublePowm.c | 138 +++ src/c/matrixOperations/powm/testFloatPowm.c | 136 +++ .../powm/test_DoublePowm/testDoublePowm.vcxproj | 178 ++++ .../test_DoublePowm/testDoublePowm.vcxproj.filters | 22 + .../powm/test_FloatPowm/testFloatPowm.vcxproj | 178 ++++ .../test_FloatPowm/testFloatPowm.vcxproj.filters | 22 + src/c/matrixOperations/powm/zpowma.c | 64 ++ src/c/matrixOperations/spec/Makefile.am | 70 ++ src/c/matrixOperations/spec/Makefile.in | 755 +++++++++++++++++ src/c/matrixOperations/spec/cspeca.c | 34 + src/c/matrixOperations/spec/dspeca.c | 71 ++ src/c/matrixOperations/spec/sspeca.c | 34 + src/c/matrixOperations/spec/testDoubleSpec.c | 116 +++ src/c/matrixOperations/spec/testFloatSpec.c | 110 +++ .../spec/test_DoubleSpec/testDoubleSpec.vcxproj | 178 ++++ .../test_DoubleSpec/testDoubleSpec.vcxproj.filters | 22 + .../spec/test_FloatSpec/testFloatSpec.vcxproj | 178 ++++ .../test_FloatSpec/testFloatSpec.vcxproj.filters | 22 + src/c/matrixOperations/spec/zspeca.c | 80 ++ src/c/matrixOperations/spec2/Makefile.am | 70 ++ src/c/matrixOperations/spec2/Makefile.in | 757 +++++++++++++++++ src/c/matrixOperations/spec2/cspec2a.c | 36 + src/c/matrixOperations/spec2/dspec2a.c | 113 +++ src/c/matrixOperations/spec2/sspec2a.c | 36 + src/c/matrixOperations/spec2/testDoubleSpec2.c | 261 ++++++ src/c/matrixOperations/spec2/testFloatSpec2.c | 134 +++ .../spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj | 178 ++++ .../testDoubleSpec2.vcxproj.filters | 22 + .../spec2/test_FloatSpec2/testFloatSpec2.vcxproj | 178 ++++ .../test_FloatSpec2/testFloatSpec2.vcxproj.filters | 22 + src/c/matrixOperations/spec2/zspec2a.c | 96 +++ .../matrixOperations/squaredMagnitude/Makefile.am | 61 ++ .../matrixOperations/squaredMagnitude/Makefile.in | 799 ++++++++++++++++++ .../matrixOperations/squaredMagnitude/csquMagna.c | 25 + .../matrixOperations/squaredMagnitude/csquMagns.c | 22 + .../matrixOperations/squaredMagnitude/dsquMagna.c | 25 + .../matrixOperations/squaredMagnitude/dsquMagns.c | 22 + .../matrixOperations/squaredMagnitude/ssquMagna.c | 25 + .../matrixOperations/squaredMagnitude/ssquMagns.c | 22 + .../squaredMagnitude/testDoubleSquaredMagnitude.c | 67 ++ .../squaredMagnitude/testFloatSquaredMagnitude.c | 52 ++ .../testDoubleSquaredMagnitude.vcxproj | 178 ++++ .../testDoubleSquaredMagnitude.vcxproj.filters | 22 + .../testFloatSquaredMagnitude.vcxproj | 178 ++++ .../testFloatSquaredMagnitude.vcxproj.filters | 22 + .../matrixOperations/squaredMagnitude/zsquMagna.c | 25 + .../matrixOperations/squaredMagnitude/zsquMagns.c | 22 + src/c/matrixOperations/trace/Makefile.am | 41 + src/c/matrixOperations/trace/Makefile.in | 712 ++++++++++++++++ src/c/matrixOperations/trace/ctracea.c | 32 + src/c/matrixOperations/trace/dtracea.c | 27 + src/c/matrixOperations/trace/i16tracea.c | 28 + src/c/matrixOperations/trace/i8tracea.c | 28 + src/c/matrixOperations/trace/stracea.c | 27 + src/c/matrixOperations/trace/testMatrixTrace.c | 237 ++++++ .../trace/test_MatrixTrace/testMatrixTrace.vcxproj | 178 ++++ .../testMatrixTrace.vcxproj.filters | 22 + src/c/matrixOperations/trace/u16tracea.c | 28 + src/c/matrixOperations/trace/u8tracea.c | 28 + src/c/matrixOperations/trace/ztracea.c | 31 + src/c/matrixOperations/transpose/Makefile.am | 42 + src/c/matrixOperations/transpose/Makefile.in | 718 ++++++++++++++++ src/c/matrixOperations/transpose/ctransposea.c | 27 + src/c/matrixOperations/transpose/dtransposea.c | 28 + src/c/matrixOperations/transpose/i16transposea.c | 27 + src/c/matrixOperations/transpose/i8transposea.c | 27 + src/c/matrixOperations/transpose/stransposea.c | 26 + .../transpose/testMatrixTranspose.c | 519 ++++++++++++ .../testMatrixTranspose.vcxproj | 178 ++++ .../testMatrixTranspose.vcxproj.filters | 22 + src/c/matrixOperations/transpose/u16transposea.c | 27 + src/c/matrixOperations/transpose/u8transposea.c | 27 + src/c/matrixOperations/transpose/ztransposea.c | 27 + src/c/matrixOperations/tril/dtrila.c | 35 + src/c/matrixOperations/tril/i16trila.c | 35 + src/c/matrixOperations/tril/i8trila.c | 35 + src/c/matrixOperations/tril/strila.c | 35 + src/c/matrixOperations/tril/u16trila.c | 35 + src/c/matrixOperations/tril/u8trila.c | 35 + src/c/matrixOperations/triu/dtriua.c | 35 + src/c/matrixOperations/triu/i16triua.c | 35 + src/c/matrixOperations/triu/i8triua.c | 35 + src/c/matrixOperations/triu/striua.c | 35 + src/c/matrixOperations/triu/u16triua.c | 35 + src/c/matrixOperations/triu/u8triua.c | 36 + src/c/matrixOperations/zeros/Makefile.am | 42 + src/c/matrixOperations/zeros/Makefile.in | 712 ++++++++++++++++ src/c/matrixOperations/zeros/czerosa.c | 25 + src/c/matrixOperations/zeros/dzerosa.c | 26 + src/c/matrixOperations/zeros/dzerosh.c | 26 + src/c/matrixOperations/zeros/i16zerosa.c | 28 + src/c/matrixOperations/zeros/i8zerosa.c | 28 + src/c/matrixOperations/zeros/szerosa.c | 28 + src/c/matrixOperations/zeros/testMatrixZeros.c | 137 +++ .../zeros/test_MatrixZeros/testMatrixZeros.vcxproj | 178 ++++ .../testMatrixZeros.vcxproj.filters | 22 + src/c/matrixOperations/zeros/u16zerosa.c | 28 + src/c/matrixOperations/zeros/u8zerosa.c | 28 + src/c/matrixOperations/zeros/zzerosa.c | 25 + 490 files changed, 53740 insertions(+) create mode 100644 src/c/matrixOperations/Makefile.am create mode 100644 src/c/matrixOperations/Makefile.in create mode 100644 src/c/matrixOperations/cat/Makefile.am create mode 100644 src/c/matrixOperations/cat/Makefile.in create mode 100644 src/c/matrixOperations/cat/ccata.c create mode 100644 src/c/matrixOperations/cat/ccats.c create mode 100644 src/c/matrixOperations/cat/dcata.c create mode 100644 src/c/matrixOperations/cat/dcats.c create mode 100644 src/c/matrixOperations/cat/i16cata.c create mode 100644 src/c/matrixOperations/cat/i16cats.c create mode 100644 src/c/matrixOperations/cat/i8cata.c create mode 100644 src/c/matrixOperations/cat/i8cats.c create mode 100644 src/c/matrixOperations/cat/scata.c create mode 100644 src/c/matrixOperations/cat/scats.c create mode 100644 src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c create mode 100644 src/c/matrixOperations/cat/testFloatMatrixConcatenation.c create mode 100644 src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj create mode 100644 src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters create mode 100644 src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj create mode 100644 src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters create mode 100644 src/c/matrixOperations/cat/u16cata.c create mode 100644 src/c/matrixOperations/cat/u16cats.c create mode 100644 src/c/matrixOperations/cat/u8cata.c create mode 100644 src/c/matrixOperations/cat/u8cats.c create mode 100644 src/c/matrixOperations/cat/zcata.c create mode 100644 src/c/matrixOperations/cat/zcats.c create mode 100644 src/c/matrixOperations/chol/Makefile.am create mode 100644 src/c/matrixOperations/chol/Makefile.in create mode 100644 src/c/matrixOperations/chol/cchola.c create mode 100644 src/c/matrixOperations/chol/dchola.c create mode 100644 src/c/matrixOperations/chol/dchols.c create mode 100644 src/c/matrixOperations/chol/schola.c create mode 100644 src/c/matrixOperations/chol/schols.c create mode 100644 src/c/matrixOperations/chol/testDoubleChol.c create mode 100644 src/c/matrixOperations/chol/testFloatChol.c create mode 100644 src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj create mode 100644 src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters create mode 100644 src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj create mode 100644 src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters create mode 100644 src/c/matrixOperations/chol/zchola.c create mode 100644 src/c/matrixOperations/cumprod/dcolumncumproda.c create mode 100644 src/c/matrixOperations/cumprod/dcumproda.c create mode 100644 src/c/matrixOperations/cumprod/drowcumproda.c create mode 100644 src/c/matrixOperations/cumprod/i16columncumproda.c create mode 100644 src/c/matrixOperations/cumprod/i16cumproda.c create mode 100644 src/c/matrixOperations/cumprod/i16rowcumproda.c create mode 100644 src/c/matrixOperations/cumprod/i8columncumproda.c create mode 100644 src/c/matrixOperations/cumprod/i8cumproda.c create mode 100644 src/c/matrixOperations/cumprod/i8rowcumproda.c create mode 100644 src/c/matrixOperations/cumprod/scolumncumproda.c create mode 100644 src/c/matrixOperations/cumprod/scumproda.c create mode 100644 src/c/matrixOperations/cumprod/srowcumproda.c create mode 100644 src/c/matrixOperations/cumprod/u16columncumproda.c create mode 100644 src/c/matrixOperations/cumprod/u16cumproda.c create mode 100644 src/c/matrixOperations/cumprod/u16rowcumproda.c create mode 100644 src/c/matrixOperations/cumprod/u8columncumproda.c create mode 100644 src/c/matrixOperations/cumprod/u8cumproda.c create mode 100644 src/c/matrixOperations/cumprod/u8rowcumproda.c create mode 100644 src/c/matrixOperations/cumsum/dcolumncumsuma.c create mode 100644 src/c/matrixOperations/cumsum/dcumsuma.c create mode 100644 src/c/matrixOperations/cumsum/drowcumsuma.c create mode 100644 src/c/matrixOperations/cumsum/i16columncumsuma.c create mode 100644 src/c/matrixOperations/cumsum/i16cumsuma.c create mode 100644 src/c/matrixOperations/cumsum/i16rowcumsuma.c create mode 100644 src/c/matrixOperations/cumsum/i8columncumsuma.c create mode 100644 src/c/matrixOperations/cumsum/i8cumsuma.c create mode 100644 src/c/matrixOperations/cumsum/i8rowcumsuma.c create mode 100644 src/c/matrixOperations/cumsum/scolumncumsuma.c create mode 100644 src/c/matrixOperations/cumsum/scumsuma.c create mode 100644 src/c/matrixOperations/cumsum/srowcumsuma.c create mode 100644 src/c/matrixOperations/cumsum/u16columncumsuma.c create mode 100644 src/c/matrixOperations/cumsum/u16cumsuma.c create mode 100644 src/c/matrixOperations/cumsum/u16rowcumsuma.c create mode 100644 src/c/matrixOperations/cumsum/u8columncumsuma.c create mode 100644 src/c/matrixOperations/cumsum/u8cumsuma.c create mode 100644 src/c/matrixOperations/cumsum/u8rowcumsuma.c create mode 100644 src/c/matrixOperations/determ/Makefile.am create mode 100644 src/c/matrixOperations/determ/Makefile.in create mode 100644 src/c/matrixOperations/determ/cdeterma.c create mode 100644 src/c/matrixOperations/determ/ddeterma.c create mode 100644 src/c/matrixOperations/determ/i16determa.c create mode 100644 src/c/matrixOperations/determ/i8determa.c create mode 100644 src/c/matrixOperations/determ/sdeterma.c create mode 100644 src/c/matrixOperations/determ/testDoubleDeterm.c create mode 100644 src/c/matrixOperations/determ/testFloatDeterm.c create mode 100644 src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj create mode 100644 src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters create mode 100644 src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj create mode 100644 src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters create mode 100644 src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj create mode 100644 src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters create mode 100644 src/c/matrixOperations/determ/u16determa.c create mode 100644 src/c/matrixOperations/determ/u8determa.c create mode 100644 src/c/matrixOperations/determ/zdeterma.c create mode 100644 src/c/matrixOperations/diag/ddiaga.c create mode 100644 src/c/matrixOperations/diag/ddiagexa.c create mode 100644 src/c/matrixOperations/diag/ddiagexs.c create mode 100644 src/c/matrixOperations/diag/ddiagina.c create mode 100644 src/c/matrixOperations/diag/ddiagins.c create mode 100644 src/c/matrixOperations/diag/ddiags.c create mode 100644 src/c/matrixOperations/diag/i16diaga.c create mode 100644 src/c/matrixOperations/diag/i16diagexa.c create mode 100644 src/c/matrixOperations/diag/i16diagexs.c create mode 100644 src/c/matrixOperations/diag/i16diagina.c create mode 100644 src/c/matrixOperations/diag/i16diagins.c create mode 100644 src/c/matrixOperations/diag/i16diags.c create mode 100644 src/c/matrixOperations/diag/i8diaga.c create mode 100644 src/c/matrixOperations/diag/i8diagexa.c create mode 100644 src/c/matrixOperations/diag/i8diagexs.c create mode 100644 src/c/matrixOperations/diag/i8diagina.c create mode 100644 src/c/matrixOperations/diag/i8diagins.c create mode 100644 src/c/matrixOperations/diag/i8diags.c create mode 100644 src/c/matrixOperations/diag/u16diaga.c create mode 100644 src/c/matrixOperations/diag/u16diagexa.c create mode 100644 src/c/matrixOperations/diag/u16diagexs.c create mode 100644 src/c/matrixOperations/diag/u16diagina.c create mode 100644 src/c/matrixOperations/diag/u16diagins.c create mode 100644 src/c/matrixOperations/diag/u16diags.c create mode 100644 src/c/matrixOperations/diag/u8diaga.c create mode 100644 src/c/matrixOperations/diag/u8diagexa.c create mode 100644 src/c/matrixOperations/diag/u8diagexs.c create mode 100644 src/c/matrixOperations/diag/u8diagina.c create mode 100644 src/c/matrixOperations/diag/u8diagins.c create mode 100644 src/c/matrixOperations/diag/u8diags.c create mode 100644 src/c/matrixOperations/dist/Makefile.am create mode 100644 src/c/matrixOperations/dist/Makefile.in create mode 100644 src/c/matrixOperations/dist/cdista.c create mode 100644 src/c/matrixOperations/dist/cdists.c create mode 100644 src/c/matrixOperations/dist/ddista.c create mode 100644 src/c/matrixOperations/dist/ddists.c create mode 100644 src/c/matrixOperations/dist/sdista.c create mode 100644 src/c/matrixOperations/dist/sdists.c create mode 100644 src/c/matrixOperations/dist/testDoubleDist.c create mode 100644 src/c/matrixOperations/dist/testFloatDist.c create mode 100644 src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj create mode 100644 src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters create mode 100644 src/c/matrixOperations/dist/zdista.c create mode 100644 src/c/matrixOperations/dist/zdists.c create mode 100644 src/c/matrixOperations/division/Makefile.am create mode 100644 src/c/matrixOperations/division/Makefile.in create mode 100644 src/c/matrixOperations/division/cldivma.c create mode 100644 src/c/matrixOperations/division/crdivcsv.c create mode 100644 src/c/matrixOperations/division/crdivma.c create mode 100644 src/c/matrixOperations/division/crdivscv.c create mode 100644 src/c/matrixOperations/division/crdivv.c create mode 100644 src/c/matrixOperations/division/dldivma.c create mode 100644 src/c/matrixOperations/division/drdivma.c create mode 100644 src/c/matrixOperations/division/drdivv.c create mode 100644 src/c/matrixOperations/division/i16ldivma.c create mode 100644 src/c/matrixOperations/division/i16rdivma.c create mode 100644 src/c/matrixOperations/division/i16rdivv.c create mode 100644 src/c/matrixOperations/division/i8ldivma.c create mode 100644 src/c/matrixOperations/division/i8rdivma.c create mode 100644 src/c/matrixOperations/division/i8rdivv.c create mode 100644 src/c/matrixOperations/division/sldivma.c create mode 100644 src/c/matrixOperations/division/srdivma.c create mode 100644 src/c/matrixOperations/division/srdivv.c create mode 100644 src/c/matrixOperations/division/testMatrixLDivision.c create mode 100644 src/c/matrixOperations/division/testMatrixRDivision.c create mode 100644 src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj create mode 100644 src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters create mode 100644 src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj create mode 100644 src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters create mode 100644 src/c/matrixOperations/division/u16ldivma.c create mode 100644 src/c/matrixOperations/division/u16rdivma.c create mode 100644 src/c/matrixOperations/division/u16rdivv.c create mode 100644 src/c/matrixOperations/division/u8ldivma.c create mode 100644 src/c/matrixOperations/division/u8rdivma.c create mode 100644 src/c/matrixOperations/division/u8rdivv.c create mode 100644 src/c/matrixOperations/division/zldivma.c create mode 100644 src/c/matrixOperations/division/zrdivdzv.c create mode 100644 src/c/matrixOperations/division/zrdivma.c create mode 100644 src/c/matrixOperations/division/zrdivv.c create mode 100644 src/c/matrixOperations/division/zrdivzdv.c create mode 100644 src/c/matrixOperations/expm/Makefile.am create mode 100644 src/c/matrixOperations/expm/Makefile.in create mode 100644 src/c/matrixOperations/expm/cexpma.c create mode 100644 src/c/matrixOperations/expm/dexpma.c create mode 100644 src/c/matrixOperations/expm/sexpma.c create mode 100644 src/c/matrixOperations/expm/testMatrixExponential.c create mode 100644 src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj create mode 100644 src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters create mode 100644 src/c/matrixOperations/expm/zexpma.c create mode 100644 src/c/matrixOperations/eye/Makefile.am create mode 100644 src/c/matrixOperations/eye/Makefile.in create mode 100644 src/c/matrixOperations/eye/ceyea.c create mode 100644 src/c/matrixOperations/eye/deyea.c create mode 100644 src/c/matrixOperations/eye/i16eyea.c create mode 100644 src/c/matrixOperations/eye/i8eyea.c create mode 100644 src/c/matrixOperations/eye/seyea.c create mode 100644 src/c/matrixOperations/eye/testMatrixEye.c create mode 100644 src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj create mode 100644 src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters create mode 100644 src/c/matrixOperations/eye/u16eyea.c create mode 100644 src/c/matrixOperations/eye/u8eyea.c create mode 100644 src/c/matrixOperations/eye/zeyea.c create mode 100644 src/c/matrixOperations/fill/Makefile.am create mode 100644 src/c/matrixOperations/fill/Makefile.in create mode 100644 src/c/matrixOperations/fill/cfilla.c create mode 100644 src/c/matrixOperations/fill/dfilla.c create mode 100644 src/c/matrixOperations/fill/sfilla.c create mode 100644 src/c/matrixOperations/fill/testDoubleFill.c create mode 100644 src/c/matrixOperations/fill/testFloatFill.c create mode 100644 src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj create mode 100644 src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters create mode 100644 src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj create mode 100644 src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters create mode 100644 src/c/matrixOperations/fill/zfilla.c create mode 100644 src/c/matrixOperations/flipdim/dflipdima.c create mode 100644 src/c/matrixOperations/flipdim/i16flipdima.c create mode 100644 src/c/matrixOperations/flipdim/i8flipdima.c create mode 100644 src/c/matrixOperations/flipdim/sflipdima.c create mode 100644 src/c/matrixOperations/flipdim/u16flipdima.c create mode 100644 src/c/matrixOperations/flipdim/u8flipdima.c create mode 100644 src/c/matrixOperations/hilb/Makefile.am create mode 100644 src/c/matrixOperations/hilb/Makefile.in create mode 100644 src/c/matrixOperations/hilb/dhilba.c create mode 100644 src/c/matrixOperations/hilb/shilba.c create mode 100644 src/c/matrixOperations/hilb/testHilbert.c create mode 100644 src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj create mode 100644 src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters create mode 100644 src/c/matrixOperations/includes/cat.h create mode 100644 src/c/matrixOperations/includes/chol.h create mode 100644 src/c/matrixOperations/includes/cumprod.h create mode 100644 src/c/matrixOperations/includes/cumsum.h create mode 100644 src/c/matrixOperations/includes/determ.h create mode 100644 src/c/matrixOperations/includes/diag.h create mode 100644 src/c/matrixOperations/includes/dist.h create mode 100644 src/c/matrixOperations/includes/dynlib_matrixoperations.h create mode 100644 src/c/matrixOperations/includes/eye.h create mode 100644 src/c/matrixOperations/includes/fill.h create mode 100644 src/c/matrixOperations/includes/flipdim.h create mode 100644 src/c/matrixOperations/includes/hilb.h create mode 100644 src/c/matrixOperations/includes/infiniteNorm.h create mode 100644 src/c/matrixOperations/includes/jmat.h create mode 100644 src/c/matrixOperations/includes/kron.h create mode 100644 src/c/matrixOperations/includes/logm.h create mode 100644 src/c/matrixOperations/includes/matrixDivision.h create mode 100644 src/c/matrixOperations/includes/matrixExponential.h create mode 100644 src/c/matrixOperations/includes/matrixInversion.h create mode 100644 src/c/matrixOperations/includes/matrixMagnitude.h create mode 100644 src/c/matrixOperations/includes/matrixMultiplication.h create mode 100644 src/c/matrixOperations/includes/matrixPow.h create mode 100644 src/c/matrixOperations/includes/matrixSquaredMagnitude.h create mode 100644 src/c/matrixOperations/includes/matrixTrace.h create mode 100644 src/c/matrixOperations/includes/matrixTranspose.h create mode 100644 src/c/matrixOperations/includes/norm.h create mode 100644 src/c/matrixOperations/includes/ones.h create mode 100644 src/c/matrixOperations/includes/spec.h create mode 100644 src/c/matrixOperations/includes/tril.h create mode 100644 src/c/matrixOperations/includes/triu.h create mode 100644 src/c/matrixOperations/includes/zeros.h create mode 100644 src/c/matrixOperations/infiniteNorm/Makefile.am create mode 100644 src/c/matrixOperations/infiniteNorm/Makefile.in create mode 100644 src/c/matrixOperations/infiniteNorm/cinfnorma.c create mode 100644 src/c/matrixOperations/infiniteNorm/dinfnorma.c create mode 100644 src/c/matrixOperations/infiniteNorm/sinfnorma.c create mode 100644 src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c create mode 100644 src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj create mode 100644 src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters create mode 100644 src/c/matrixOperations/infiniteNorm/zinfnorma.c create mode 100644 src/c/matrixOperations/interfaces/int_OpApex.h create mode 100644 src/c/matrixOperations/interfaces/int_OpBackSlash.h create mode 100644 src/c/matrixOperations/interfaces/int_OpCc.h create mode 100644 src/c/matrixOperations/interfaces/int_OpDotApex.h create mode 100644 src/c/matrixOperations/interfaces/int_OpRc.h create mode 100644 src/c/matrixOperations/interfaces/int_OpSlash.h create mode 100644 src/c/matrixOperations/interfaces/int_OpStar.h create mode 100644 src/c/matrixOperations/interfaces/int_cat.h create mode 100644 src/c/matrixOperations/interfaces/int_chol.h create mode 100644 src/c/matrixOperations/interfaces/int_cumprod.h create mode 100644 src/c/matrixOperations/interfaces/int_cumsum.h create mode 100644 src/c/matrixOperations/interfaces/int_det.h create mode 100644 src/c/matrixOperations/interfaces/int_diag.h create mode 100644 src/c/matrixOperations/interfaces/int_dist.h create mode 100644 src/c/matrixOperations/interfaces/int_expm.h create mode 100644 src/c/matrixOperations/interfaces/int_eye.h create mode 100644 src/c/matrixOperations/interfaces/int_fill.h create mode 100644 src/c/matrixOperations/interfaces/int_flipdim.h create mode 100644 src/c/matrixOperations/interfaces/int_invert.h create mode 100644 src/c/matrixOperations/interfaces/int_kron.h create mode 100644 src/c/matrixOperations/interfaces/int_norm.h create mode 100644 src/c/matrixOperations/interfaces/int_ones.h create mode 100644 src/c/matrixOperations/interfaces/int_permute.h create mode 100644 src/c/matrixOperations/interfaces/int_spec.h create mode 100644 src/c/matrixOperations/interfaces/int_trace.h create mode 100644 src/c/matrixOperations/interfaces/int_transpose.h create mode 100644 src/c/matrixOperations/interfaces/int_tril.h create mode 100644 src/c/matrixOperations/interfaces/int_triu.h create mode 100644 src/c/matrixOperations/interfaces/int_v2magn.h create mode 100644 src/c/matrixOperations/interfaces/int_vmagn.h create mode 100644 src/c/matrixOperations/interfaces/int_zeros.h create mode 100644 src/c/matrixOperations/interfaces/interface.sh create mode 100644 src/c/matrixOperations/inversion/Makefile.am create mode 100644 src/c/matrixOperations/inversion/Makefile.in create mode 100644 src/c/matrixOperations/inversion/cinverma.c create mode 100644 src/c/matrixOperations/inversion/dinverma.c create mode 100644 src/c/matrixOperations/inversion/i16inverma.c create mode 100644 src/c/matrixOperations/inversion/i8inverma.c create mode 100644 src/c/matrixOperations/inversion/sinverma.c create mode 100644 src/c/matrixOperations/inversion/testMatrixInversion.c create mode 100644 src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj create mode 100644 src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters create mode 100644 src/c/matrixOperations/inversion/u16inverma.c create mode 100644 src/c/matrixOperations/inversion/u8inverma.c create mode 100644 src/c/matrixOperations/inversion/zinverma.c create mode 100644 src/c/matrixOperations/jmat/Makefile.am create mode 100644 src/c/matrixOperations/jmat/Makefile.in create mode 100644 src/c/matrixOperations/jmat/djmata.c create mode 100644 src/c/matrixOperations/jmat/sjmata.c create mode 100644 src/c/matrixOperations/jmat/testJmat.c create mode 100644 src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj create mode 100644 src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters create mode 100644 src/c/matrixOperations/kron/dkrona.c create mode 100644 src/c/matrixOperations/kron/skrona.c create mode 100644 src/c/matrixOperations/logm/Makefile.am create mode 100644 src/c/matrixOperations/logm/Makefile.in create mode 100644 src/c/matrixOperations/logm/clogma.c create mode 100644 src/c/matrixOperations/logm/dlogma.c create mode 100644 src/c/matrixOperations/logm/slogma.c create mode 100644 src/c/matrixOperations/logm/testDoubleLogm.c create mode 100644 src/c/matrixOperations/logm/testFloatLogm.c create mode 100644 src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj create mode 100644 src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters create mode 100644 src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj create mode 100644 src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters create mode 100644 src/c/matrixOperations/logm/zlogma.c create mode 100644 src/c/matrixOperations/magnitude/Makefile.am create mode 100644 src/c/matrixOperations/magnitude/Makefile.in create mode 100644 src/c/matrixOperations/magnitude/cmagna.c create mode 100644 src/c/matrixOperations/magnitude/cmagns.c create mode 100644 src/c/matrixOperations/magnitude/dmagna.c create mode 100644 src/c/matrixOperations/magnitude/dmagns.c create mode 100644 src/c/matrixOperations/magnitude/i16magna.c create mode 100644 src/c/matrixOperations/magnitude/i16magns.c create mode 100644 src/c/matrixOperations/magnitude/i8magna.c create mode 100644 src/c/matrixOperations/magnitude/i8magns.c create mode 100644 src/c/matrixOperations/magnitude/smagna.c create mode 100644 src/c/matrixOperations/magnitude/smagns.c create mode 100644 src/c/matrixOperations/magnitude/testDoubleMagnitude.c create mode 100644 src/c/matrixOperations/magnitude/testFloatMagnitude.c create mode 100644 src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj create mode 100644 src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters create mode 100644 src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj create mode 100644 src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters create mode 100644 src/c/matrixOperations/magnitude/u16magna.c create mode 100644 src/c/matrixOperations/magnitude/u16magns.c create mode 100644 src/c/matrixOperations/magnitude/u8magna.c create mode 100644 src/c/matrixOperations/magnitude/u8magns.c create mode 100644 src/c/matrixOperations/magnitude/zmagna.c create mode 100644 src/c/matrixOperations/magnitude/zmagns.c create mode 100644 src/c/matrixOperations/matrixOperations.vcxproj create mode 100644 src/c/matrixOperations/matrixOperations.vcxproj.filters create mode 100644 src/c/matrixOperations/multiplication/Makefile.am create mode 100644 src/c/matrixOperations/multiplication/Makefile.in create mode 100644 src/c/matrixOperations/multiplication/cmulma.c create mode 100644 src/c/matrixOperations/multiplication/dmulma.c create mode 100644 src/c/matrixOperations/multiplication/i16mulma.c create mode 100644 src/c/matrixOperations/multiplication/i8mulma.c create mode 100644 src/c/matrixOperations/multiplication/smulma.c create mode 100644 src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c create mode 100644 src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c create mode 100644 src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj create mode 100644 src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters create mode 100644 src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj create mode 100644 src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters create mode 100644 src/c/matrixOperations/multiplication/u16mulma.c create mode 100644 src/c/matrixOperations/multiplication/u8mulma.c create mode 100644 src/c/matrixOperations/multiplication/zmulma.c create mode 100644 src/c/matrixOperations/norm/dnorma.c create mode 100644 src/c/matrixOperations/norm/dnormv.c create mode 100644 src/c/matrixOperations/norm/snorma.c create mode 100644 src/c/matrixOperations/norm/snormv.c create mode 100644 src/c/matrixOperations/ones/Makefile.am create mode 100644 src/c/matrixOperations/ones/Makefile.in create mode 100644 src/c/matrixOperations/ones/conesa.c create mode 100644 src/c/matrixOperations/ones/donesa.c create mode 100644 src/c/matrixOperations/ones/i16onesa.c create mode 100644 src/c/matrixOperations/ones/i8onesa.c create mode 100644 src/c/matrixOperations/ones/sonesa.c create mode 100644 src/c/matrixOperations/ones/testMatrixOnes.c create mode 100644 src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj create mode 100644 src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters create mode 100644 src/c/matrixOperations/ones/u16onesa.c create mode 100644 src/c/matrixOperations/ones/u8onesa.c create mode 100644 src/c/matrixOperations/ones/zonesa.c create mode 100644 src/c/matrixOperations/powm/Makefile.am create mode 100644 src/c/matrixOperations/powm/Makefile.in create mode 100644 src/c/matrixOperations/powm/cpowma.c create mode 100644 src/c/matrixOperations/powm/dpowma.c create mode 100644 src/c/matrixOperations/powm/spowma.c create mode 100644 src/c/matrixOperations/powm/testDoublePowm.c create mode 100644 src/c/matrixOperations/powm/testFloatPowm.c create mode 100644 src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj create mode 100644 src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters create mode 100644 src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj create mode 100644 src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters create mode 100644 src/c/matrixOperations/powm/zpowma.c create mode 100644 src/c/matrixOperations/spec/Makefile.am create mode 100644 src/c/matrixOperations/spec/Makefile.in create mode 100644 src/c/matrixOperations/spec/cspeca.c create mode 100644 src/c/matrixOperations/spec/dspeca.c create mode 100644 src/c/matrixOperations/spec/sspeca.c create mode 100644 src/c/matrixOperations/spec/testDoubleSpec.c create mode 100644 src/c/matrixOperations/spec/testFloatSpec.c create mode 100644 src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj create mode 100644 src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters create mode 100644 src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj create mode 100644 src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters create mode 100644 src/c/matrixOperations/spec/zspeca.c create mode 100644 src/c/matrixOperations/spec2/Makefile.am create mode 100644 src/c/matrixOperations/spec2/Makefile.in create mode 100644 src/c/matrixOperations/spec2/cspec2a.c create mode 100644 src/c/matrixOperations/spec2/dspec2a.c create mode 100644 src/c/matrixOperations/spec2/sspec2a.c create mode 100644 src/c/matrixOperations/spec2/testDoubleSpec2.c create mode 100644 src/c/matrixOperations/spec2/testFloatSpec2.c create mode 100644 src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj create mode 100644 src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters create mode 100644 src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj create mode 100644 src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters create mode 100644 src/c/matrixOperations/spec2/zspec2a.c create mode 100644 src/c/matrixOperations/squaredMagnitude/Makefile.am create mode 100644 src/c/matrixOperations/squaredMagnitude/Makefile.in create mode 100644 src/c/matrixOperations/squaredMagnitude/csquMagna.c create mode 100644 src/c/matrixOperations/squaredMagnitude/csquMagns.c create mode 100644 src/c/matrixOperations/squaredMagnitude/dsquMagna.c create mode 100644 src/c/matrixOperations/squaredMagnitude/dsquMagns.c create mode 100644 src/c/matrixOperations/squaredMagnitude/ssquMagna.c create mode 100644 src/c/matrixOperations/squaredMagnitude/ssquMagns.c create mode 100644 src/c/matrixOperations/squaredMagnitude/testDoubleSquaredMagnitude.c create mode 100644 src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c create mode 100644 src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj create mode 100644 src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters create mode 100644 src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj create mode 100644 src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters create mode 100644 src/c/matrixOperations/squaredMagnitude/zsquMagna.c create mode 100644 src/c/matrixOperations/squaredMagnitude/zsquMagns.c create mode 100644 src/c/matrixOperations/trace/Makefile.am create mode 100644 src/c/matrixOperations/trace/Makefile.in create mode 100644 src/c/matrixOperations/trace/ctracea.c create mode 100644 src/c/matrixOperations/trace/dtracea.c create mode 100644 src/c/matrixOperations/trace/i16tracea.c create mode 100644 src/c/matrixOperations/trace/i8tracea.c create mode 100644 src/c/matrixOperations/trace/stracea.c create mode 100644 src/c/matrixOperations/trace/testMatrixTrace.c create mode 100644 src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj create mode 100644 src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters create mode 100644 src/c/matrixOperations/trace/u16tracea.c create mode 100644 src/c/matrixOperations/trace/u8tracea.c create mode 100644 src/c/matrixOperations/trace/ztracea.c create mode 100644 src/c/matrixOperations/transpose/Makefile.am create mode 100644 src/c/matrixOperations/transpose/Makefile.in create mode 100644 src/c/matrixOperations/transpose/ctransposea.c create mode 100644 src/c/matrixOperations/transpose/dtransposea.c create mode 100644 src/c/matrixOperations/transpose/i16transposea.c create mode 100644 src/c/matrixOperations/transpose/i8transposea.c create mode 100644 src/c/matrixOperations/transpose/stransposea.c create mode 100644 src/c/matrixOperations/transpose/testMatrixTranspose.c create mode 100644 src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj create mode 100644 src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters create mode 100644 src/c/matrixOperations/transpose/u16transposea.c create mode 100644 src/c/matrixOperations/transpose/u8transposea.c create mode 100644 src/c/matrixOperations/transpose/ztransposea.c create mode 100644 src/c/matrixOperations/tril/dtrila.c create mode 100644 src/c/matrixOperations/tril/i16trila.c create mode 100644 src/c/matrixOperations/tril/i8trila.c create mode 100644 src/c/matrixOperations/tril/strila.c create mode 100644 src/c/matrixOperations/tril/u16trila.c create mode 100644 src/c/matrixOperations/tril/u8trila.c create mode 100644 src/c/matrixOperations/triu/dtriua.c create mode 100644 src/c/matrixOperations/triu/i16triua.c create mode 100644 src/c/matrixOperations/triu/i8triua.c create mode 100644 src/c/matrixOperations/triu/striua.c create mode 100644 src/c/matrixOperations/triu/u16triua.c create mode 100644 src/c/matrixOperations/triu/u8triua.c create mode 100644 src/c/matrixOperations/zeros/Makefile.am create mode 100644 src/c/matrixOperations/zeros/Makefile.in create mode 100644 src/c/matrixOperations/zeros/czerosa.c create mode 100644 src/c/matrixOperations/zeros/dzerosa.c create mode 100644 src/c/matrixOperations/zeros/dzerosh.c create mode 100644 src/c/matrixOperations/zeros/i16zerosa.c create mode 100644 src/c/matrixOperations/zeros/i8zerosa.c create mode 100644 src/c/matrixOperations/zeros/szerosa.c create mode 100644 src/c/matrixOperations/zeros/testMatrixZeros.c create mode 100644 src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj create mode 100644 src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters create mode 100644 src/c/matrixOperations/zeros/u16zerosa.c create mode 100644 src/c/matrixOperations/zeros/u8zerosa.c create mode 100644 src/c/matrixOperations/zeros/zzerosa.c (limited to 'src/c/matrixOperations') diff --git a/src/c/matrixOperations/Makefile.am b/src/c/matrixOperations/Makefile.am new file mode 100644 index 0000000..a6ecb2c --- /dev/null +++ b/src/c/matrixOperations/Makefile.am @@ -0,0 +1,38 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +SUBDIRS= cat \ + division \ + expm \ + eye \ + hilb \ + infiniteNorm \ + multiplication \ + trace \ + transpose \ + ones \ + jmat \ + inversion\ + chol \ + determ \ + dist \ + fill \ + magnitude \ + squaredMagnitude\ + logm \ + powm \ + zeros \ + spec \ + spec2 + + + diff --git a/src/c/matrixOperations/Makefile.in b/src/c/matrixOperations/Makefile.in new file mode 100644 index 0000000..c120e1c --- /dev/null +++ b/src/c/matrixOperations/Makefile.in @@ -0,0 +1,583 @@ +# 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@ +subdir = src/c/matrixOperations +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 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +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@ +SUBDIRS = cat \ + division \ + expm \ + eye \ + hilb \ + infiniteNorm \ + multiplication \ + trace \ + transpose \ + ones \ + jmat \ + inversion\ + chol \ + determ \ + dist \ + fill \ + magnitude \ + squaredMagnitude\ + logm \ + powm \ + zeros \ + spec \ + spec2 + +all: all-recursive + +.SUFFIXES: +$(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/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/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): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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: ctags-recursive $(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 + +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 + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +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-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean 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-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# 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/cat/Makefile.am b/src/c/matrixOperations/cat/Makefile.am new file mode 100644 index 0000000..fd315dd --- /dev/null +++ b/src/c/matrixOperations/cat/Makefile.am @@ -0,0 +1,52 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixConcatenation_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixConcatenation.la + +HEAD = ../includes/cat.h + +libMatrixConcatenation_la_SOURCES = $(HEAD) \ + scats.c \ + scata.c \ + dcats.c \ + dcata.c \ + ccats.c \ + ccata.c \ + zcats.c \ + zcata.c + +check_PROGRAMS = testFloatMatrixConcatenation \ + testDoubleMatrixConcatenation + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixConcatenation.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixConcatenation_SOURCES = testDoubleMatrixConcatenation.c +testDoubleMatrixConcatenation_LDADD = $(check_LDADD) +testDoubleMatrixConcatenation_CFLAGS = $(check_INCLUDES) + +testFloatMatrixConcatenation_SOURCES = testFloatMatrixConcatenation.c +testFloatMatrixConcatenation_LDADD = $(check_LDADD) +testFloatMatrixConcatenation_CFLAGS = $(check_INCLUDES) + +TESTS = testFloatMatrixConcatenation \ + testDoubleMatrixConcatenation \ No newline at end of file diff --git a/src/c/matrixOperations/cat/Makefile.in b/src/c/matrixOperations/cat/Makefile.in new file mode 100644 index 0000000..3e7a855 --- /dev/null +++ b/src/c/matrixOperations/cat/Makefile.in @@ -0,0 +1,792 @@ +# 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 = testFloatMatrixConcatenation$(EXEEXT) \ + testDoubleMatrixConcatenation$(EXEEXT) +TESTS = testFloatMatrixConcatenation$(EXEEXT) \ + testDoubleMatrixConcatenation$(EXEEXT) +subdir = src/c/matrixOperations/cat +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) +libMatrixConcatenation_la_LIBADD = +am__objects_1 = +am_libMatrixConcatenation_la_OBJECTS = $(am__objects_1) \ + libMatrixConcatenation_la-scats.lo \ + libMatrixConcatenation_la-scata.lo \ + libMatrixConcatenation_la-dcats.lo \ + libMatrixConcatenation_la-dcata.lo \ + libMatrixConcatenation_la-ccats.lo \ + libMatrixConcatenation_la-ccata.lo \ + libMatrixConcatenation_la-zcats.lo \ + libMatrixConcatenation_la-zcata.lo +libMatrixConcatenation_la_OBJECTS = \ + $(am_libMatrixConcatenation_la_OBJECTS) +libMatrixConcatenation_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testDoubleMatrixConcatenation_OBJECTS = testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.$(OBJEXT) +testDoubleMatrixConcatenation_OBJECTS = \ + $(am_testDoubleMatrixConcatenation_OBJECTS) +testDoubleMatrixConcatenation_DEPENDENCIES = $(check_LDADD) +testDoubleMatrixConcatenation_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMatrixConcatenation_OBJECTS = testFloatMatrixConcatenation-testFloatMatrixConcatenation.$(OBJEXT) +testFloatMatrixConcatenation_OBJECTS = \ + $(am_testFloatMatrixConcatenation_OBJECTS) +testFloatMatrixConcatenation_DEPENDENCIES = $(check_LDADD) +testFloatMatrixConcatenation_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatMatrixConcatenation_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 = $(libMatrixConcatenation_la_SOURCES) \ + $(testDoubleMatrixConcatenation_SOURCES) \ + $(testFloatMatrixConcatenation_SOURCES) +DIST_SOURCES = $(libMatrixConcatenation_la_SOURCES) \ + $(testDoubleMatrixConcatenation_SOURCES) \ + $(testFloatMatrixConcatenation_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@ +libMatrixConcatenation_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixConcatenation.la +HEAD = ../includes/cat.h +libMatrixConcatenation_la_SOURCES = $(HEAD) \ + scats.c \ + scata.c \ + dcats.c \ + dcata.c \ + ccats.c \ + ccata.c \ + zcats.c \ + zcata.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixConcatenation.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixConcatenation_SOURCES = testDoubleMatrixConcatenation.c +testDoubleMatrixConcatenation_LDADD = $(check_LDADD) +testDoubleMatrixConcatenation_CFLAGS = $(check_INCLUDES) +testFloatMatrixConcatenation_SOURCES = testFloatMatrixConcatenation.c +testFloatMatrixConcatenation_LDADD = $(check_LDADD) +testFloatMatrixConcatenation_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/cat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/cat/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 +libMatrixConcatenation.la: $(libMatrixConcatenation_la_OBJECTS) $(libMatrixConcatenation_la_DEPENDENCIES) + $(libMatrixConcatenation_la_LINK) -rpath $(pkglibdir) $(libMatrixConcatenation_la_OBJECTS) $(libMatrixConcatenation_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 +testDoubleMatrixConcatenation$(EXEEXT): $(testDoubleMatrixConcatenation_OBJECTS) $(testDoubleMatrixConcatenation_DEPENDENCIES) + @rm -f testDoubleMatrixConcatenation$(EXEEXT) + $(testDoubleMatrixConcatenation_LINK) $(testDoubleMatrixConcatenation_OBJECTS) $(testDoubleMatrixConcatenation_LDADD) $(LIBS) +testFloatMatrixConcatenation$(EXEEXT): $(testFloatMatrixConcatenation_OBJECTS) $(testFloatMatrixConcatenation_DEPENDENCIES) + @rm -f testFloatMatrixConcatenation$(EXEEXT) + $(testFloatMatrixConcatenation_LINK) $(testFloatMatrixConcatenation_OBJECTS) $(testFloatMatrixConcatenation_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-ccata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-ccats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-dcata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-dcats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-scata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-scats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-zcata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-zcats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.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 $@ $< + +libMatrixConcatenation_la-scats.lo: scats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-scats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-scats.Tpo -c -o libMatrixConcatenation_la-scats.lo `test -f 'scats.c' || echo '$(srcdir)/'`scats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-scats.Tpo $(DEPDIR)/libMatrixConcatenation_la-scats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scats.c' object='libMatrixConcatenation_la-scats.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-scats.lo `test -f 'scats.c' || echo '$(srcdir)/'`scats.c + +libMatrixConcatenation_la-scata.lo: scata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-scata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-scata.Tpo -c -o libMatrixConcatenation_la-scata.lo `test -f 'scata.c' || echo '$(srcdir)/'`scata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-scata.Tpo $(DEPDIR)/libMatrixConcatenation_la-scata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scata.c' object='libMatrixConcatenation_la-scata.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-scata.lo `test -f 'scata.c' || echo '$(srcdir)/'`scata.c + +libMatrixConcatenation_la-dcats.lo: dcats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-dcats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-dcats.Tpo -c -o libMatrixConcatenation_la-dcats.lo `test -f 'dcats.c' || echo '$(srcdir)/'`dcats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-dcats.Tpo $(DEPDIR)/libMatrixConcatenation_la-dcats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcats.c' object='libMatrixConcatenation_la-dcats.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-dcats.lo `test -f 'dcats.c' || echo '$(srcdir)/'`dcats.c + +libMatrixConcatenation_la-dcata.lo: dcata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-dcata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-dcata.Tpo -c -o libMatrixConcatenation_la-dcata.lo `test -f 'dcata.c' || echo '$(srcdir)/'`dcata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-dcata.Tpo $(DEPDIR)/libMatrixConcatenation_la-dcata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcata.c' object='libMatrixConcatenation_la-dcata.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-dcata.lo `test -f 'dcata.c' || echo '$(srcdir)/'`dcata.c + +libMatrixConcatenation_la-ccats.lo: ccats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-ccats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-ccats.Tpo -c -o libMatrixConcatenation_la-ccats.lo `test -f 'ccats.c' || echo '$(srcdir)/'`ccats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-ccats.Tpo $(DEPDIR)/libMatrixConcatenation_la-ccats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccats.c' object='libMatrixConcatenation_la-ccats.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-ccats.lo `test -f 'ccats.c' || echo '$(srcdir)/'`ccats.c + +libMatrixConcatenation_la-ccata.lo: ccata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-ccata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-ccata.Tpo -c -o libMatrixConcatenation_la-ccata.lo `test -f 'ccata.c' || echo '$(srcdir)/'`ccata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-ccata.Tpo $(DEPDIR)/libMatrixConcatenation_la-ccata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccata.c' object='libMatrixConcatenation_la-ccata.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-ccata.lo `test -f 'ccata.c' || echo '$(srcdir)/'`ccata.c + +libMatrixConcatenation_la-zcats.lo: zcats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-zcats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-zcats.Tpo -c -o libMatrixConcatenation_la-zcats.lo `test -f 'zcats.c' || echo '$(srcdir)/'`zcats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-zcats.Tpo $(DEPDIR)/libMatrixConcatenation_la-zcats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcats.c' object='libMatrixConcatenation_la-zcats.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-zcats.lo `test -f 'zcats.c' || echo '$(srcdir)/'`zcats.c + +libMatrixConcatenation_la-zcata.lo: zcata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-zcata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-zcata.Tpo -c -o libMatrixConcatenation_la-zcata.lo `test -f 'zcata.c' || echo '$(srcdir)/'`zcata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-zcata.Tpo $(DEPDIR)/libMatrixConcatenation_la-zcata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcata.c' object='libMatrixConcatenation_la-zcata.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) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-zcata.lo `test -f 'zcata.c' || echo '$(srcdir)/'`zcata.c + +testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o: testDoubleMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o -MD -MP -MF $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o `test -f 'testDoubleMatrixConcatenation.c' || echo '$(srcdir)/'`testDoubleMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixConcatenation.c' object='testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.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) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o `test -f 'testDoubleMatrixConcatenation.c' || echo '$(srcdir)/'`testDoubleMatrixConcatenation.c + +testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj: testDoubleMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj -MD -MP -MF $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj `if test -f 'testDoubleMatrixConcatenation.c'; then $(CYGPATH_W) 'testDoubleMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixConcatenation.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixConcatenation.c' object='testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.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) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj `if test -f 'testDoubleMatrixConcatenation.c'; then $(CYGPATH_W) 'testDoubleMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixConcatenation.c'; fi` + +testFloatMatrixConcatenation-testFloatMatrixConcatenation.o: testFloatMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testFloatMatrixConcatenation-testFloatMatrixConcatenation.o -MD -MP -MF $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.o `test -f 'testFloatMatrixConcatenation.c' || echo '$(srcdir)/'`testFloatMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixConcatenation.c' object='testFloatMatrixConcatenation-testFloatMatrixConcatenation.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) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.o `test -f 'testFloatMatrixConcatenation.c' || echo '$(srcdir)/'`testFloatMatrixConcatenation.c + +testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj: testFloatMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj -MD -MP -MF $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj `if test -f 'testFloatMatrixConcatenation.c'; then $(CYGPATH_W) 'testFloatMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixConcatenation.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixConcatenation.c' object='testFloatMatrixConcatenation-testFloatMatrixConcatenation.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) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj `if test -f 'testFloatMatrixConcatenation.c'; then $(CYGPATH_W) 'testFloatMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixConcatenation.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/cat/ccata.c b/src/c/matrixOperations/cat/ccata.c new file mode 100644 index 0000000..a6ac6cf --- /dev/null +++ b/src/c/matrixOperations/cat/ccata.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 61 ;7 8 9; 10 11 12] +** +*/ + +void crowcata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out) { + int i = 0; + int j = 0; + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + /*out[i*(lines1 + lines2) + j] = in1[i*lines1 + j];*/ + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void ccolumncata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/src/c/matrixOperations/cat/ccats.c b/src/c/matrixOperations/cat/ccats.c new file mode 100644 index 0000000..c4fab76 --- /dev/null +++ b/src/c/matrixOperations/cat/ccats.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void crowcats(floatComplex in1, floatComplex in2, floatComplex *out) { + out[0] = in1; + out[1] = in2; +} + +void ccolumncats(floatComplex in1, floatComplex in2, floatComplex *out) { + out[0] = in1; + out[1] = in2; +} diff --git a/src/c/matrixOperations/cat/dcata.c b/src/c/matrixOperations/cat/dcata.c new file mode 100644 index 0000000..0ec7c08 --- /dev/null +++ b/src/c/matrixOperations/cat/dcata.c @@ -0,0 +1,55 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 6 ;7 8 9; 10 11 12] +** +*/ + +void drowcata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out) { + int i = 0; + int j = 0; + + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void dcolumncata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/src/c/matrixOperations/cat/dcats.c b/src/c/matrixOperations/cat/dcats.c new file mode 100644 index 0000000..aea63ec --- /dev/null +++ b/src/c/matrixOperations/cat/dcats.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void drowcats(double in1, double in2, double *out) { + out[0] = in1; + out[1] = in2; +} + +void dcolumncats(double in1, double in2, double *out) { + out[0] = in1; + out[1] = in2; +} diff --git a/src/c/matrixOperations/cat/i16cata.c b/src/c/matrixOperations/cat/i16cata.c new file mode 100644 index 0000000..d7187b4 --- /dev/null +++ b/src/c/matrixOperations/cat/i16cata.c @@ -0,0 +1,63 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" +/* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(1,A1,A2); +output => y = [1 2 3; 4 5 6;7 8 9;10 11 12] +*/ + +void i16rowcata(int16 *in1,int lines1,int columns1,int16 *in2,int lines2,int columns2,int16* out) +{ + int i = 0; + int j = 0; + for(i = 0;i < columns1 && i < columns2; ++i) + { + for(j = 0;j < lines1; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for(j = 0;j < lines2; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + + } +} + + /* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(2,A1,A2); +output => y = [1 2 3 7 8 9; 4 5 6 10 11 12] +*/ + +void i16columncata(int16 *in1,int lines1,int columns1,int16 *in2,int lines2,int columns2,int16* out) + { + int i = 0; + for(i = 0; i < lines1 * columns1;++i) + { + out[i] = in1[i]; + + } + for(i = 0;i < lines2 * columns2;++i) + { + + out[i + lines1 * columns2] = in2[i]; + + } + + } + + + diff --git a/src/c/matrixOperations/cat/i16cats.c b/src/c/matrixOperations/cat/i16cats.c new file mode 100644 index 0000000..11b24ac --- /dev/null +++ b/src/c/matrixOperations/cat/i16cats.c @@ -0,0 +1,26 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" + +void i16rowcats(int16 in1,int16 in2,int16 *out) +{ + out[0] = in1; + out[1] = in2; + +} + +void i16columncats(int16 in1,int16 in2,int16 *out) +{ + out[0] = in1; + out[1] = in2; + +} diff --git a/src/c/matrixOperations/cat/i8cata.c b/src/c/matrixOperations/cat/i8cata.c new file mode 100644 index 0000000..47fbfa4 --- /dev/null +++ b/src/c/matrixOperations/cat/i8cata.c @@ -0,0 +1,60 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" +/* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(1,A1,A2); +output => y = [1 2 3; 4 5 6;7 8 9;10 11 12] +*/ + +void i8rowcata(int8 *in1,int lines1,int columns1,int8 *in2,int lines2,int columns2,int8* out) +{ + int i = 0; + int j = 0; + for(i = 0;i < columns1 && i < columns2; ++i) + { + for(j = 0;j < lines1; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for(j = 0;j < lines2; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + + } +} + /* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(2,A1,A2); +output => y = [1 2 3 7 8 9; 4 5 6 10 11 12] +*/ + +void i8columncata(int8 *in1,int lines1,int columns1,int8 *in2,int lines2,int columns2,int8* out) + { + int i = 0; + for(i = 0; i < lines1 * columns1;++i) + { + out[i] = in1[i]; + + } + for(i = 0;i < lines2 * columns2;++i) + { + + out[i + lines1 * columns2] = in2[i]; + + } + + } + diff --git a/src/c/matrixOperations/cat/i8cats.c b/src/c/matrixOperations/cat/i8cats.c new file mode 100644 index 0000000..51dadd1 --- /dev/null +++ b/src/c/matrixOperations/cat/i8cats.c @@ -0,0 +1,26 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" + +void i8rowcats(int8 in1,int8 in2,int8 *out) +{ + out[0] = in1; + out[1] = in2; + +} + +void i8columncats(int8 in1,uint8 in2,int8 *out) +{ + out[0] = in1; + out[1] = in2; + +} diff --git a/src/c/matrixOperations/cat/scata.c b/src/c/matrixOperations/cat/scata.c new file mode 100644 index 0000000..da0853c --- /dev/null +++ b/src/c/matrixOperations/cat/scata.c @@ -0,0 +1,55 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +#include "stdio.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 6 ;7 8 9; 10 11 12] +** +*/ + +void srowcata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out) { + int i = 0; + int j = 0; + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void scolumncata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/src/c/matrixOperations/cat/scats.c b/src/c/matrixOperations/cat/scats.c new file mode 100644 index 0000000..1f82f9a --- /dev/null +++ b/src/c/matrixOperations/cat/scats.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void srowcats(float in1, float in2, float *out) { + out[0] = in1; + out[1] = in2; +} + +void scolumncats(float in1, float in2, float *out) { + out[0] = in1; + out[1] = in2; +} diff --git a/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c b/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c new file mode 100644 index 0000000..29ab3c6 --- /dev/null +++ b/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c @@ -0,0 +1,342 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "constant.h" +#include "cat.h" + +static void drowcatsTest(void) { + int i = 0; + double output[2] = {0}; + + /* + ** [ 42 51 ] + */ + drowcats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + drowcats(DPI, DPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == DPI); + assert(output[1] == DPI / 2); +} + +static void dcolumncatsTest(void) { + int i = 0; + double output[2] = {0}; + + /* + ** [ 42 51 ] + */ + dcolumncats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + dcolumncats(DPI, DPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == DPI); + assert(output[1] == DPI / 2); +} + +static void dcolumncataTest(void) { + int i = 0; + double in1[12] = {0.0, 1.0, 2.0 , 3.0 , 4.0, 5.0 , 6.0 , 7.0 , 8.0 , 9.0, 10.0 , 11.0}; + double in2_1_1[1] = {12.0}; + double out_1_13[13] = {0}; + + double in2_2_2[4] = {DPI, DPI / 2, DPI / 3, DPI / 4}; + double out_2_8[16] = {0}; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + dcolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e\n", i, out_1_13[i]); + assert(out_1_13[i] == (double) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + dcolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e\n", i, out_2_8[i]); + } + for (i = 0 ; i < 12 ; ++i) { + assert(out_2_8[i] == in1[i]); + } + for (i = 0 ; i < 4 ; ++i) { + assert(out_2_8[i + 12] == in2_2_2[i]); + } + +} + +static void drowcataTest() { + int i = 0; + double in1[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + double in2[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + double out_4_3[12] = {0}; + double out_6_2[12] = {0}; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + drowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e\n", i, out_4_3[i]); + assert(out_4_3[i] == (double) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + drowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e\n", i, out_6_2[i]); + } + assert(out_6_2[0] == 1.0); + assert(out_6_2[1] == 2.0); + assert(out_6_2[2] == 5.0); + assert(out_6_2[3] == 3.0); + assert(out_6_2[4] == 4.0); + assert(out_6_2[5] == 7.0); + assert(out_6_2[6] == 6.0); + assert(out_6_2[7] == 9.0); + assert(out_6_2[8] == 10.0); + assert(out_6_2[9] == 8.0); + assert(out_6_2[10] == 11.0); + assert(out_6_2[11] == 12.0); + + drowcata(in1, 1, 6, in2, 1, 6, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e\n", i, out_6_2[i]); + } + assert(out_6_2[0] == 1.0); + assert(out_6_2[1] == 3.0); + assert(out_6_2[2] == 2.0); + assert(out_6_2[3] == 4.0); + assert(out_6_2[4] == 5.0); + assert(out_6_2[5] == 7.0); + assert(out_6_2[6] == 6.0); + assert(out_6_2[7] == 8.0); + assert(out_6_2[8] == 9.0); + assert(out_6_2[9] == 11.0); + assert(out_6_2[10] == 10.0); + assert(out_6_2[11] == 12.0); + +} + +static void zrowcatsTest(void) { + int i = 0; + doubleComplex output[2]; + + /* + ** [ 42+25i 51+38i ] + */ + zrowcats(DoubleComplex(42.0, 25.0), + DoubleComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == 42.0); + assert(zimags(output[0]) == 25.0); + assert(zreals(output[1]) == 51.0); + assert(zimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + zrowcats(DoubleComplex(DPI, DPI/2), + DoubleComplex(DPI/2, DPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == DPI); + assert(zimags(output[0]) == DPI / 2); + assert(zreals(output[1]) == DPI / 2); + assert(zimags(output[1]) == DPI); +} + +static void zcolumncatsTest(void) { + int i = 0; + doubleComplex output[2]; + /* + ** [ 42+25i 51+38i ] + */ + zcolumncats(DoubleComplex(42.0, 25.0), + DoubleComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == 42.0); + assert(zimags(output[0]) == 25.0); + assert(zreals(output[1]) == 51.0); + assert(zimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + zcolumncats(DoubleComplex(DPI, DPI/2), + DoubleComplex(DPI/2, DPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == DPI); + assert(zimags(output[0]) == DPI / 2); + assert(zreals(output[1]) == DPI / 2); + assert(zimags(output[1]) == DPI); + +} + +static void zcolumncataTest(void) { + int i = 0; + double in1_real[12] = {0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0}; + double in1_imag[12] = {11.0 , 10.0 , 9.0 , 8.0 , 7.0 , 6.0 , 5.0 , 4.0 , 3.0 , 2.0 , 1.0 , 0.0}; + doubleComplex *in1 = DoubleComplexMatrix(in1_real, in1_imag, 12); + double in2_real[1] = {12.0}; + double in2_imag[1] = {-1.0}; + doubleComplex *in2_1_1 = DoubleComplexMatrix(in2_real, in2_imag, 1); + doubleComplex out_1_13[13]; + + double in2_2_2_real[4] = {DPI, DPI / 2, DPI / 3, DPI / 4}; + double in2_2_2_imag[4] = {DPI / 4, DPI / 3, DPI / 2, DPI}; + doubleComplex *in2_2_2 = DoubleComplexMatrix(in2_2_2_real, in2_2_2_imag, 4); + doubleComplex out_2_8[16]; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + zcolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e + %e i\n", i, zreals(out_1_13[i]), zimags(out_1_13[i])); + assert(zreals(out_1_13[i]) == (double) i); + assert(zimags(out_1_13[i]) == 11.0 - (double) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + zcolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e + %e i\n", i, zreals(out_2_8[i]), zimags(out_2_8[i])); + } + for (i = 0 ; i < 12 ; ++i) { + assert(zreals(out_2_8[i]) == zreals(in1[i])); + assert(zimags(out_2_8[i]) == zimags(in1[i])); + } + for (i = 0 ; i < 4 ; ++i) { + assert(zreals(out_2_8[i + 12]) == zreals(in2_2_2[i])); + assert(zimags(out_2_8[i + 12]) == zimags(in2_2_2[i])); + } + +} + +static void zrowcataTest() { + int i = 0; + double in1_real[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + double in1_imag[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + doubleComplex *in1 = DoubleComplexMatrix(in1_real, in1_imag, 6); + double in2_real[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + double in2_imag[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + doubleComplex *in2 = DoubleComplexMatrix(in2_real, in2_imag, 6); + doubleComplex out_4_3[12]; + doubleComplex out_6_2[12]; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + zrowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e + %e i\n", i, zreals(out_4_3[i]), zimags(out_4_3[i])); + assert(zreals(out_4_3[i]) == (double) i + 1.0); + assert(zimags(out_4_3[i]) == (double) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + zrowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e + %e i\n", i, zreals(out_6_2[i]), zimags(out_6_2[i])); + } + assert(zreals(out_6_2[0]) == 1.0); + assert(zimags(out_6_2[0]) == 1.0); + assert(zreals(out_6_2[1]) == 2.0); + assert(zimags(out_6_2[1]) == 2.0); + assert(zreals(out_6_2[2]) == 5.0); + assert(zimags(out_6_2[2]) == 5.0); + assert(zreals(out_6_2[3]) == 3.0); + assert(zimags(out_6_2[3]) == 3.0); + assert(zreals(out_6_2[4]) == 4.0); + assert(zimags(out_6_2[4]) == 4.0); + assert(zreals(out_6_2[5]) == 7.0); + assert(zimags(out_6_2[5]) == 7.0); + assert(zreals(out_6_2[6]) == 6.0); + assert(zimags(out_6_2[6]) == 6.0); + assert(zreals(out_6_2[7]) == 9.0); + assert(zimags(out_6_2[7]) == 9.0); + assert(zreals(out_6_2[8]) == 10.0); + assert(zimags(out_6_2[8]) == 10.0); + assert(zreals(out_6_2[9]) == 8.0); + assert(zimags(out_6_2[9]) == 8.0); + assert(zreals(out_6_2[10]) == 11.0); + assert(zimags(out_6_2[10]) == 11.0); + assert(zreals(out_6_2[11]) == 12.0); + assert(zimags(out_6_2[11]) == 12.0); +} + +int main(void) { + drowcatsTest(); + dcolumncatsTest(); + drowcataTest(); + dcolumncataTest(); + zrowcatsTest(); + zcolumncatsTest(); + zrowcataTest(); + zcolumncataTest(); + return 0; +} diff --git a/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c b/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c new file mode 100644 index 0000000..b34a80f --- /dev/null +++ b/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c @@ -0,0 +1,341 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "constant.h" +#include "cat.h" + +static void srowcatsTest(void) { + int i = 0; + float output[2] = {0}; + + /* + ** [ 42 51 ] + */ + srowcats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + srowcats(FPI, FPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == FPI); + assert(output[1] == FPI / 2); +} + +static void scolumncatsTest(void) { + int i = 0; + float output[2] = {0}; + + /* + ** [ 42 51 ] + */ + scolumncats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + scolumncats(FPI, FPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == FPI); + assert(output[1] == FPI / 2); +} + +static void scolumncataTest(void) { + int i = 0; + float in1[12] = {0.0, 1.0, 2.0 , 3.0 , 4.0, 5.0 , 6.0 , 7.0 , 8.0 , 9.0, 10.0 , 11.0}; + float in2_1_1[1] = {12.0}; + float out_1_13[13] = {0}; + float in2_2_2[4] = {FPI, FPI / 2, FPI / 3, FPI / 4}; + float out_2_8[16] = {0}; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + scolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e\n", i, out_1_13[i]); + assert(out_1_13[i] == (float) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + scolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e\n", i, out_2_8[i]); + } + for (i = 0 ; i < 12 ; ++i) { + assert(out_2_8[i] == in1[i]); + } + for (i = 0 ; i < 4 ; ++i) { + assert(out_2_8[i + 12] == in2_2_2[i]); + } + + + +} + +static void srowcataTest() { + int i = 0; + float in1[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + float in2[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + float out_4_3[12] = {0}; + float out_6_2[12] = {0}; + + float inNono1[6]={1.0,3.0,5.0,2.0,4.0,6.0}; + float inNono2[2]={1.0,2.0}; + float outNono[8]={0}; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + srowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e\n", i, out_4_3[i]); + assert(out_4_3[i] == (float) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + srowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e\n", i, out_6_2[i]); + } + assert(out_6_2[0] == 1.0); + assert(out_6_2[1] == 2.0); + assert(out_6_2[2] == 5.0); + assert(out_6_2[3] == 3.0); + assert(out_6_2[4] == 4.0); + assert(out_6_2[5] == 7.0); + assert(out_6_2[6] == 6.0); + assert(out_6_2[7] == 9.0); + assert(out_6_2[8] == 10.0); + assert(out_6_2[9] == 8.0); + assert(out_6_2[10] == 11.0); + assert(out_6_2[11] == 12.0); + + + srowcata(inNono1, 3, 2, inNono2, 1, 2, outNono); + assert(outNono[0] == 1.0); + assert(outNono[1] == 3.0); + assert(outNono[2] == 5.0); + assert(outNono[3] == 1.0); + assert(outNono[4] == 2.0); + assert(outNono[5] == 4.0); + assert(outNono[6] == 6.0); + assert(outNono[7] == 2.0); + +} + +static void crowcatsTest(void) { + int i = 0; + floatComplex output[2]; + + /* + ** [ 42+25i 51+38i ] + */ + crowcats(FloatComplex(42.0, 25.0), + FloatComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == 42.0); + assert(cimags(output[0]) == 25.0); + assert(creals(output[1]) == 51.0); + assert(cimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + crowcats(FloatComplex(FPI, FPI/2), + FloatComplex(FPI/2, FPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == FPI); + assert(cimags(output[0]) == FPI / 2); + assert(creals(output[1]) == FPI / 2); + assert(cimags(output[1]) == FPI); +} + +static void ccolumncatsTest(void) { + int i = 0; + floatComplex output[2]; + /* + ** [ 42+25i 51+38i ] + */ + ccolumncats(FloatComplex(42.0, 25.0), + FloatComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == 42.0); + assert(cimags(output[0]) == 25.0); + assert(creals(output[1]) == 51.0); + assert(cimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + ccolumncats(FloatComplex(FPI, FPI/2), + FloatComplex(FPI/2, FPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == FPI); + assert(cimags(output[0]) == FPI / 2); + assert(creals(output[1]) == FPI / 2); + assert(cimags(output[1]) == FPI); + +} + +static void ccolumncataTest(void) { + int i = 0; + float in1_real[12] = {0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0}; + float in1_imag[12] = {11.0 , 10.0 , 9.0 , 8.0 , 7.0 , 6.0 , 5.0 , 4.0 , 3.0 , 2.0 , 1.0 , 0.0}; + floatComplex *in1 = FloatComplexMatrix(in1_real, in1_imag, 12); + float in2_real[1] = {12.0}; + float in2_imag[1] = {-1.0}; + floatComplex *in2_1_1 = FloatComplexMatrix(in2_real, in2_imag, 1); + floatComplex out_1_13[13]; + + float in2_2_2_real[4] = {FPI, FPI / 2, FPI / 3, FPI / 4}; + float in2_2_2_imag[4] = {FPI / 4, FPI / 3, FPI / 2, FPI}; + floatComplex *in2_2_2 = FloatComplexMatrix(in2_2_2_real, in2_2_2_imag, 4); + floatComplex out_2_8[16]; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + ccolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e + %e i\n", i, creals(out_1_13[i]), cimags(out_1_13[i])); + assert(creals(out_1_13[i]) == (float) i); + assert(cimags(out_1_13[i]) == 11.0 - (float) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + ccolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e + %e i\n", i, creals(out_2_8[i]), cimags(out_2_8[i])); + } + for (i = 0 ; i < 12 ; ++i) { + assert(creals(out_2_8[i]) == creals(in1[i])); + assert(cimags(out_2_8[i]) == cimags(in1[i])); + } + for (i = 0 ; i < 4 ; ++i) { + assert(creals(out_2_8[i + 12]) == creals(in2_2_2[i])); + assert(cimags(out_2_8[i + 12]) == cimags(in2_2_2[i])); + } + +} + +static void crowcataTest() { + int i = 0; + float in1_real[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + float in1_imag[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + floatComplex *in1 = FloatComplexMatrix(in1_real, in1_imag, 6); + float in2_real[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + float in2_imag[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + floatComplex *in2 = FloatComplexMatrix(in2_real, in2_imag, 6); + floatComplex out_4_3[12]; + floatComplex out_6_2[12]; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + crowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e + %e i\n", i, creals(out_4_3[i]), cimags(out_4_3[i])); + assert(creals(out_4_3[i]) == (float) i + 1.0); + assert(cimags(out_4_3[i]) == (float) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + crowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e + %e i\n", i, creals(out_6_2[i]), cimags(out_6_2[i])); + } + assert(creals(out_6_2[0]) == 1.0); + assert(cimags(out_6_2[0]) == 1.0); + assert(creals(out_6_2[1]) == 2.0); + assert(cimags(out_6_2[1]) == 2.0); + assert(creals(out_6_2[2]) == 5.0); + assert(cimags(out_6_2[2]) == 5.0); + assert(creals(out_6_2[3]) == 3.0); + assert(cimags(out_6_2[3]) == 3.0); + assert(creals(out_6_2[4]) == 4.0); + assert(cimags(out_6_2[4]) == 4.0); + assert(creals(out_6_2[5]) == 7.0); + assert(cimags(out_6_2[5]) == 7.0); + assert(creals(out_6_2[6]) == 6.0); + assert(cimags(out_6_2[6]) == 6.0); + assert(creals(out_6_2[7]) == 9.0); + assert(cimags(out_6_2[7]) == 9.0); + assert(creals(out_6_2[8]) == 10.0); + assert(cimags(out_6_2[8]) == 10.0); + assert(creals(out_6_2[9]) == 8.0); + assert(cimags(out_6_2[9]) == 8.0); + assert(creals(out_6_2[10]) == 11.0); + assert(cimags(out_6_2[10]) == 11.0); + assert(creals(out_6_2[11]) == 12.0); + assert(cimags(out_6_2[11]) == 12.0); +} + +int main(void) { + srowcatsTest(); + scolumncatsTest(); + srowcataTest(); + scolumncataTest(); + crowcatsTest(); + ccolumncatsTest(); + crowcataTest(); + ccolumncataTest(); + return 0; +} diff --git a/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj b/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj new file mode 100644 index 0000000..703f746 --- /dev/null +++ b/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7F36A592-B667-43A4-B3C3-66636F2DECB8} + testDoubleMatrixConcatenation + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters b/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters new file mode 100644 index 0000000..cce0dbd --- /dev/null +++ b/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj b/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj new file mode 100644 index 0000000..4efaa48 --- /dev/null +++ b/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B9413124-1841-4373-BFE2-AE6C78F24731} + testFloatMatrixConcatenation + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters b/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters new file mode 100644 index 0000000..c53933d --- /dev/null +++ b/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/cat/u16cata.c b/src/c/matrixOperations/cat/u16cata.c new file mode 100644 index 0000000..8c33acb --- /dev/null +++ b/src/c/matrixOperations/cat/u16cata.c @@ -0,0 +1,63 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" +/* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(1,A1,A2); +output => y = [1 2 3; 4 5 6;7 8 9;10 11 12] +*/ + +void u16rowcata(uint16 *in1,int lines1,int columns1,uint16 *in2,int lines2,int columns2,uint16* out) +{ + int i = 0; + int j = 0; + for(i = 0;i < columns1 && i < columns2; ++i) + { + for(j = 0;j < lines1; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for(j = 0;j < lines2; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + + } +} + + /* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(2,A1,A2); +output => y = [1 2 3 7 8 9; 4 5 6 10 11 12] +*/ + +void u16columncata(uint16 *in1,int lines1,int columns1,uint16 *in2,int lines2,int columns2,uint16* out) + { + int i = 0; + for(i = 0; i < lines1 * columns1;++i) + { + out[i] = in1[i]; + + } + for(i = 0;i < lines2 * columns2;++i) + { + + out[i + lines1 * columns2] = in2[i]; + + } + + } + + + diff --git a/src/c/matrixOperations/cat/u16cats.c b/src/c/matrixOperations/cat/u16cats.c new file mode 100644 index 0000000..942ed76 --- /dev/null +++ b/src/c/matrixOperations/cat/u16cats.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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "cat.h" + +void u16rowcats(uint16 in1,uint16 in2,uint16 *out) +{ + out[0] = in1; + out[1] = in2; + +} + +void u16columncats(uint16 in1,uint16 in2,uint16 *out) +{ + out[0] = in1; + out[1] = in2; + +} diff --git a/src/c/matrixOperations/cat/u8cata.c b/src/c/matrixOperations/cat/u8cata.c new file mode 100644 index 0000000..ab15f42 --- /dev/null +++ b/src/c/matrixOperations/cat/u8cata.c @@ -0,0 +1,60 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" +/* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(1,A1,A2); +output => y = [1 2 3; 4 5 6;7 8 9;10 11 12] +*/ + +void u8rowcata(uint8 *in1,int lines1,int columns1,uint8 *in2,int lines2,int columns2,uint8* out) +{ + int i = 0; + int j = 0; + for(i = 0;i < columns1 && i < columns2; ++i) + { + for(j = 0;j < lines1; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for(j = 0;j < lines2; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + + } +} + /* From scilab help cat then the concatenation is done according to the rows +A1 = [1 2 3;4 5 6]; +A2 = [7 8 9;10 11 12]; +y = cat(2,A1,A2); +output => y = [1 2 3 7 8 9; 4 5 6 10 11 12] +*/ + +void u8columncata(uint8 *in1,int lines1,int columns1,uint8 *in2,int lines2,int columns2,uint8* out) + { + int i = 0; + for(i = 0; i < lines1 * columns1;++i) + { + out[i] = in1[i]; + + } + for(i = 0;i < lines2 * columns2;++i) + { + + out[i + lines1 * columns2] = in2[i]; + + } + + } + diff --git a/src/c/matrixOperations/cat/u8cats.c b/src/c/matrixOperations/cat/u8cats.c new file mode 100644 index 0000000..92341f3 --- /dev/null +++ b/src/c/matrixOperations/cat/u8cats.c @@ -0,0 +1,26 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ +#include "cat.h" + +void u8rowcats(uint8 in1,uint8 in2,uint8 *out) +{ + out[0] = in1; + out[1] = in2; + +} + +void u8columncats(uint8 in1,uint8 in2,uint8 *out) +{ + out[0] = in1; + out[1] = in2; + +} diff --git a/src/c/matrixOperations/cat/zcata.c b/src/c/matrixOperations/cat/zcata.c new file mode 100644 index 0000000..bfb6e92 --- /dev/null +++ b/src/c/matrixOperations/cat/zcata.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 61 ;7 8 9; 10 11 12] +** +*/ + +void zrowcata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out) { + int i = 0; + int j = 0; + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + /*out[i*(lines1 + lines2) + j] = in1[i*lines1 + j];*/ + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void zcolumncata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/src/c/matrixOperations/cat/zcats.c b/src/c/matrixOperations/cat/zcats.c new file mode 100644 index 0000000..107000c --- /dev/null +++ b/src/c/matrixOperations/cat/zcats.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void zrowcats(doubleComplex in1, doubleComplex in2, doubleComplex *out) { + out[0] = in1; + out[1] = in2; +} + +void zcolumncats(doubleComplex in1, doubleComplex in2, doubleComplex *out) { + out[0] = in1; + out[1] = in2; +} + diff --git a/src/c/matrixOperations/chol/Makefile.am b/src/c/matrixOperations/chol/Makefile.am new file mode 100644 index 0000000..875adf2 --- /dev/null +++ b/src/c/matrixOperations/chol/Makefile.am @@ -0,0 +1,71 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixChol_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixChol.la + +HEAD = ../includes/chol.h + +libMatrixChol_la_SOURCES = $(HEAD) \ + schols.c \ + schola.c \ + dchols.c \ + dchola.c \ + cchola.c \ + zchola.c + + +############ +## CHECK +############ + + +check_PROGRAMS = testDoubleChol testFloatChol + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixChol.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testDoubleChol_SOURCES = testDoubleChol.c +testDoubleChol_LDADD = $(check_LDADD) +testDoubleChol_CFLAGS = $(check_INCLUDES) + +testFloatChol_SOURCES = testFloatChol.c +testFloatChol_LDADD = $(check_LDADD) +testFloatChol_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleChol testFloatChol + + + + diff --git a/src/c/matrixOperations/chol/Makefile.in b/src/c/matrixOperations/chol/Makefile.in new file mode 100644 index 0000000..f740981 --- /dev/null +++ b/src/c/matrixOperations/chol/Makefile.in @@ -0,0 +1,772 @@ +# 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 = testDoubleChol$(EXEEXT) testFloatChol$(EXEEXT) +TESTS = testDoubleChol$(EXEEXT) testFloatChol$(EXEEXT) +subdir = src/c/matrixOperations/chol +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) +libMatrixChol_la_LIBADD = +am__objects_1 = +am_libMatrixChol_la_OBJECTS = $(am__objects_1) \ + libMatrixChol_la-schols.lo libMatrixChol_la-schola.lo \ + libMatrixChol_la-dchols.lo libMatrixChol_la-dchola.lo \ + libMatrixChol_la-cchola.lo libMatrixChol_la-zchola.lo +libMatrixChol_la_OBJECTS = $(am_libMatrixChol_la_OBJECTS) +libMatrixChol_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixChol_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleChol_OBJECTS = testDoubleChol-testDoubleChol.$(OBJEXT) +testDoubleChol_OBJECTS = $(am_testDoubleChol_OBJECTS) +testDoubleChol_DEPENDENCIES = $(check_LDADD) +testDoubleChol_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleChol_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatChol_OBJECTS = testFloatChol-testFloatChol.$(OBJEXT) +testFloatChol_OBJECTS = $(am_testFloatChol_OBJECTS) +testFloatChol_DEPENDENCIES = $(check_LDADD) +testFloatChol_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatChol_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 = $(libMatrixChol_la_SOURCES) $(testDoubleChol_SOURCES) \ + $(testFloatChol_SOURCES) +DIST_SOURCES = $(libMatrixChol_la_SOURCES) $(testDoubleChol_SOURCES) \ + $(testFloatChol_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@ +libMatrixChol_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixChol.la +HEAD = ../includes/chol.h +libMatrixChol_la_SOURCES = $(HEAD) \ + schols.c \ + schola.c \ + dchols.c \ + dchola.c \ + cchola.c \ + zchola.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixChol.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testDoubleChol_SOURCES = testDoubleChol.c +testDoubleChol_LDADD = $(check_LDADD) +testDoubleChol_CFLAGS = $(check_INCLUDES) +testFloatChol_SOURCES = testFloatChol.c +testFloatChol_LDADD = $(check_LDADD) +testFloatChol_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/chol/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/chol/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 +libMatrixChol.la: $(libMatrixChol_la_OBJECTS) $(libMatrixChol_la_DEPENDENCIES) + $(libMatrixChol_la_LINK) -rpath $(pkglibdir) $(libMatrixChol_la_OBJECTS) $(libMatrixChol_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 +testDoubleChol$(EXEEXT): $(testDoubleChol_OBJECTS) $(testDoubleChol_DEPENDENCIES) + @rm -f testDoubleChol$(EXEEXT) + $(testDoubleChol_LINK) $(testDoubleChol_OBJECTS) $(testDoubleChol_LDADD) $(LIBS) +testFloatChol$(EXEEXT): $(testFloatChol_OBJECTS) $(testFloatChol_DEPENDENCIES) + @rm -f testFloatChol$(EXEEXT) + $(testFloatChol_LINK) $(testFloatChol_OBJECTS) $(testFloatChol_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-cchola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-dchola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-dchols.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-schola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-schols.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-zchola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleChol-testDoubleChol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatChol-testFloatChol.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 $@ $< + +libMatrixChol_la-schols.lo: schols.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-schols.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-schols.Tpo -c -o libMatrixChol_la-schols.lo `test -f 'schols.c' || echo '$(srcdir)/'`schols.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-schols.Tpo $(DEPDIR)/libMatrixChol_la-schols.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='schols.c' object='libMatrixChol_la-schols.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) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-schols.lo `test -f 'schols.c' || echo '$(srcdir)/'`schols.c + +libMatrixChol_la-schola.lo: schola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-schola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-schola.Tpo -c -o libMatrixChol_la-schola.lo `test -f 'schola.c' || echo '$(srcdir)/'`schola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-schola.Tpo $(DEPDIR)/libMatrixChol_la-schola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='schola.c' object='libMatrixChol_la-schola.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) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-schola.lo `test -f 'schola.c' || echo '$(srcdir)/'`schola.c + +libMatrixChol_la-dchols.lo: dchols.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-dchols.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-dchols.Tpo -c -o libMatrixChol_la-dchols.lo `test -f 'dchols.c' || echo '$(srcdir)/'`dchols.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-dchols.Tpo $(DEPDIR)/libMatrixChol_la-dchols.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dchols.c' object='libMatrixChol_la-dchols.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) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-dchols.lo `test -f 'dchols.c' || echo '$(srcdir)/'`dchols.c + +libMatrixChol_la-dchola.lo: dchola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-dchola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-dchola.Tpo -c -o libMatrixChol_la-dchola.lo `test -f 'dchola.c' || echo '$(srcdir)/'`dchola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-dchola.Tpo $(DEPDIR)/libMatrixChol_la-dchola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dchola.c' object='libMatrixChol_la-dchola.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) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-dchola.lo `test -f 'dchola.c' || echo '$(srcdir)/'`dchola.c + +libMatrixChol_la-cchola.lo: cchola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-cchola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-cchola.Tpo -c -o libMatrixChol_la-cchola.lo `test -f 'cchola.c' || echo '$(srcdir)/'`cchola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-cchola.Tpo $(DEPDIR)/libMatrixChol_la-cchola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cchola.c' object='libMatrixChol_la-cchola.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) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-cchola.lo `test -f 'cchola.c' || echo '$(srcdir)/'`cchola.c + +libMatrixChol_la-zchola.lo: zchola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-zchola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-zchola.Tpo -c -o libMatrixChol_la-zchola.lo `test -f 'zchola.c' || echo '$(srcdir)/'`zchola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-zchola.Tpo $(DEPDIR)/libMatrixChol_la-zchola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zchola.c' object='libMatrixChol_la-zchola.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) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-zchola.lo `test -f 'zchola.c' || echo '$(srcdir)/'`zchola.c + +testDoubleChol-testDoubleChol.o: testDoubleChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleChol_CFLAGS) $(CFLAGS) -MT testDoubleChol-testDoubleChol.o -MD -MP -MF $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo -c -o testDoubleChol-testDoubleChol.o `test -f 'testDoubleChol.c' || echo '$(srcdir)/'`testDoubleChol.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo $(DEPDIR)/testDoubleChol-testDoubleChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleChol.c' object='testDoubleChol-testDoubleChol.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) $(testDoubleChol_CFLAGS) $(CFLAGS) -c -o testDoubleChol-testDoubleChol.o `test -f 'testDoubleChol.c' || echo '$(srcdir)/'`testDoubleChol.c + +testDoubleChol-testDoubleChol.obj: testDoubleChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleChol_CFLAGS) $(CFLAGS) -MT testDoubleChol-testDoubleChol.obj -MD -MP -MF $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo -c -o testDoubleChol-testDoubleChol.obj `if test -f 'testDoubleChol.c'; then $(CYGPATH_W) 'testDoubleChol.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleChol.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo $(DEPDIR)/testDoubleChol-testDoubleChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleChol.c' object='testDoubleChol-testDoubleChol.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) $(testDoubleChol_CFLAGS) $(CFLAGS) -c -o testDoubleChol-testDoubleChol.obj `if test -f 'testDoubleChol.c'; then $(CYGPATH_W) 'testDoubleChol.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleChol.c'; fi` + +testFloatChol-testFloatChol.o: testFloatChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatChol_CFLAGS) $(CFLAGS) -MT testFloatChol-testFloatChol.o -MD -MP -MF $(DEPDIR)/testFloatChol-testFloatChol.Tpo -c -o testFloatChol-testFloatChol.o `test -f 'testFloatChol.c' || echo '$(srcdir)/'`testFloatChol.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatChol-testFloatChol.Tpo $(DEPDIR)/testFloatChol-testFloatChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatChol.c' object='testFloatChol-testFloatChol.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) $(testFloatChol_CFLAGS) $(CFLAGS) -c -o testFloatChol-testFloatChol.o `test -f 'testFloatChol.c' || echo '$(srcdir)/'`testFloatChol.c + +testFloatChol-testFloatChol.obj: testFloatChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatChol_CFLAGS) $(CFLAGS) -MT testFloatChol-testFloatChol.obj -MD -MP -MF $(DEPDIR)/testFloatChol-testFloatChol.Tpo -c -o testFloatChol-testFloatChol.obj `if test -f 'testFloatChol.c'; then $(CYGPATH_W) 'testFloatChol.c'; else $(CYGPATH_W) '$(srcdir)/testFloatChol.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatChol-testFloatChol.Tpo $(DEPDIR)/testFloatChol-testFloatChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatChol.c' object='testFloatChol-testFloatChol.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) $(testFloatChol_CFLAGS) $(CFLAGS) -c -o testFloatChol-testFloatChol.obj `if test -f 'testFloatChol.c'; then $(CYGPATH_W) 'testFloatChol.c'; else $(CYGPATH_W) '$(srcdir)/testFloatChol.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/chol/cchola.c b/src/c/matrixOperations/chol/cchola.c new file mode 100644 index 0000000..4b657e6 --- /dev/null +++ b/src/c/matrixOperations/chol/cchola.c @@ -0,0 +1,91 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "multiplication.h" +#include "division.h" +#include "subtraction.h" +#include "sqrt.h" +#endif +#include "chol.h" + + +void cchola(floatComplex * in, int size, floatComplex *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param out : output upper triangular matrix + */ + + /* + We compute U as A=Ut*U + */ + + +#ifndef WITHOUT_LAPACK + + /*We have to use a double, copy of in, + cause dpotrf works only with double, not with float*/ + doubleComplex* tmp; + int i=0, j=0, info=0; + + tmp=(doubleComplex*)malloc((unsigned int)(size*size)*sizeof(doubleComplex)); + for(i=0;i +void dchola(double * in, int size, double *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param U : output upper triangular matrix + */ + +#ifndef WITHOUT_LAPACK + int i=0,j=0,info=0; + + for (i=0;i + +double dchols(double in){ + return dsqrts(in); +} diff --git a/src/c/matrixOperations/chol/schola.c b/src/c/matrixOperations/chol/schola.c new file mode 100644 index 0000000..cb394c3 --- /dev/null +++ b/src/c/matrixOperations/chol/schola.c @@ -0,0 +1,80 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "sqrt.h" +#endif +#include "chol.h" + +void schola(float * in, int size, float *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param U : output upper triangular matrix + */ + +#ifndef WITHOUT_LAPACK + + /*We have to use a double, copy of in, + cause dpotrf works only with double, not with float*/ + double* tmp; + int i=0,j=0,info=0; + + tmp=(double*)malloc((unsigned int)(size*size)*sizeof(double)); + for (i=0;i +#include +#include +#include +#include "chol.h" + +/* FIXME : assert à 1e-14 pour une valeur d'entrée de 0.003... */ + + +static void dcholsTest(void){ + double in=4; + double out; + printf("\n >>> DCholS <<<\n"); + out=dchols(in); + assert( (fabs(out-2) / fabs(out)) <1e-16); + +} + +static void dcholaTest(void){ + /* in2 non viable car non définie positive, ne fonctionne pas dans Scilab */ + double in2[49]={0.2113249,0.7560439,0.0002211,0.3303271, 0.6653811,0.6283918,0.8497452 ,\ + 0.6857310,0.8782165,0.0683740,0.5608486,0.6623569,0.7263507,0.1985144 ,\ + 0.5442573, 0.2320748 , 0.2312237, 0.2164633, 0.8833888, 0.6525135, 0.3076091 ,\ + 0.9329616, 0.2146008 , 0.312642 , 0.3616361 , 0.2922267 , 0.5664249 , 0.4826472 ,\ + 0.3321719, 0.5935095, 0.5015342 , 0.4368588 , 0.2693125 , 0.6325745 , 0.4051954 ,\ + 0.9184708, 0.0437334, 0.4818509 , 0.2639556 , 0.4148104 , 0.2806498 , 0.1280058 ,\ + 0.7783129, 0.2119030, 0.1121355 ,0.6856896 ,0.1531217 ,0.6970851 ,0.8415518 }; + + + double in[9]= {0.722725308034569025040,0.8976796260103583335877,0.2427821881137788295746,\ + 0.4337721113115549087524,0.9677053210325539112091,0.5068534435704350471497,\ + 0.523297640960663557053,0.5596947595477104187012,0.5617307000793516635895}; + double res[9]={0.8501325238070644996213,0,0,\ + 0.5102405791617476982225,0.8410468907315681308390,0,\ + 0.6155483131232661886401,0.2920372626834314977451,0.3123222878611475739064}; + double out[9]={0}, out2[49]={0}; + int size=3; + int i; + + printf("\n >>> DCholA <<<\n"); + dchola(in2,7,out2); + for (i=0;i<49;i++)printf("out2[i]= %f\n",out2[i]); + dchola(in,size,out); + for (i=0;i<9;i++){ + if (out[i]>1e-16) assert( (fabs(out[i]-res[i]) / fabs(out[i])) <3e-16); + } +} + + +static void zcholsTest(void){ + doubleComplex in; + doubleComplex out; + in=DoubleComplex(3,1); + printf("\n >>> ZCholS <<<\n"); + out=zchols(in); + printf("result : %f\n",zreals(out)); + +} + + + +static void zcholaTest(void){ + + { + double inR[9]= {9,4,2,4,5,1,2,1,4}; + double inI[9]= {1,-1,2,-1,-4,1,2,1,4}; + double resR[9]= {3,0,0,1.333333333333333259319,\ + 1.763834207376393736766,0,0.6666666666666666296592,\ + 0.1889822365046136265487,1.7525491637693282331867}; + double resI[9]= {0,0,0,- 0.3333333333333333148296,\ + 0,0,0.6666666666666666296592,- 0.0629940788348712366052,0}; + doubleComplex *in, out[9]; + int i; + + printf("\n >>> ZCholA Test1 <<<\n"); + in=DoubleComplexMatrix(inR,inI,9); + + zchola(in,3,out); + for (i=0;i<9;i++) printf("indice : %d out : %f+%f *i\n",i,zreals(out[i]),zimags(out[i])); + for (i=0;i<9;i++){ + if (zreals(out[i])>1e-16) + assert( (fabs(zreals(out[i])-resR[i]) / fabs(zreals(out[i]))) <3e-16); + if (zimags(out[i])>1e-16) + assert( (fabs(zimags(out[i])-resI[i]) / fabs(zimags(out[i]))) <3e-16); + } + free(in); + } + + + { + double inR[9]= {1.90865864663256012967,0.9230693052910239337905,1.7121882610664511670251, + 0.9230693052910239337905,1.6572668858351540244200,0.8330281942607563605563, + 1.7121882610664511670251,0.8330281942607563605563,1.6029756354175805910245}; + double inI[9]= {0.0000000000000001301043,- 0.0097963300301950190230,- 0.2359069351837047023857, + 0.0097963300301950190230,0,- 0.0909413002461877950644, + 0.2359069351837046468745,0.0909413002461877811866,0.0000000000000000034694}; + double resR[9]= {1.381542126260564051776 ,0,0, + 0.6681441613289825776079,1.1003635695246982706408 ,0, + 1.239331199911254843826,0.0034220321368758992685,0.1941496531533084546339 }; + double resI[9]= {0,0,0, + 0.0070908659562273776769,0,0, + 0.1707562373231691910114,- 0.0130507331536391171789,0}; + + doubleComplex *in, out[9]; + int i; + + printf("\n >>> ZCholA Test2 <<<\n"); + in=DoubleComplexMatrix(inR,inI,9); + + zchola(in,3,out); + + for (i=0;i<9;i++){ + if (zreals(out[i])>1e-16) + assert( (fabs(zreals(out[i])-resR[i]) / fabs(zreals(out[i]))) <3e-15); + if (zimags(out[i])>1e-16) + assert( (fabs(zimags(out[i])-resI[i]) / fabs(zimags(out[i]))) <1e-15); + } + free(in); + } + + + +} + + +static int cholTest(void){ + printf("\n >>> Double Chol <<<\n"); + dcholsTest(); + dcholaTest(); + zcholsTest(); + zcholaTest(); + return 0; +} + + +int main (void){ + assert(cholTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/chol/testFloatChol.c b/src/c/matrixOperations/chol/testFloatChol.c new file mode 100644 index 0000000..884d047 --- /dev/null +++ b/src/c/matrixOperations/chol/testFloatChol.c @@ -0,0 +1,97 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + #include + #include + #include "chol.h" + +static void scholsTest(void){ + float in=4; + float out; + printf("\n >>> SCholS <<<\n"); + out=schols(in); + printf("result : %f\n",out); + +} + +static void scholaTest(void){ + float in[9]= {0.722725308034569025040f,0.8976796260103583335877f,0.2427821881137788295746f,\ +0.4337721113115549087524f,0.9677053210325539112091f,0.5068534435704350471497f,\ +0.523297640960663557053f,0.5596947595477104187012f,0.5617307000793516635895f}; + float res[9]={0.8501325238070644996213f,0.0f,0.0f,\ +0.5102405791617476982225f,0.8410468907315681308390f,0.0f,\ +0.6155483131232661886401f,0.2920372626834314977451f,0.3123222878611475739064f}; + float out[9]; + int size=3; + int i; + printf("\n >>> SCholA <<<\n"); + schola(in,size,out); + for (i=0;i<9;i++){ + if (out[i]>1e-16) assert( (fabs(out[i]-res[i]) / fabs(out[i])) <1e-6); + } +} + + +static void ccholsTest(void){ + floatComplex in; + floatComplex out; + in=FloatComplex(3,1); + printf("\n >>> CCholS <<<\n"); + out=cchols(in); + printf("result : %f\n",creals(out)); + +} + + + + + + + +static void ccholaTest(void){ + float inR[9]= {9.0f,4.0f,2.0f,4.0f,5.0f,1.0f,2.0f,1.0f,4.0f}; + float inI[9]= {0.0f,-1.0f,2.0f,-1.0f,0.0f,1.0f,2.0f,1.0f,0.0f}; + float resR[9]= {3.0f,0.0f,0.0f,1.333333333333333259319f,\ + 1.763834207376393736766f,0.0f,0.6666666666666666296592f,\ + 0.1889822365046136265487f,1.7525491637693282331867f}; + float resI[9]= {0.0f,0.0f,0.0f,- 0.3333333333333333148296f,\ + 0.0f,0.0f,0.6666666666666666296592f,- 0.0629940788348712366052f,0.0f}; + floatComplex *in, out[9]; + int i; + + printf("\n >>> CCholA <<<\n"); + in=FloatComplexMatrix(inR,inI,9); + + cchola(in,3,out); + for (i=0;i<9;i++) printf("indice : %d out : %f+%f *i\n",i,creals(out[i]),cimags(out[i])); + for (i=0;i<9;i++){ + if (creals(out[i])>1e-16) + assert( (fabs(creals(out[i])-resR[i]) / fabs(creals(out[i]))) <1e-8); + if (cimags(out[i])>1e-16) + assert( (fabs(cimags(out[i])-resI[i]) / fabs(cimags(out[i]))) <1e-8); + } +} +static int cholTest(void){ + printf("\n >>> Float Chol <<<\n"); + scholsTest(); + scholaTest(); + ccholsTest(); + ccholaTest(); + return 0; +} + + +int main (void){ + assert(cholTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj b/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj new file mode 100644 index 0000000..4a97358 --- /dev/null +++ b/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2B2D70A6-F2DB-4160-972C-9ECFA0B0699A} + testDoubleChol + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters b/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters new file mode 100644 index 0000000..bb07d36 --- /dev/null +++ b/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj b/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj new file mode 100644 index 0000000..ba9fabd --- /dev/null +++ b/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C5BA0B86-B432-4EF6-95DE-75C026994F4F} + testFloatChol + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters b/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters new file mode 100644 index 0000000..ae308d5 --- /dev/null +++ b/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/chol/zchola.c b/src/c/matrixOperations/chol/zchola.c new file mode 100644 index 0000000..730c241 --- /dev/null +++ b/src/c/matrixOperations/chol/zchola.c @@ -0,0 +1,80 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "multiplication.h" +#include "division.h" +#include "subtraction.h" +#include "sqrt.h" +#endif + +#include "chol.h" + +void zchola(doubleComplex * in, int size, doubleComplex *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param out : output upper triangular matrix + */ + +#ifndef WITHOUT_LAPACK + int i=0, j=0, info=0; + + for(i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "division.h" +#endif + +#include "determ.h" +#include "multiplication.h" +#include "subtraction.h" +#include "addition.h" + + + +floatComplex cdeterma(floatComplex *in, int size){ +#ifndef WITHOUT_LAPACK + int i=0,info=0; + doubleComplex *inCopy,out_tmp; + int *vectPivot; + floatComplex out, tmp1,tmp2; + + + /*Calculation of the determinant*/ + switch(size){ + case 2 : out = cdiffs(cmuls(in[0],in[3]),cmuls(in[1],in[2])); + break; + case 3 : /*regle de Sarrus*/ + out=FloatComplex(0,0); + /*Addition part*/ + tmp1 = cmuls(in[0],in[4]); + tmp2 = cmuls(tmp1,in[8]); + out = cadds(out,tmp2); + tmp1 = cmuls(in[1],in[5]); + tmp2 = cmuls(tmp1,in[6]); + out = cadds(out,tmp2); + tmp1 = cmuls(in[2],in[3]); + tmp2 = cmuls(tmp1,in[7]); + out = cadds(out,tmp2); + /*Subtraction part*/ + tmp1 = cmuls(in[0],in[5]); + tmp2 = cmuls(tmp1,in[7]); + out = cdiffs(out,tmp2); + tmp1 = cmuls(in[1],in[3]); + tmp2 = cmuls(tmp1,in[8]); + out = cdiffs(out,tmp2); + tmp1 = cmuls(in[2],in[4]); + tmp2 = cmuls(tmp1,in[6]); + out = cdiffs(out,tmp2); + break; + + default : + + + /*We must have a doubleComplex matrix cause + zgetrf accept only double parameters*/ + + /*Copy the input matrix*/ + inCopy=(doubleComplex*)malloc((unsigned int)(size*size)*sizeof(doubleComplex)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" +#include "lapack.h" + +double ddeterma(double * in, int size){ +#ifndef WITHOUT_LAPACK + int i=0, info=0; + double out=0; + double *inCopy=NULL; + int* tmp=NULL; + + /*Calculation of the determinant*/ + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(double*)malloc((unsigned int)(size*size)*sizeof(double)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" +#include "lapack.h" + +int16 i16determa(int16 * in, int size){ +#ifndef WITHOUT_LAPACK + int i=0, info=0; + int16 out=0; + int16 *inCopy=NULL; + int* tmp=NULL; + + /*Calculation of the determinant*/ + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(int16*)malloc((unsigned int)(size*size)*sizeof(int16)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" +#include "lapack.h" + +int8 i8determa(int8 * in, int size){ +#ifndef WITHOUT_LAPACK + int i=0, info=0; + int8 out=0; + int8 *inCopy=NULL; + int* tmp=NULL; + + /*Calculation of the determinant*/ + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(int8*)malloc((unsigned int)(size*size)*sizeof(int8)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" + +float sdeterma(float * in, int size){ +#ifndef WITHOUT_LAPACK + float out; + double *inCopy; + int* tmp; + int info=0,i=0; + + + + /*Calculation of the determinant*/ + + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(double*)malloc((unsigned int)(size*size)*sizeof(double)); + tmp=(int*)malloc((unsigned int)size*sizeof(int)); + for (i=0;i +#include +#include +#include "determ.h" + + + +#define IN2 {0.1998337740078568458557,0.5618660743348300457001,\ +0.5896177329123020172119,0.6853979662992060184479f} + +#define RES2 -0.1943205386467572182152 + +#define IN3 {0.8906224733218550682068,0.5042212805710732936859,0.3493615407496690750122,\ +0.3873778772540390491486,0.9222898678854107856751,0.9488184261135756969452,\ +0.3435337245464324951172,0.3760118731297552585602,0.7340940563008189201355} + +#define RES3 0.2464108526639412488635 + +#define IN4 {0.2615761472843587398529,0.4993493836373090744019,0.2638578419573605060577,\ + 0.5253563085570931434631,\ +0.5376229803077876567841,0.1199925504624843597412,0.2256303490139544010162,\ + 0.6274093082174658775330,\ +0.7608432597480714321137,0.0485566202551126480103,0.6723949727602303028107,\ + 0.2017172696068882942200,\ +0.3911573919467628002167,0.8300316557288169860840,0.5878720157779753208160,\ + 0.4829179299995303153992} + +#define RES4 0.0079215378363537460038 + +#define IN5 {0.2232865034602582454681,0.8400885667651891708374,0.1205995907075703144074,\ + 0.2855364168062806129456,0.8607514644972980022430,\ +0.8494101651012897491455,0.5257060811854898929596,0.9931209897622466087341,\ + 0.6488562873564660549164,0.9923190940171480178833,\ +0.0500419777818024158478,0.7485506581142544746399,0.4104058998636901378632,\ + 0.6084526330232620239258,0.8544210889376699924469,\ +0.0642646728083491325378,0.8279082938097417354584,0.9262343775480985641480,\ + 0.5667211269028484821320,0.5711638936772942543030,\ +0.8160110483877360820770,0.0568927936255931854248,0.5595936686731874942780,\ + 0.1249340316280722618103,0.7279222286306321620941} + +#define RES5 0.0501241717143536200108 + +#define IN6 {0.2677766475826501846314,0.5465334919281303882599,0.9885407658293843269348,\ + 0.7395656588487327098846,0.0037173107266426086426,0.5900572859682142734528,\ +0.3096467358991503715515,0.2552205710671842098236,0.6251879390329122543335,\ + 0.1157417376525700092316,0.6117004090920090675354,0.6783956284634768962860,\ +0.3320095278322696685791,0.0258709923364222049713,0.5174468224868178367615,\ + 0.3916873238049447536469,0.2413538414984941482544,0.5064434898085892200470,\ +0.4236102001741528511047,0.2893727528862655162811,0.0887932181358337402344,\ + 0.6212881752289831638336,0.3454984454438090324402,0.7064867629669606685638,\ +0.5211472492665052413940,0.2870400850661098957062,0.6502795079723000526428,\ + 0.0881334762088954448700,0.4498763345181941986084,0.722725308034569025040,\ +0.8976796260103583335877,0.2427821881137788295746,0.4337721113115549087524,\ + 0.9677053210325539112091,0.5068534435704350471497,0.523297640960663557053} + +#define RES6 -0.0275938917848303037761 + +#define IN8 {0.5596947595477104187012,0.5617307000793516635895,0.468176002614200115204,\ + 0.7794546722434461116791,0.7901071812957525253296,0.9808542062528431415558,\ + 0.8187066102400422096252,0.4256872381083667278290,\ +0.2461560554802417755127,0.922953246627002954483,0.1000745808705687522888,\ + 0.4678218117915093898773,0.3950497675687074661255,0.0366117102093994617462,\ + 0.5175368534401059150696,0.8325451570563018321991,\ +0.6104832142591476440430,0.1871111788786947727203,0.0189574835821986198425,\ + 0.8433564766310155391693,0.0748594831675291061401,0.8532815133221447467804,\ + 0.0124590108171105384827,0.1867539356462657451630,\ +0.4920584075152873992920,0.7489608139730989933014,0.9414957007393240928650,\ + 0.212405560072511434555,0.5795019958168268203735,0.2628147569485008716583,\ + 0.4360986622050404548645,0.9110545101575553417206,\ +0.8082667365670204162598,0.8102653049863874912262,0.2590428395196795463562,\ + 0.4139087288640439510346,0.3599927779287099838257,0.6912787933833897113800,\ + 0.7656858796253800392151,0.3572649653069674968720,\ +0.7693399824202060699463,0.5477633909322321414948,0.0962288742884993553162,\ + 0.9561171731911599636078,0.2207408566027879714966,0.0143259358592331409454,\ + 0.8191489772871136665344,0.1304992842487990856171,\ +0.9682003557682037353516,0.6561381467618048191071,0.2445538965985178947449,\ + 0.5283123566769063472748,0.8468925636261701583862,0.7876622085459530353546,\ + 0.1262082615867257118225,0.7883860985748469829559,\ +0.3453042469918727874756,0.2659857333637773990631,0.9709818651899695396423,\ + 0.8875247663818299770355,0.2066752854734659194946,0.8525160965509712696075,\ + 0.6744697811082005500794,0.9152874383144080638886} + +#define RES8 0.1359018266554544440705 + +#define IN10 {0.0284859761595726013184,0.2367841475643217563629,0.7015343559905886650085,\ + 0.1202526628039777278900,0.8287412133067846298218,0.3161072959192097187042,\ + 0.5305190766230225563049,0.5715174819342792034149,0.0478015430271625518799,\ + 0.8248619721271097660065,\ +0.5798843121156096458435,0.2791808298788964748383,0.9545110929757356643677,\ + 0.9071154636330902576447,0.3360149310901761054993,0.1175613063387572765350,\ + 0.9253723770380020141602,0.7263671257533133029938,0.9009497938677668571472,\ + 0.3948993249796330928803,\ +0.5655179750174283981323,0.7061489676125347614288,0.6787831196561455726624,\ + 0.413293636869639158249,0.1402290873229503631592,0.4952356130816042423248,\ + 0.4194877287372946739197,0.8626222289167344570160,0.2857509646564722061157,\ + 0.2512136367149651050568,\ +0.3389101596549153327942,0.3921975973062217235565,0.4681552127003669738770,\ + 0.3361602746881544589996,0.5336876614019274711609,0.2039063959382474422455,\ + 0.1589989718049764633179,0.0181815107353031635284,0.4098370606079697608948,\ + 0.0105834598653018474579,\ +0.1965309716761112213135,0.2725595370866358280182,0.3437655037268996238709,\ + 0.2033702037297189235687,0.3011944610625505447388,0.2762595904059708118439,\ + 0.2944530742242932319641,0.5718073952011764049530,0.2141770124435424804688,\ + 0.6895461627282202243805,\ +0.5855572847649455070496,0.4204123034141957759857,0.4277572017163038253784,\ + 0.318458587396889925003,0.5761894444003701210022,0.4254902224056422710419,\ + 0.9761981628835201263428,0.2518960000015795230866,0.4391129007562994956970,\ + 0.075930369552224874496,\ +0.2559380177408456802368,0.0670616743154823780060,0.7651131572201848030090,\ + 0.0417361590079963207245,0.3438271805644035339356,0.1970167332328855991364,\ + 0.2122898651286959648132,0.3140398501418530941010,0.7821625377982854843140,\ + 0.0540932347066700458527,\ +0.9190206909552216529846,0.4603515709750354290009,0.2992685027420520782471,\ + 0.0029166326858103275299,0.8993470584973692893982,0.8387927166186273097992,\ + 0.4343749452382326126099,0.7767876130528748035431,0.1395317660644650459290,\ + 0.1150637227110564708710,\ +0.5355419963598251342773,0.4311733045615255832672,0.614538478665053844452,\ + 0.9258962138555943965912,0.0993817280977964401245,0.4280578647740185260773,\ + 0.9431830951943993568420,0.0327395270578563213348,0.9213267080485820770264,\ + 0.9449024409987032413483,\ +0.9007069906219840049744,0.8094316101633012294769,0.0251954291015863418579,\ + 0.0019645062275230884552,0.5075221331790089607239,0.4076042952947318553925,\ + 0.8408046141266822814941,0.501726570073515176773,0.9128780765458941459656,\ + 0.4435729472897946834564} + +#define RES10 -0.0105698586359502730292 + + + + +#define ZINR2 {0.9625065480358898639679,0.9798011491075158119202,\ +0.0785698364488780498505,0.9150031916797161102295} +#define ZINI2 {0.6172610134817659854889,0.9964194735512137413025,\ +0.0468598580919206142426,0.9245926234871149063110} +#define ZRESR2 0.2796908427268796071274 +#define ZRESI2 1.3305203939304277582778 + +#define ZINR3 {0.9689865079708397388458,0.4916289718821644783020,0.2977053108625113964081,\ +0.0603054538369178771973,0.631347181741148233414,0.0241030259057879447937,\ +0.1527438252232968807221,0.9481177683919668197632,0.2744265575893223285675} +#define ZINI3 {0.4794727200642228126526,0.485576837789267301559,0.676400367170572280884,\ +0.8321249918080866336823,0.0125875836238265037537,0.5453779897652566432953,\ +0.8426716942340135574341,0.9029165101237595081329,0.4409482078626751899719} +#define ZRESR3 0.3208274162176448784933 +#define ZRESI3 -0.5045627162227295237074 + +#define ZINR4 {0.8332359003834426403046,0.7233976423740386962891,0.4377150186337530612946,\ + 0.3080607382580637931824,\ +0.8749813153408467769623,0.5355882328003644943237,0.3085998897440731525421,\ + 0.3354632416740059852600,\ +0.2342486302368342876434,0.2589411698281764984131,0.8521509231068193912506,\ + 0.4821739485487341880798,\ +0.6095217890106141567230,0.9872822705656290054321,0.9811426815576851367950,\ + 0.3303113700821995735169} +#define ZINI4 {0.3589145573787391185761,0.2780527696013450622559,0.9583482020534574985504,\ + 0.0156362904235720634460,\ +0.2964351712726056575775,0.4685934986919164657593,0.4262020816095173358917,\ + 0.4217656338587403297424,\ +0.1034853602759540081024,0.4279759414494037628174,0.7860729382373392581940,\ + 0.8568082069978117942810,\ +0.1993437460623681545258,0.7131301630288362503052,0.5208952468819916248322,\ + 0.9311723159626126289368} +#define ZRESR4 0.5916307061533252475982 +#define ZRESI4 -0.104762389048400544889 + +#define ZINR5 {0.4143836158327758312225,0.5980196148157119750977,0.5549105503596365451813,\ + 0.8552952585741877555847,0.3097750707529485225678,\ +0.9446128141134977340698,0.2442680452950298786163,0.8760446915403008460999,\ + 0.4874215493910014629364,0.3844018988311290740967,\ +0.0922345430590212345123,0.0705418726429343223572,0.7338807261548936367035,\ + 0.7792180571705102920532,0.7827638057060539722443,\ +0.2161567779257893562317,0.3420197847299277782440,0.430093832314014434814,\ + 0.6261752569116652011871,0.9554250938817858695984,\ +0.45415506651625037193,0.0029223021119832992554,0.0106920679099857807159,\ + 0.9746370846405625343323,0.7704260940663516521454} +#define ZINI5 {0.6396631337702274322510,0.9535886184312403202057,0.4148483341559767723084,\ + 0.4661539695225656032562,0.2238455135375261306763,\ +0.3456973326392471790314,0.2340623633936047554016,0.6619341480545699596405,\ + 0.2691179513931274414063,0.9830248900689184665680,\ +0.7393351225182414054871,0.2902135862968862056732,0.3995949607342481613159,\ + 0.9792278115637600421906,0.0075513580814003944397,\ +0.7021022657863795757294,0.8907506130635738372803,0.6526974202133715152741,\ + 0.4136228552088141441345,0.8581690913997590541840,\ +0.2396089676767587661743,0.4820041772909462451935,0.9848585547879338264465,\ + 0.4469721647910773754120,0.2329813763499259948731} +#define ZRESR5 -0.2050520846829704535441 +#define ZRESI5 1.3442626005968567604043 + +#define ZINR6 {0.2234513931907713413239,0.8002565456554293632507,0.7750734328292310237885,\ + 0.4825006630271673202515,0.7844883133657276630402,0.1534679317846894264221,\ +0.7722877110354602336884,0.8952021785080432891846,0.9467325792647898197174,\ + 0.6981825744733214378357,0.9559160820208489894867,0.0484017301350831985474,\ +0.5323520642705261707306,0.2946867095306515693665,0.6977136689238250255585,\ + 0.9376203864812850952148,0.1075560846365988254547,0.7763424394652247428894,\ +0.6373417838476598262787,0.0663061570376157760620,0.8169459854252636432648,\ + 0.354739100672304630280,0.5860544512979686260223,0.3461025469005107879639,\ +0.4424751014448702335358,0.8822665056213736534119,0.7643693066202104091644,\ + 0.7764139864593744277954,0.2807680931873619556427,0.6908600600436329841614,\ +0.7174728694371879100800,0.372018136084079742432,0.9325496577657759189606,\ + 0.2256677551195025444031,0.7521101920865476131439,0.3074750658124685287476} +#define ZINI6 {0.5979326148517429828644,0.1923890346661210060120,0.2387088830582797527313,\ + 0.7470833100378513336182,0.9713153676129877567291,0.4370355373248457908630,\ +0.6224875054322183132172,0.3291327971965074539185,0.3296387386508285999298,\ + 0.2768637137487530708313,0.4872983503155410289764,0.7732046544551849365234,\ +0.9077521809376776218414,0.5012293187901377677918,0.5159545852802693843842,\ + 0.5792678873986005783081,0.154639363754540681839,0.7611137786880135536194,\ +0.6907917778007686138153,0.2873229347169399261475,0.9642531336285173892975,\ + 0.5660724332556128501892,0.5782137936912477016449,0.266342097893357276917,\ +0.4747098502703011035919,0.6073546530678868293762,0.0409730705432593822479,\ + 0.501256845891475677490,0.5295930975116789340973,0.6259458316490054130554,\ +0.2219352661632001399994,0.3467419948428869247437,0.3951167692430317401886,\ + 0.5442812526598572731018,0.1430782820098102092743,0.7165467627346515655518} +#define ZRESR6 0.0374364367907719236550 +#define ZRESI6 0.0027318151340892903034 + +#define ZINR8 {0.826897530350834131241,0.0803818320855498313904,0.7634756616316735744476,\ + 0.6771226990967988967896,0.0800866526551544666290,0.5631617354229092597961,\ + 0.8400143641047179698944,0.9142984896898269653320,\ +0.9566112258471548557282,0.1676578698679804801941,0.4345969124697148799896,\ + 0.0417516361922025680542,0.4832747434265911579132,0.2889312515035271644592,\ + 0.4115779171697795391083,0.2200270108878612518311,\ +0.3144670636393129825592,0.2733902474865317344666,0.7691849744878709316254,\ + 0.0548522863537073135376,0.4532337454147636890411,0.2262856932356953620911,\ + 0.1486739399842917919159,0.2435002401471138000488,\ +0.384454759303480386734,0.1141278846189379692078,0.3649685769341886043549,\ + 0.9379479344934225082398,0.2138825734145939350128,0.8807754451408982276917,\ + 0.3025345797650516033173,0.2935827709734439849854,\ +0.9067896143533289432526,0.7959460681304335594177,0.0202379724942147731781,\ + 0.1722054202109575271606,0.2199751031585037708283,0.7548991339281201362610,\ + 0.4089378821663558483124,0.4680796265602111816406,\ +0.420881266240030527115,0.7480402020737528800964,0.2455636872909963130951,\ + 0.0257788877934217453003,0.3875689213164150714874,0.2191973784938454627991,\ + 0.9874265412800014019013,0.6185800097882747650147,\ +0.1833024383522570133209,0.5313195576891303062439,0.1505152708850800991058,\ + 0.9561535362154245376587,0.6994940754957497119904,0.2583465399220585823059,\ + 0.6155266496352851390839,0.1903010532259941101074,\ +0.4607576900161802768707,0.5220010234043002128601,0.7053800462745130062103,\ + 0.8874893691390752792358,0.1858218242414295673370,0.0922524714842438697815,\ + 0.3779664481990039348602,0.9369315691292285919190} +#define ZINI8 {0.1980521664954721927643,0.4702028548344969749451,0.3778818598948419094086,\ + 0.3629649449139833450317,0.2793333870358765125275,0.6721442686393857002258,\ + 0.6908950763754546642304,0.5104757994413375854492,\ +0.0610603489913046360016,0.9335384247824549674988,0.1448998316191136837006,\ + 0.5721211265772581100464,0.5459886942990124225617,0.0516680190339684486389,\ + 0.5011013220064342021942,0.9260971657931804656982,\ +0.8546948046423494815826,0.5857099732384085655212,0.8791871047578752040863,\ + 0.2532048318535089492798,0.790395137388259172440,0.6329805525019764900208,\ + 0.8602323713712394237518,0.9019620195031166076660,\ +0.3158749365247786045075,0.4001023573800921440125,0.1110895960591733455658,\ + 0.4705127831548452377319,0.5362763185985386371613,0.2878431910648941993713,\ + 0.8740125591866672039032,0.0740833915770053863525,\ +0.2814957336522638797760,0.7083768015727400779724,0.1652647457085549831390,\ + 0.2667352575808763504028,0.8819408011622726917267,0.3537154989317059516907,\ + 0.0264621186070144176483,0.0861647427082061767578,\ +0.2313965209759771823883,0.1340646473690867424011,0.6724002673290669918060,\ + 0.1902998369187116622925,0.7307508592493832111359,0.5048490324988961219788,\ + 0.8791159312240779399872,0.5544437132775783538818,\ +0.2063297093845903873444,0.401161103509366512299,0.4559328979812562465668,\ + 0.6977151576429605484009,0.3965912279672920703888,0.498381090350449085236,\ + 0.1452422770671546459198,0.9075358733534812927246,\ +0.1009295457042753696442,0.0177189959213137626648,0.7937671481631696224213,\ + 0.4309146609157323837280,0.584337853360921144485,0.7954284632578492164612,\ + 0.1390615846030414104462,0.1012784726917743682861} +#define ZRESR8 -0.2866880544829432109211 +#define ZRESI8 -0.5082321435837643397449 + +#define ZINR10 {0.3316808626987040042877,0.8344425177201628684998,0.0549940518103539943695,\ + 0.3696003425866365432739,0.7453266424126923084259,0.0571811841800808906555,\ + 0.5999651807360351085663,0.2085741907358169555664,0.8798878290690481662750,\ + 0.4782809792086482048035,\ +0.7116099162958562374115,0.8585865031927824020386,0.8078222130425274372101,\ + 0.5159962782636284828186,0.8917340408079326152802,0.8842348866164684295654,\ + 0.70964269945397973061,0.6610225578770041465759,0.7252350724302232265472,\ + 0.510143497958779335022,\ +0.2824866441078484058380,0.2214915128424763679504,0.5767575385980308055878,\ + 0.7048253491520881652832,0.5607945644296705722809,0.3628880484029650688171,\ + 0.3088326244615018367767,0.9813414867967367172241,0.7428482254035770893097,\ + 0.1616391474381089210510,\ +0.3652521963231265544891,0.3835070468485355377197,0.1169181005097925662994,\ + 0.8911246126517653465271,0.0634272000752389431000,0.6263941843062639236450,\ + 0.6807702076621353626251,0.2588596837595105171204,0.4394804346375167369843,\ + 0.8598818778991699218750,\ +0.5482823201455175876617,0.8135995296761393547058,0.4898237003944814205170,\ + 0.0240026097744703292847,0.7369195525534451007843,0.2411156157031655311585,\ + 0.1529693226329982280731,0.2648359201848506927490,0.4298193217255175113678,\ + 0.7673939457163214683533,\ +0.8753260499797761440277,0.3796988371759653091431,0.3062356826849281787872,\ + 0.3880051793530583381653,0.1047293278388679027557,0.7603831812739372253418,\ + 0.0340930395759642124176,0.1423966242000460624695,0.5554559468291699886322,\ + 0.8031897451728582382202,\ +0.5183992316015064716339,0.1518561029806733131409,0.5884730662219226360321,\ + 0.2545093484222888946533,0.9992679939605295658112,0.6398976957425475120544,\ + 0.5506716123782098293304,0.4607007671147584915161,0.5933007937856018543243,\ + 0.6538193570449948310852,\ +0.4168340521864593029022,0.9910155385732650756836,0.3720780410803854465485,\ + 0.7061824081465601921082,0.5780865414999425411224,0.602319641038775444031,\ + 0.5715096746571362018585,0.0549629041925072669983,0.1205854485742747784,\ + 0.0143620483577251434326,\ +0.0257951230742037296295,0.8411248764023184776306,0.4381882525049149990082,\ + 0.4643401596695184707642,0.4197426405735313892365,0.8023654492571949958801,\ + 0.5228588166646659374237,0.5095121040940284729004,0.4531980180181562900543,\ + 0.7817818326875567436218,\ +0.776557037141174077988,0.0466059204190969467163,0.5113326688297092914581,\ + 0.7502101892605423927307,0.6883628661744296550751,0.0167756117880344390869,\ + 0.9345410899259150028229,0.5609863763675093650818,0.2205847105942666530609,\ + 0.7648540753871202468872} +#define ZINI10 {0.4816976976580917835236,0.1558785634115338325501,0.2476022052578628063202,\ + 0.5216529071331024169922,0.0805230387486517429352,0.4409417239949107170105,\ + 0.8911933614872395992279,0.9780590813606977462769,0.4588093762286007404327,\ + 0.5510440031066536903381,\ +0.0960960905067622661591,0.4196785055100917816162,0.7502556503750383853912,\ + 0.7218149593099951744080,0.2895541018806397914887,0.3907764498144388198853,\ + 0.6686618146486580371857,0.4877656819298863410950,0.4685971769504249095917,\ + 0.3562648519873619079590,\ +0.3442325466312468051910,0.4253307832404971122742,0.5588058172725141048431,\ + 0.3304864969104528427124,0.4157403339631855487824,0.1595822656527161598206,\ + 0.3883102680556476116180,0.9415460713207721710205,0.4722979352809488773346,\ + 0.8533652639016509056091,\ +0.1207739165984094142914,0.8999380934983491897583,0.4384902161546051502228,\ + 0.8976056622341275215149,0.4911110657267272472382,0.3402217179536819458008,\ + 0.9966153600253164768219,0.0215395865961909294128,0.6876890822313725948334,\ + 0.0044924151152372360229,\ +0.6397854541428387165070,0.5416147718206048011780,0.2247649203054606914520,\ + 0.7364005260169506072998,0.4496364505030214786530,0.9678138038143515586853,\ + 0.6489060199819505214691,0.2544666919857263565064,0.1923975017853081226349,\ + 0.6861492367461323738098,\ +0.4231455805711448192596,0.6734441593289375305176,0.8270696722902357578278,\ + 0.9360805852338671684265,0.8326222090981900691986,0.7424779590219259262085,\ + 0.0194640238769352436066,0.8016031915321946144104,0.2554539437405765056610,\ + 0.2688109613955020904541,\ +0.7558490769006311893463,0.4347589677199721336365,0.6425966522656381130219,\ + 0.6957868058234453201294,0.6499576461501419544220,0.2303190128877758979797,\ + 0.5504368054680526256561,0.3038997054100036621094,0.0371030517853796482086,\ + 0.1703881053254008293152,\ +0.5698686256073415279388,0.0036411266773939132690,0.4491547052748501300812,\ + 0.0576810697093605995178,0.4956056098453700542450,0.1888933442533016204834,\ + 0.5641230703331530094147,0.8562210192903876304627,0.0794764286838471889496,\ + 0.6196198705583810806274,\ +0.2241039988584816455841,0.8582094730809330940247,0.7114551994018256664276,\ + 0.8026027604937553405762,0.6153324418701231479645,0.8958183480426669120789,\ + 0.8721761344932019710541,0.8389767911285161972046,0.2040955354459583759308,\ + 0.3166538262739777565002,\ +0.7006825651042163372040,0.2073105163872241973877,0.5222550616599619388580,\ + 0.9416420971974730491638,0.52116033947095274925,0.4509841967374086380005,\ + 0.3961292845197021961212,0.7240869747474789619446,0.6724055963568389415741,\ + 0.2386146038770675659180} +#define ZRESR10 -0.0701164785573487325809 +#define ZRESI10 -0.3697118554850691296565 + +static void ddetermaTest(void){ + double in2[]=IN2; double res2=RES2; + double in3[]=IN3; double res3=RES3; + double in4[]=IN4; double res4=RES4; + double in5[]=IN5; double res5=RES5; + double in6[]=IN6; double res6=RES6; + double in8[]=IN8; double res8=RES8; + double in10[]=IN10; double res10=RES10; + double out2,out3,out4,out5,out6,out8,out10; + printf("\n >>> DDetermA <<<\n"); + out2=ddeterma(in2,2); + out3=ddeterma(in3,3); + out4=ddeterma(in4,4); + out5=ddeterma(in5,5); + out6=ddeterma(in6,6); + out8=ddeterma(in8,8); + out10=ddeterma(in10,10); + + assert((fabs(out2-res2)/fabs(out2))<3e-8); + assert((fabs(out3-res3)/fabs(out3))<3e-15); + assert((fabs(out4-res4)/fabs(out4))<3e-15); + assert((fabs(out5-res5)/fabs(out5))<3e-15); + assert((fabs(out6-res6)/fabs(out6))<3e-15); + assert((fabs(out8-res8)/fabs(out8))<3e-15); + assert((fabs(out10-res10)/fabs(out10))<3e-15); +} + +static void zdetermaTest(void){ + double inR2[]=ZINR2; double inI2[]=ZINI2; double resR2=ZRESR2; double resI2=ZRESI2; + double inR3[]=ZINR3; double inI3[]=ZINI3; double resR3=ZRESR3; double resI3=ZRESI3; + double inR4[]=ZINR4; double inI4[]=ZINI4; double resR4=ZRESR4; double resI4=ZRESI4; + double inR5[]=ZINR5; double inI5[]=ZINI5; double resR5=ZRESR5; double resI5=ZRESI5; + double inR6[]=ZINR6; double inI6[]=ZINI6; double resR6=ZRESR6; double resI6=ZRESI6; + double inR8[]=ZINR8; double inI8[]=ZINI8; double resR8=ZRESR8; double resI8=ZRESI8; + double inR10[]=ZINR10; double inI10[]=ZINI10; double resR10=ZRESR10; double resI10=ZRESI10; + doubleComplex out2,out3,out4,out5,out6,out8,out10; + doubleComplex *in2, *in3, *in4, *in5, *in6, *in8, *in10; + printf("\n >>> ZDetermA <<<\n"); + in2=DoubleComplexMatrix(inR2,inI2,4); + in3=DoubleComplexMatrix(inR3,inI3,9); + in4=DoubleComplexMatrix(inR4,inI4,16); + in5=DoubleComplexMatrix(inR5,inI5,25); + in6=DoubleComplexMatrix(inR6,inI6,36); + in8=DoubleComplexMatrix(inR8,inI8,64); + in10=DoubleComplexMatrix(inR10,inI10,100); + + out2=zdeterma(in2,2); + out3=zdeterma(in3,3); + out4=zdeterma(in4,4); + out5=zdeterma(in5,5); + out6=zdeterma(in6,6); + out8=zdeterma(in8,8); + out10=zdeterma(in10,10); + + + assert((fabs(zreals(out2)-resR2)/fabs(zreals(out2)))<3e-16); + assert((fabs(zimags(out2)-resI2)/fabs(zimags(out2)))<3e-16); + + assert((fabs(zreals(out3)-resR3)/fabs(zreals(out3)))<3e-16); + assert((fabs(zimags(out3)-resI3)/fabs(zimags(out3)))<1e-16); + + assert((fabs(zreals(out4)-resR4)/fabs(zreals(out4)))<3e-16); + assert((fabs(zimags(out4)-resI4)/fabs(zimags(out4)))<3e-15); + + assert((fabs(zreals(out5)-resR5)/fabs(zreals(out5)))<3e-15); + assert((fabs(zimags(out5)-resI5)/fabs(zimags(out5)))<3e-15); + + assert((fabs(zreals(out6)-resR6)/fabs(zreals(out6)))<3e-15); + assert((fabs(zimags(out6)-resI6)/fabs(zimags(out6)))<3e-12); + + assert((fabs(zreals(out8)-resR8)/fabs(zreals(out8)))<3e-15); + assert((fabs(zimags(out8)-resI8)/fabs(zimags(out8)))<3e-15); + + assert((fabs(zreals(out10)-resR10)/fabs(zreals(out10)))<3e-14); + assert((fabs(zimags(out10)-resI10)/fabs(zimags(out10)))<3e-15); +} + +static int determTest(void){ + printf("\n >>> Double Determ <<<\n"); + ddetermaTest(); + zdetermaTest(); + return 0; +} + + +int main (void){ + assert(determTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/determ/testFloatDeterm.c b/src/c/matrixOperations/determ/testFloatDeterm.c new file mode 100644 index 0000000..d429d02 --- /dev/null +++ b/src/c/matrixOperations/determ/testFloatDeterm.c @@ -0,0 +1,453 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include +#include "determ.h" + + + +#define IN2 {0.1998337740078568458557f,0.5618660743348300457001f,\ +0.5896177329123020172119f,0.6853979662992060184479f} + +#define RES2 -0.1943205386467572182152f + +#define IN3 {0.8906224733218550682068f,0.5042212805710732936859f,0.3493615407496690750122f,\ +0.3873778772540390491486f,0.9222898678854107856751f,0.9488184261135756969452f,\ +0.3435337245464324951172f,0.3760118731297552585602f,0.7340940563008189201355f} + +#define RES3 0.2464108526639412488635f + +#define IN4 {0.2615761472843587398529f,0.4993493836373090744019f,0.2638578419573605060577f,\ + 0.5253563085570931434631f,\ +0.5376229803077876567841f,0.1199925504624843597412f,0.2256303490139544010162f,\ + 0.6274093082174658775330f,\ +0.7608432597480714321137f,0.0485566202551126480103f,0.6723949727602303028107f,\ + 0.2017172696068882942200f,\ +0.3911573919467628002167f,0.8300316557288169860840f,0.5878720157779753208160f,\ + 0.4829179299995303153992f} + +#define RES4 0.0079215378363537460038f + +#define IN5 {0.2232865034602582454681f,0.8400885667651891708374f,0.1205995907075703144074f,\ + 0.2855364168062806129456f,0.8607514644972980022430f,\ +0.8494101651012897491455f,0.5257060811854898929596f,0.9931209897622466087341f,\ + 0.6488562873564660549164f,0.9923190940171480178833f,\ +0.0500419777818024158478f,0.7485506581142544746399f,0.4104058998636901378632f,\ + 0.6084526330232620239258f,0.8544210889376699924469f,\ +0.0642646728083491325378f,0.8279082938097417354584f,0.9262343775480985641480f,\ + 0.5667211269028484821320f,0.5711638936772942543030f,\ +0.8160110483877360820770f,0.0568927936255931854248f,0.5595936686731874942780f,\ + 0.1249340316280722618103f,0.7279222286306321620941f} + +#define RES5 0.0501241717143536200108f + +#define IN6 {0.2677766475826501846314f,0.5465334919281303882599f,0.9885407658293843269348f,\ + 0.7395656588487327098846f,0.0037173107266426086426f,0.5900572859682142734528f,\ +0.3096467358991503715515f,0.2552205710671842098236f,0.6251879390329122543335f,\ + 0.1157417376525700092316f,0.6117004090920090675354f,0.6783956284634768962860f,\ +0.3320095278322696685791f,0.0258709923364222049713f,0.5174468224868178367615f,\ + 0.3916873238049447536469f,0.2413538414984941482544f,0.5064434898085892200470f,\ +0.4236102001741528511047f,0.2893727528862655162811f,0.0887932181358337402344f,\ + 0.6212881752289831638336f,0.3454984454438090324402f,0.7064867629669606685638f,\ +0.5211472492665052413940f,0.2870400850661098957062f,0.6502795079723000526428f,\ + 0.0881334762088954448700f,0.4498763345181941986084f,0.722725308034569025040f,\ +0.8976796260103583335877f,0.2427821881137788295746f,0.4337721113115549087524f,\ + 0.9677053210325539112091f,0.5068534435704350471497f,0.523297640960663557053f} + +#define RES6 -0.0275938917848303037761f + +#define IN8 {0.5596947595477104187012f,0.5617307000793516635895f,0.468176002614200115204f,\ + 0.7794546722434461116791f,0.7901071812957525253296f,0.9808542062528431415558f,\ + 0.8187066102400422096252f,0.4256872381083667278290f,\ +0.2461560554802417755127f,0.922953246627002954483f,0.1000745808705687522888f,\ + 0.4678218117915093898773f,0.3950497675687074661255f,0.0366117102093994617462f,\ + 0.5175368534401059150696f,0.8325451570563018321991f,\ +0.6104832142591476440430f,0.1871111788786947727203f,0.0189574835821986198425f,\ + 0.8433564766310155391693f,0.0748594831675291061401f,0.8532815133221447467804f,\ + 0.0124590108171105384827f,0.1867539356462657451630f,\ +0.4920584075152873992920f,0.7489608139730989933014f,0.9414957007393240928650f,\ + 0.212405560072511434555f,0.5795019958168268203735f,0.2628147569485008716583f,\ + 0.4360986622050404548645f,0.9110545101575553417206f,\ +0.8082667365670204162598f,0.8102653049863874912262f,0.2590428395196795463562f,\ + 0.4139087288640439510346f,0.3599927779287099838257f,0.6912787933833897113800f,\ + 0.7656858796253800392151f,0.3572649653069674968720f,\ +0.7693399824202060699463f,0.5477633909322321414948f,0.0962288742884993553162f,\ + 0.9561171731911599636078f,0.2207408566027879714966f,0.0143259358592331409454f,\ + 0.8191489772871136665344f,0.1304992842487990856171f,\ +0.9682003557682037353516f,0.6561381467618048191071f,0.2445538965985178947449f,\ + 0.5283123566769063472748f,0.8468925636261701583862f,0.7876622085459530353546f,\ + 0.1262082615867257118225f,0.7883860985748469829559f,\ +0.3453042469918727874756f,0.2659857333637773990631f,0.9709818651899695396423f,\ + 0.8875247663818299770355f,0.2066752854734659194946f,0.8525160965509712696075f,\ + 0.6744697811082005500794f,0.9152874383144080638886f} + +#define RES8 0.1359018266554544440705f + +#define IN10 {0.0284859761595726013184f,0.2367841475643217563629f,0.7015343559905886650085f,\ + 0.1202526628039777278900f,0.8287412133067846298218f,0.3161072959192097187042f,\ + 0.5305190766230225563049f,0.5715174819342792034149f,0.0478015430271625518799f,\ + 0.8248619721271097660065f,\ +0.5798843121156096458435f,0.2791808298788964748383f,0.9545110929757356643677f,\ + 0.9071154636330902576447f,0.3360149310901761054993f,0.1175613063387572765350f,\ + 0.9253723770380020141602f,0.7263671257533133029938f,0.9009497938677668571472f,\ + 0.3948993249796330928803f,\ +0.5655179750174283981323f,0.7061489676125347614288f,0.6787831196561455726624f,\ + 0.413293636869639158249f,0.1402290873229503631592f,0.4952356130816042423248f,\ + 0.4194877287372946739197f,0.8626222289167344570160f,0.2857509646564722061157f,\ + 0.2512136367149651050568f,\ +0.3389101596549153327942f,0.3921975973062217235565f,0.4681552127003669738770f,\ + 0.3361602746881544589996f,0.5336876614019274711609f,0.2039063959382474422455f,\ + 0.1589989718049764633179f,0.0181815107353031635284f,0.4098370606079697608948f,\ + 0.0105834598653018474579f,\ +0.1965309716761112213135f,0.2725595370866358280182f,0.3437655037268996238709f,\ + 0.2033702037297189235687f,0.3011944610625505447388f,0.2762595904059708118439f,\ + 0.2944530742242932319641f,0.5718073952011764049530f,0.2141770124435424804688f,\ + 0.6895461627282202243805f,\ +0.5855572847649455070496f,0.4204123034141957759857f,0.4277572017163038253784f,\ + 0.318458587396889925003f,0.5761894444003701210022f,0.4254902224056422710419f,\ + 0.9761981628835201263428f,0.2518960000015795230866f,0.4391129007562994956970f,\ + 0.075930369552224874496f,\ +0.2559380177408456802368f,0.0670616743154823780060f,0.7651131572201848030090f,\ + 0.0417361590079963207245f,0.3438271805644035339356f,0.1970167332328855991364f,\ + 0.2122898651286959648132f,0.3140398501418530941010f,0.7821625377982854843140f,\ + 0.0540932347066700458527f,\ +0.9190206909552216529846f,0.4603515709750354290009f,0.2992685027420520782471f,\ + 0.0029166326858103275299f,0.8993470584973692893982f,0.8387927166186273097992f,\ + 0.4343749452382326126099f,0.7767876130528748035431f,0.1395317660644650459290f,\ + 0.1150637227110564708710f,\ +0.5355419963598251342773f,0.4311733045615255832672f,0.614538478665053844452f,\ + 0.9258962138555943965912f,0.0993817280977964401245f,0.4280578647740185260773f,\ + 0.9431830951943993568420f,0.0327395270578563213348f,0.9213267080485820770264f,\ + 0.9449024409987032413483f,\ +0.9007069906219840049744f,0.8094316101633012294769f,0.0251954291015863418579f,\ + 0.0019645062275230884552f,0.5075221331790089607239f,0.4076042952947318553925f,\ + 0.8408046141266822814941f,0.501726570073515176773f,0.9128780765458941459656f,\ + 0.4435729472897946834564f} + +#define RES10 -0.0105698586359502730292f + + + + +#define CINR2 {0.9625065480358898639679f,0.9798011491075158119202f,\ +0.0785698364488780498505f,0.9150031916797161102295f} +#define CINI2 {0.6172610134817659854889f,0.9964194735512137413025f,\ +0.0468598580919206142426f,0.9245926234871149063110f} +#define CRESR2 0.2796908427268796071274f +#define CRESI2 1.3305203939304277582778f + +#define CINR3 {0.9689865079708397388458f,0.4916289718821644783020f,0.2977053108625113964081f,\ +0.0603054538369178771973f,0.631347181741148233414f,0.0241030259057879447937f,\ +0.1527438252232968807221f,0.9481177683919668197632f,0.2744265575893223285675f} +#define CINI3 {0.4794727200642228126526f,0.485576837789267301559f,0.676400367170572280884f,\ +0.8321249918080866336823f,0.0125875836238265037537f,0.5453779897652566432953f,\ +0.8426716942340135574341f,0.9029165101237595081329f,0.4409482078626751899719f} +#define CRESR3 0.3208274162176448784933f +#define CRESI3 -0.5045627162227295237074f + +#define CINR4 {0.8332359003834426403046f,0.7233976423740386962891f,0.4377150186337530612946f,\ + 0.3080607382580637931824f,\ +0.8749813153408467769623f,0.5355882328003644943237f,0.3085998897440731525421f,\ + 0.3354632416740059852600f,\ +0.2342486302368342876434f,0.2589411698281764984131f,0.8521509231068193912506f,\ + 0.4821739485487341880798f,\ +0.6095217890106141567230f,0.9872822705656290054321f,0.9811426815576851367950f,\ + 0.3303113700821995735169f} +#define CINI4 {0.3589145573787391185761f,0.2780527696013450622559f,0.9583482020534574985504f,\ + 0.0156362904235720634460f,\ +0.2964351712726056575775f,0.4685934986919164657593f,0.4262020816095173358917f,\ + 0.4217656338587403297424f,\ +0.1034853602759540081024f,0.4279759414494037628174f,0.7860729382373392581940f,\ + 0.8568082069978117942810f,\ +0.1993437460623681545258f,0.7131301630288362503052f,0.5208952468819916248322f,\ + 0.9311723159626126289368f} +#define CRESR4 0.5916307061533252475982f +#define CRESI4 -0.104762389048400544889f + +#define CINR5 {0.4143836158327758312225f,0.5980196148157119750977f,0.5549105503596365451813f,\ + 0.8552952585741877555847f,0.3097750707529485225678f,\ +0.9446128141134977340698f,0.2442680452950298786163f,0.8760446915403008460999f,\ + 0.4874215493910014629364f,0.3844018988311290740967f,\ +0.0922345430590212345123f,0.0705418726429343223572f,0.7338807261548936367035f,\ + 0.7792180571705102920532f,0.7827638057060539722443f,\ +0.2161567779257893562317f,0.3420197847299277782440f,0.430093832314014434814f,\ + 0.6261752569116652011871f,0.9554250938817858695984f,\ +0.45415506651625037193f,0.0029223021119832992554f,0.0106920679099857807159f,\ + 0.9746370846405625343323f,0.7704260940663516521454f} +#define CINI5 {0.6396631337702274322510f,0.9535886184312403202057f,0.4148483341559767723084f,\ + 0.4661539695225656032562f,0.2238455135375261306763f,\ +0.3456973326392471790314f,0.2340623633936047554016f,0.6619341480545699596405f,\ + 0.2691179513931274414063f,0.9830248900689184665680f,\ +0.7393351225182414054871f,0.2902135862968862056732f,0.3995949607342481613159f,\ + 0.9792278115637600421906f,0.0075513580814003944397f,\ +0.7021022657863795757294f,0.8907506130635738372803f,0.6526974202133715152741f,\ + 0.4136228552088141441345f,0.8581690913997590541840f,\ +0.2396089676767587661743f,0.4820041772909462451935f,0.9848585547879338264465f,\ + 0.4469721647910773754120f,0.2329813763499259948731f} +#define CRESR5 -0.2050520846829704535441f +#define CRESI5 1.3442626005968567604043f + +#define CINR6 {0.2234513931907713413239f,0.8002565456554293632507f,0.7750734328292310237885f,\ + 0.4825006630271673202515f,0.7844883133657276630402f,0.1534679317846894264221f,\ +0.7722877110354602336884f,0.8952021785080432891846f,0.9467325792647898197174f,\ + 0.6981825744733214378357f,0.9559160820208489894867f,0.0484017301350831985474f,\ +0.5323520642705261707306f,0.2946867095306515693665f,0.6977136689238250255585f,\ + 0.9376203864812850952148f,0.1075560846365988254547f,0.7763424394652247428894f,\ +0.6373417838476598262787f,0.0663061570376157760620f,0.8169459854252636432648f,\ + 0.354739100672304630280f,0.5860544512979686260223f,0.3461025469005107879639f,\ +0.4424751014448702335358f,0.8822665056213736534119f,0.7643693066202104091644f,\ + 0.7764139864593744277954f,0.2807680931873619556427f,0.6908600600436329841614f,\ +0.7174728694371879100800f,0.372018136084079742432f,0.9325496577657759189606f,\ + 0.2256677551195025444031f,0.7521101920865476131439f,0.3074750658124685287476f} +#define CINI6 {0.5979326148517429828644f,0.1923890346661210060120f,0.2387088830582797527313f,\ + 0.7470833100378513336182f,0.9713153676129877567291f,0.4370355373248457908630f,\ +0.6224875054322183132172f,0.3291327971965074539185f,0.3296387386508285999298f,\ + 0.2768637137487530708313f,0.4872983503155410289764f,0.7732046544551849365234f,\ +0.9077521809376776218414f,0.5012293187901377677918f,0.5159545852802693843842f,\ + 0.5792678873986005783081f,0.154639363754540681839f,0.7611137786880135536194f,\ +0.6907917778007686138153f,0.2873229347169399261475f,0.9642531336285173892975f,\ + 0.5660724332556128501892f,0.5782137936912477016449f,0.266342097893357276917f,\ +0.4747098502703011035919f,0.6073546530678868293762f,0.0409730705432593822479f,\ + 0.501256845891475677490f,0.5295930975116789340973f,0.6259458316490054130554f,\ +0.2219352661632001399994f,0.3467419948428869247437f,0.3951167692430317401886f,\ + 0.5442812526598572731018f,0.1430782820098102092743f,0.7165467627346515655518f} +#define CRESR6 0.0374364367907719236550f +#define CRESI6 0.0027318151340892903034f + +#define CINR8 {0.826897530350834131241f,0.0803818320855498313904f,0.7634756616316735744476f,\ + 0.6771226990967988967896f,0.0800866526551544666290f,0.5631617354229092597961f,\ + 0.8400143641047179698944f,0.9142984896898269653320f,\ +0.9566112258471548557282f,0.1676578698679804801941f,0.4345969124697148799896f,\ + 0.0417516361922025680542f,0.4832747434265911579132f,0.2889312515035271644592f,\ + 0.4115779171697795391083f,0.2200270108878612518311f,\ +0.3144670636393129825592f,0.2733902474865317344666f,0.7691849744878709316254f,\ + 0.0548522863537073135376f,0.4532337454147636890411f,0.2262856932356953620911f,\ + 0.1486739399842917919159f,0.2435002401471138000488f,\ +0.384454759303480386734f,0.1141278846189379692078f,0.3649685769341886043549f,\ + 0.9379479344934225082398f,0.2138825734145939350128f,0.8807754451408982276917f,\ + 0.3025345797650516033173f,0.2935827709734439849854f,\ +0.9067896143533289432526f,0.7959460681304335594177f,0.0202379724942147731781f,\ + 0.1722054202109575271606f,0.2199751031585037708283f,0.7548991339281201362610f,\ + 0.4089378821663558483124f,0.4680796265602111816406f,\ +0.420881266240030527115f,0.7480402020737528800964f,0.2455636872909963130951f,\ + 0.0257788877934217453003f,0.3875689213164150714874f,0.2191973784938454627991f,\ + 0.9874265412800014019013f,0.6185800097882747650147f,\ +0.1833024383522570133209f,0.5313195576891303062439f,0.1505152708850800991058f,\ + 0.9561535362154245376587f,0.6994940754957497119904f,0.2583465399220585823059f,\ + 0.6155266496352851390839f,0.1903010532259941101074f,\ +0.4607576900161802768707f,0.5220010234043002128601f,0.7053800462745130062103f,\ + 0.8874893691390752792358f,0.1858218242414295673370f,0.0922524714842438697815f,\ + 0.3779664481990039348602f,0.9369315691292285919190f} +#define CINI8 {0.1980521664954721927643f,0.4702028548344969749451f,0.3778818598948419094086f,\ + 0.3629649449139833450317f,0.2793333870358765125275f,0.6721442686393857002258f,\ + 0.6908950763754546642304f,0.5104757994413375854492f,\ +0.0610603489913046360016f,0.9335384247824549674988f,0.1448998316191136837006f,\ + 0.5721211265772581100464f,0.5459886942990124225617f,0.0516680190339684486389f,\ + 0.5011013220064342021942f,0.9260971657931804656982f,\ +0.8546948046423494815826f,0.5857099732384085655212f,0.8791871047578752040863f,\ + 0.2532048318535089492798f,0.790395137388259172440f,0.6329805525019764900208f,\ + 0.8602323713712394237518f,0.9019620195031166076660f,\ +0.3158749365247786045075f,0.4001023573800921440125f,0.1110895960591733455658f,\ + 0.4705127831548452377319f,0.5362763185985386371613f,0.2878431910648941993713f,\ + 0.8740125591866672039032f,0.0740833915770053863525f,\ +0.2814957336522638797760f,0.7083768015727400779724f,0.1652647457085549831390f,\ + 0.2667352575808763504028f,0.8819408011622726917267f,0.3537154989317059516907f,\ + 0.0264621186070144176483f,0.0861647427082061767578f,\ +0.2313965209759771823883f,0.1340646473690867424011f,0.6724002673290669918060f,\ + 0.1902998369187116622925f,0.7307508592493832111359f,0.5048490324988961219788f,\ + 0.8791159312240779399872f,0.5544437132775783538818f,\ +0.2063297093845903873444f,0.401161103509366512299f,0.4559328979812562465668f,\ + 0.6977151576429605484009f,0.3965912279672920703888f,0.498381090350449085236f,\ + 0.1452422770671546459198f,0.9075358733534812927246f,\ +0.1009295457042753696442f,0.0177189959213137626648f,0.7937671481631696224213f,\ + 0.4309146609157323837280f,0.584337853360921144485f,0.7954284632578492164612f,\ + 0.1390615846030414104462f,0.1012784726917743682861f} +#define CRESR8 -0.2866880544829432109211f +#define CRESI8 -0.5082321435837643397449f + +#define CINR10 {0.3316808626987040042877f,0.8344425177201628684998f,0.0549940518103539943695f,\ + 0.3696003425866365432739f,0.7453266424126923084259f,0.0571811841800808906555f,\ + 0.5999651807360351085663f,0.2085741907358169555664f,0.8798878290690481662750f,\ + 0.4782809792086482048035f,\ +0.7116099162958562374115f,0.8585865031927824020386f,0.8078222130425274372101f,\ + 0.5159962782636284828186f,0.8917340408079326152802f,0.8842348866164684295654f,\ + 0.70964269945397973061f,0.6610225578770041465759f,0.7252350724302232265472f,\ + 0.510143497958779335022f,\ +0.2824866441078484058380f,0.2214915128424763679504f,0.5767575385980308055878f,\ + 0.7048253491520881652832f,0.5607945644296705722809f,0.3628880484029650688171f,\ + 0.3088326244615018367767f,0.9813414867967367172241f,0.7428482254035770893097f,\ + 0.1616391474381089210510f,\ +0.3652521963231265544891f,0.3835070468485355377197f,0.1169181005097925662994f,\ + 0.8911246126517653465271f,0.0634272000752389431000f,0.6263941843062639236450f,\ + 0.6807702076621353626251f,0.2588596837595105171204f,0.4394804346375167369843f,\ + 0.8598818778991699218750f,\ +0.5482823201455175876617f,0.8135995296761393547058f,0.4898237003944814205170f,\ + 0.0240026097744703292847f,0.7369195525534451007843f,0.2411156157031655311585f,\ + 0.1529693226329982280731f,0.2648359201848506927490f,0.4298193217255175113678f,\ + 0.7673939457163214683533f,\ +0.8753260499797761440277f,0.3796988371759653091431f,0.3062356826849281787872f,\ + 0.3880051793530583381653f,0.1047293278388679027557f,0.7603831812739372253418f,\ + 0.0340930395759642124176f,0.1423966242000460624695f,0.5554559468291699886322f,\ + 0.8031897451728582382202f,\ +0.5183992316015064716339f,0.1518561029806733131409f,0.5884730662219226360321f,\ + 0.2545093484222888946533f,0.9992679939605295658112f,0.6398976957425475120544f,\ + 0.5506716123782098293304f,0.4607007671147584915161f,0.5933007937856018543243f,\ + 0.6538193570449948310852f,\ +0.4168340521864593029022f,0.9910155385732650756836f,0.3720780410803854465485f,\ + 0.7061824081465601921082f,0.5780865414999425411224f,0.602319641038775444031f,\ + 0.5715096746571362018585f,0.0549629041925072669983f,0.1205854485742747784f,\ + 0.0143620483577251434326f,\ +0.0257951230742037296295f,0.8411248764023184776306f,0.4381882525049149990082f,\ + 0.4643401596695184707642f,0.4197426405735313892365f,0.8023654492571949958801f,\ + 0.5228588166646659374237f,0.5095121040940284729004f,0.4531980180181562900543f,\ + 0.7817818326875567436218f,\ +0.776557037141174077988f,0.0466059204190969467163f,0.5113326688297092914581f,\ + 0.7502101892605423927307f,0.6883628661744296550751f,0.0167756117880344390869f,\ + 0.9345410899259150028229f,0.5609863763675093650818f,0.2205847105942666530609f,\ + 0.7648540753871202468872f} +#define CINI10 {0.4816976976580917835236f,0.1558785634115338325501f,0.2476022052578628063202f,\ + 0.5216529071331024169922f,0.0805230387486517429352f,0.4409417239949107170105f,\ + 0.8911933614872395992279f,0.9780590813606977462769f,0.4588093762286007404327f,\ + 0.5510440031066536903381f,\ +0.0960960905067622661591f,0.4196785055100917816162f,0.7502556503750383853912f,\ + 0.7218149593099951744080f,0.2895541018806397914887f,0.3907764498144388198853f,\ + 0.6686618146486580371857f,0.4877656819298863410950f,0.4685971769504249095917f,\ + 0.3562648519873619079590f,\ +0.3442325466312468051910f,0.4253307832404971122742f,0.5588058172725141048431f,\ + 0.3304864969104528427124f,0.4157403339631855487824f,0.1595822656527161598206f,\ + 0.3883102680556476116180f,0.9415460713207721710205f,0.4722979352809488773346f,\ + 0.8533652639016509056091f,\ +0.1207739165984094142914f,0.8999380934983491897583f,0.4384902161546051502228f,\ + 0.8976056622341275215149f,0.4911110657267272472382f,0.3402217179536819458008f,\ + 0.9966153600253164768219f,0.0215395865961909294128f,0.6876890822313725948334f,\ + 0.0044924151152372360229f,\ +0.6397854541428387165070f,0.5416147718206048011780f,0.2247649203054606914520f,\ + 0.7364005260169506072998f,0.4496364505030214786530f,0.9678138038143515586853f,\ + 0.6489060199819505214691f,0.2544666919857263565064f,0.1923975017853081226349f,\ + 0.6861492367461323738098f,\ +0.4231455805711448192596f,0.6734441593289375305176f,0.8270696722902357578278f,\ + 0.9360805852338671684265f,0.8326222090981900691986f,0.7424779590219259262085f,\ + 0.0194640238769352436066f,0.8016031915321946144104f,0.2554539437405765056610f,\ + 0.2688109613955020904541f,\ +0.7558490769006311893463f,0.4347589677199721336365f,0.6425966522656381130219f,\ + 0.6957868058234453201294f,0.6499576461501419544220f,0.2303190128877758979797f,\ + 0.5504368054680526256561f,0.3038997054100036621094f,0.0371030517853796482086f,\ + 0.1703881053254008293152f,\ +0.5698686256073415279388f,0.0036411266773939132690f,0.4491547052748501300812f,\ + 0.0576810697093605995178f,0.4956056098453700542450f,0.1888933442533016204834f,\ + 0.5641230703331530094147f,0.8562210192903876304627f,0.0794764286838471889496f,\ + 0.6196198705583810806274f,\ +0.2241039988584816455841f,0.8582094730809330940247f,0.7114551994018256664276f,\ + 0.8026027604937553405762f,0.6153324418701231479645f,0.8958183480426669120789f,\ + 0.8721761344932019710541f,0.8389767911285161972046f,0.2040955354459583759308f,\ + 0.3166538262739777565002f,\ +0.7006825651042163372040f,0.2073105163872241973877f,0.5222550616599619388580f,\ + 0.9416420971974730491638f,0.52116033947095274925f,0.4509841967374086380005f,\ + 0.3961292845197021961212f,0.7240869747474789619446f,0.6724055963568389415741f,\ + 0.2386146038770675659180f} +#define CRESR10 -0.0701164785573487325809f +#define CRESI10 -0.3697118554850691296565f + + +static void sdetermaTest(void){ + float in2[]=IN2; float res2=RES2; + float in3[]=IN3; float res3=RES3; + float in4[]=IN4; float res4=RES4; + float in5[]=IN5; float res5=RES5; + float in6[]=IN6; float res6=RES6; + float in8[]=IN8; float res8=RES8; + float in10[]=IN10; float res10=RES10; + float out2,out3,out4,out5,out6,out8,out10; + + out2=sdeterma(in2,2); + out3=sdeterma(in3,3); + out4=sdeterma(in4,4); + out5=sdeterma(in5,5); + out6=sdeterma(in6,6); + out8=sdeterma(in8,8); + out10=sdeterma(in10,10); + + assert((fabs(out2-res2)/fabs(out2))<1e-6); + assert((fabs(out3-res3)/fabs(out3))<1e-7); + assert((fabs(out4-res4)/fabs(out4))<3e-6); + assert((fabs(out5-res5)/fabs(out5))<1e-6); + assert((fabs(out6-res6)/fabs(out6))<1e-6); + assert((fabs(out8-res8)/fabs(out8))<1e-6); + assert((fabs(out10-res10)/fabs(out10))<3e-6); + +} + +static void cdetermaTest(void){ + float inR2[]=CINR2; float inI2[]=CINI2; float resR2=CRESR2; float resI2=CRESI2; + float inR3[]=CINR3; float inI3[]=CINI3; float resR3=CRESR3; float resI3=CRESI3; + float inR4[]=CINR4; float inI4[]=CINI4; float resR4=CRESR4; float resI4=CRESI4; + float inR5[]=CINR5; float inI5[]=CINI5; float resR5=CRESR5; float resI5=CRESI5; + float inR6[]=CINR6; float inI6[]=CINI6; float resR6=CRESR6; float resI6=CRESI6; + float inR8[]=CINR8; float inI8[]=CINI8; float resR8=CRESR8; float resI8=CRESI8; + float inR10[]=CINR10; float inI10[]=CINI10; float resR10=CRESR10; float resI10=CRESI10; + floatComplex out2,out3,out4,out5,out6,out8,out10; + floatComplex *in2, *in3, *in4, *in5, *in6, *in8, *in10; + + in2=FloatComplexMatrix(inR2,inI2,4); + in3=FloatComplexMatrix(inR3,inI3,9); + in4=FloatComplexMatrix(inR4,inI4,16); + in5=FloatComplexMatrix(inR5,inI5,25); + in6=FloatComplexMatrix(inR6,inI6,36); + in8=FloatComplexMatrix(inR8,inI8,64); + in10=FloatComplexMatrix(inR10,inI10,100); + + out2=cdeterma(in2,2); + out3=cdeterma(in3,3); + out4=cdeterma(in4,4); + out5=cdeterma(in5,5); + out6=cdeterma(in6,6); + out8=cdeterma(in8,8); + out10=cdeterma(in10,10); + + + assert((fabs(creals(out2)-resR2)/fabs(creals(out2)))<1e-6); + assert((fabs(cimags(out2)-resI2)/fabs(cimags(out2)))<1e-6); + + assert((fabs(creals(out3)-resR3)/fabs(creals(out3)))<1e-6); + assert((fabs(cimags(out3)-resI3)/fabs(cimags(out3)))<1e-6); + + assert((fabs(creals(out4)-resR4)/fabs(creals(out4)))<1e-6); + assert((fabs(cimags(out4)-resI4)/fabs(cimags(out4)))<1e-6); + + assert((fabs(creals(out5)-resR5)/fabs(creals(out5)))<3e-6); + assert((fabs(cimags(out5)-resI5)/fabs(cimags(out5)))<1e-6); + + assert((fabs(creals(out6)-resR6)/fabs(creals(out6)))<1e-6); + assert((fabs(cimags(out6)-resI6)/fabs(cimags(out6)))<3e-6); + + assert((fabs(creals(out8)-resR8)/fabs(creals(out8)))<1e-6); + assert((fabs(cimags(out8)-resI8)/fabs(cimags(out8)))<1e-6); + + assert((fabs(creals(out10)-resR10)/fabs(creals(out10)))<3e-6); + assert((fabs(cimags(out10)-resI10)/fabs(cimags(out10)))<1e-6); +} + +static int determTest(void){ + printf("\n >>> Float Determ <<<\n"); + sdetermaTest(); + cdetermaTest(); + return 0; +} + + +int main (void){ + assert(determTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj b/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj new file mode 100644 index 0000000..5a221ab --- /dev/null +++ b/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7F13C8AE-27AC-43B4-8C1E-263C5A4C9942} + testDoubleDeterm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters b/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters new file mode 100644 index 0000000..71bf090 --- /dev/null +++ b/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj b/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj new file mode 100644 index 0000000..8131ad9 --- /dev/null +++ b/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3F1C1C41-424E-4E23-8990-AEB55196376D} + testDoubleDist + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters b/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters new file mode 100644 index 0000000..71bf090 --- /dev/null +++ b/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj b/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj new file mode 100644 index 0000000..e80f9c1 --- /dev/null +++ b/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {204A5126-03B1-4E9D-8CC1-CCA9F64BD081} + testFloatDeterm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters b/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters new file mode 100644 index 0000000..df479e8 --- /dev/null +++ b/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/determ/u16determa.c b/src/c/matrixOperations/determ/u16determa.c new file mode 100644 index 0000000..5e859d4 --- /dev/null +++ b/src/c/matrixOperations/determ/u16determa.c @@ -0,0 +1,92 @@ +/* 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 +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" +#include "lapack.h" + +uint16 u16determa(uint16 * in, int size){ +#ifndef WITHOUT_LAPACK + int i=0, info=0; + uint16 out=0; + uint16 *inCopy=NULL; + int* tmp=NULL; + + /*Calculation of the determinant*/ + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(uint16*)malloc((unsigned int)(size*size)*sizeof(uint16)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" +#include "lapack.h" + +uint8 u8determa(uint8 * in, int size){ +#ifndef WITHOUT_LAPACK + int i=0, info=0; + uint8 out=0; + uint8 *inCopy=NULL; + int* tmp=NULL; + + /*Calculation of the determinant*/ + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(uint8*)malloc((unsigned int)(size*size)*sizeof(uint8)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "division.h" +#endif +#include "determ.h" +#include "multiplication.h" +#include "subtraction.h" +#include "addition.h" + + +doubleComplex zdeterma(doubleComplex * in, int size){ +#ifndef WITHOUT_LAPACK + doubleComplex tmp1,tmp2,out; + int i=0,info=0; + doubleComplex *inCopy; + int* vectPivot; + + switch(size){ + case 2 : out = zdiffs(zmuls(in[0],in[3]),zmuls(in[1],in[2])); + break; + case 3 : /*regle de Sarrus*/ + out=DoubleComplex(0,0); + /*Addition Part*/ + tmp1 = zmuls(in[0],in[4]); + tmp2 = zmuls(tmp1,in[8]); + out = zadds(out,tmp2); + tmp1 = zmuls(in[1],in[5]); + tmp2 = zmuls(tmp1,in[6]); + out = zadds(out,tmp2); + tmp1 = zmuls(in[2],in[3]); + tmp2 = zmuls(tmp1,in[7]); + out = zadds(out,tmp2); + /*Subtraction Part*/ + tmp1 = zmuls(in[0],in[5]); + tmp2 = zmuls(tmp1,in[7]); + out = zdiffs(out,tmp2); + tmp1 = zmuls(in[1],in[3]); + tmp2 = zmuls(tmp1,in[8]); + out = zdiffs(out,tmp2); + tmp1 = zmuls(in[2],in[4]); + tmp2 = zmuls(tmp1,in[6]); + out = zdiffs(out,tmp2); + break; + + default : + /*Allocate inCopy and Copy in in inCopy*/ + inCopy=(doubleComplex*)malloc((unsigned int)(size*size)*sizeof(doubleComplex)); + for (i=0;i _column) + { + + if(extract_post >=0) + { + + for(j = extract_post; j < _column;j++) + { + + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + + } + else + { + + if((abs(extract_post) <= (_row - _column))) + { + for(j = 0; j < _column ; j++) + { + out[j] = in[((_row+1)*j)-extract_post]; + + } + } + else + { + + for(j=0; j < (_row + extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + } + + + + } + + } + + } + else if (_row < _column) + { + + if(extract_post > 0) + { + if((extract_post <= (_column - _row))) + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + else + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + + } + else + { + + + for(j=0;j < (_row+extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + + + } + + + + } + + + } + + +} + diff --git a/src/c/matrixOperations/diag/ddiagexs.c b/src/c/matrixOperations/diag/ddiagexs.c new file mode 100644 index 0000000..4e9ca5e --- /dev/null +++ b/src/c/matrixOperations/diag/ddiagexs.c @@ -0,0 +1,53 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +double ddiagexs(double *in, int _row,int _column,int extract_post) +{ + + if(_row == _column) + { + + if(extract_post < 0) + { + + return in[_row-1] ; + } + else + { + + return in[(_row)*(_row-1)] ; + + } + } + + else + { + + if(extract_post < 0) + { + + return in[_row-1]; + + } + else + { + return in[(_row)*(_column-1)]; + + } + + + + } + +} + diff --git a/src/c/matrixOperations/diag/ddiagina.c b/src/c/matrixOperations/diag/ddiagina.c new file mode 100644 index 0000000..243aba1 --- /dev/null +++ b/src/c/matrixOperations/diag/ddiagina.c @@ -0,0 +1,59 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void ddiagina(double *in, int _row,int _column,int insert_post,double *out) +{ + + int i, j; + if(_row == 1) + { + _column = _column; + + } + else + { + _column = _row; + + } + + for(i=0;i < ((_column+abs(insert_post))*(_column+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + + out[((_column+abs(insert_post))*j)+abs(insert_post)+j] = in[j]; + } + + } + else + { + for ( j = insert_post ; j < _column+insert_post ; j++ ) + { + + + out[((_column+insert_post)*j)-insert_post+j] = in[j-insert_post] ; + + } + } + +} + diff --git a/src/c/matrixOperations/diag/ddiagins.c b/src/c/matrixOperations/diag/ddiagins.c new file mode 100644 index 0000000..09cc921 --- /dev/null +++ b/src/c/matrixOperations/diag/ddiagins.c @@ -0,0 +1,37 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void ddiagins(double *in, int size,double *out) +{ + + int i, j; + for ( i = 0 ; i < size ; i++ ) + { + for ( j = 0 ; j < size ; j++ ) + { + if(i==j) + { + out[(size+1)*i] = in[i] ; + /* Because to replace the diagonal element with input matrix, (_coulmn+1)*i gives the diagonal postion for m*n matrix + i.e if 3*3 matrix then diagonal postion will be 0,4,6 and for 4*4 matrix diagonal postion will be 0,5,10,15 */ + + + } + + } + } + + + +} + diff --git a/src/c/matrixOperations/diag/ddiags.c b/src/c/matrixOperations/diag/ddiags.c new file mode 100644 index 0000000..bab2186 --- /dev/null +++ b/src/c/matrixOperations/diag/ddiags.c @@ -0,0 +1,20 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +double ddiags(double in) +{ + + return in; + +} + diff --git a/src/c/matrixOperations/diag/i16diaga.c b/src/c/matrixOperations/diag/i16diaga.c new file mode 100644 index 0000000..6078ada --- /dev/null +++ b/src/c/matrixOperations/diag/i16diaga.c @@ -0,0 +1,40 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void i16diaga(int16 in, int size,int insert_post,int16 *out) +{ + + int i; + + for(i=0;i < ((size+abs(insert_post))*(size+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + + out[abs(insert_post)] = in; + + } + else + { + + out[(size + insert_post)*insert_post] = in; + + } + +} + diff --git a/src/c/matrixOperations/diag/i16diagexa.c b/src/c/matrixOperations/diag/i16diagexa.c new file mode 100644 index 0000000..b51e0ae --- /dev/null +++ b/src/c/matrixOperations/diag/i16diagexa.c @@ -0,0 +1,130 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void i16diagexa(int16 *in, int _row,int _column,int extract_post,int16 *out) +{ + + + int j; + if(_row == _column) + { + if(extract_post <= 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + out[j] = in[((_column+1)*j)-extract_post] ; + + } + } + else + { + for ( j = extract_post ; j < _column ; j++ ) + { + + + out[j-extract_post] = in[((_column+1)*j)-extract_post] ; + + } + } + + } + else if(_row > _column) + { + + if(extract_post >=0) + { + + for(j = extract_post; j < _column;j++) + { + + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + + } + else + { + + if((abs(extract_post) <= (_row - _column))) + { + for(j = 0; j < _column ; j++) + { + out[j] = in[((_row+1)*j)-extract_post]; + + } + } + else + { + + for(j=0; j < (_row + extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + } + + + + } + + } + + } + else if (_row < _column) + { + + if(extract_post > 0) + { + if((extract_post <= (_column - _row))) + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + else + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + + } + else + { + + + for(j=0;j < (_row+extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + + + } + + + + } + + + } + + +} + diff --git a/src/c/matrixOperations/diag/i16diagexs.c b/src/c/matrixOperations/diag/i16diagexs.c new file mode 100644 index 0000000..1071c50 --- /dev/null +++ b/src/c/matrixOperations/diag/i16diagexs.c @@ -0,0 +1,53 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +int16 i16diagexs(int16 *in, int _row,int _column,int extract_post) +{ + + if(_row == _column) + { + + if(extract_post < 0) + { + + return in[_row-1] ; + } + else + { + + return in[(_row)*(_row-1)] ; + + } + } + + else + { + + if(extract_post < 0) + { + + return in[_row-1]; + + } + else + { + return in[(_row)*(_column-1)]; + + } + + + + } + +} + diff --git a/src/c/matrixOperations/diag/i16diagina.c b/src/c/matrixOperations/diag/i16diagina.c new file mode 100644 index 0000000..a785003 --- /dev/null +++ b/src/c/matrixOperations/diag/i16diagina.c @@ -0,0 +1,58 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void i16diagina(int16 *in, int _row,int _column,int insert_post,int16 *out) +{ + int i, j; + if(_row == 1) + { + _column = _column; + + } + else + { + _column = _row; + + } + + for(i=0;i < ((_column+abs(insert_post))*(_column+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + + out[((_column+abs(insert_post))*j)+abs(insert_post)+j] = in[j]; + } + + } + else + { + for ( j = insert_post ; j < _column+insert_post ; j++ ) + { + + + out[((_column+insert_post)*j)-insert_post+j] = in[j-insert_post] ; + + } + } + +} + diff --git a/src/c/matrixOperations/diag/i16diagins.c b/src/c/matrixOperations/diag/i16diagins.c new file mode 100644 index 0000000..f7f8612 --- /dev/null +++ b/src/c/matrixOperations/diag/i16diagins.c @@ -0,0 +1,37 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void i16diagins(int16 *in, int size,int16 *out) +{ + + int i, j; + for ( i = 0 ; i < size ; i++ ) + { + for ( j = 0 ; j < size ; j++ ) + { + if(i==j) + { + out[(size+1)*i] = in[i] ; + /* Because to replace the diagonal element with input matrix, (_coulmn+1)*i gives the diagonal postion for m*n matrix + i.e if 3*3 matrix then diagonal postion will be 0,4,6 and for 4*4 matrix diagonal postion will be 0,5,10,15 */ + + + } + + } + } + + + +} + diff --git a/src/c/matrixOperations/diag/i16diags.c b/src/c/matrixOperations/diag/i16diags.c new file mode 100644 index 0000000..d6d89f5 --- /dev/null +++ b/src/c/matrixOperations/diag/i16diags.c @@ -0,0 +1,20 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +int16 i16diags(int16 in) +{ + + return in; + +} + diff --git a/src/c/matrixOperations/diag/i8diaga.c b/src/c/matrixOperations/diag/i8diaga.c new file mode 100644 index 0000000..d432227 --- /dev/null +++ b/src/c/matrixOperations/diag/i8diaga.c @@ -0,0 +1,40 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void i8diaga(int8 in, int size,int insert_post,int8 *out) +{ + + int i; + + for(i=0;i < ((size+abs(insert_post))*(size+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + + out[abs(insert_post)] = in; + + } + else + { + + out[(size + insert_post)*insert_post] = in; + + } + +} + diff --git a/src/c/matrixOperations/diag/i8diagexa.c b/src/c/matrixOperations/diag/i8diagexa.c new file mode 100644 index 0000000..8d5513b --- /dev/null +++ b/src/c/matrixOperations/diag/i8diagexa.c @@ -0,0 +1,130 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void i8diagexa(int8 *in, int _row,int _column,int extract_post,int8 *out) +{ + + + int j; + if(_row == _column) + { + if(extract_post <= 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + out[j] = in[((_column+1)*j)-extract_post] ; + + } + } + else + { + for ( j = extract_post ; j < _column ; j++ ) + { + + + out[j-extract_post] = in[((_column+1)*j)-extract_post] ; + + } + } + + } + else if(_row > _column) + { + + if(extract_post >=0) + { + + for(j = extract_post; j < _column;j++) + { + + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + + } + else + { + + if((abs(extract_post) <= (_row - _column))) + { + for(j = 0; j < _column ; j++) + { + out[j] = in[((_row+1)*j)-extract_post]; + + } + } + else + { + + for(j=0; j < (_row + extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + } + + + + } + + } + + } + else if (_row < _column) + { + + if(extract_post > 0) + { + if((extract_post <= (_column - _row))) + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + else + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + + } + else + { + + + for(j=0;j < (_row+extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + + + } + + + + } + + + } + + +} + diff --git a/src/c/matrixOperations/diag/i8diagexs.c b/src/c/matrixOperations/diag/i8diagexs.c new file mode 100644 index 0000000..5d93661 --- /dev/null +++ b/src/c/matrixOperations/diag/i8diagexs.c @@ -0,0 +1,53 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +int8 i8diagexs(int8 *in, int _row,int _column,int extract_post) +{ + + if(_row == _column) + { + + if(extract_post < 0) + { + + return in[_row-1] ; + } + else + { + + return in[(_row)*(_row-1)] ; + + } + } + + else + { + + if(extract_post < 0) + { + + return in[_row-1]; + + } + else + { + return in[(_row)*(_column-1)]; + + } + + + + } + +} + diff --git a/src/c/matrixOperations/diag/i8diagina.c b/src/c/matrixOperations/diag/i8diagina.c new file mode 100644 index 0000000..b1bd1ba --- /dev/null +++ b/src/c/matrixOperations/diag/i8diagina.c @@ -0,0 +1,58 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void i8diagina(int8 *in, int _row,int _column,int insert_post,int8 *out) +{ + int i, j; + if(_row == 1) + { + _column = _column; + + } + else + { + _column = _row; + + } + + for(i=0;i < ((_column+abs(insert_post))*(_column+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + + out[((_column+abs(insert_post))*j)+abs(insert_post)+j] = in[j]; + } + + } + else + { + for ( j = insert_post ; j < _column+insert_post ; j++ ) + { + + + out[((_column+insert_post)*j)-insert_post+j] = in[j-insert_post] ; + + } + } + +} + diff --git a/src/c/matrixOperations/diag/i8diagins.c b/src/c/matrixOperations/diag/i8diagins.c new file mode 100644 index 0000000..dc6df97 --- /dev/null +++ b/src/c/matrixOperations/diag/i8diagins.c @@ -0,0 +1,37 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void i8diagins(int8 *in, int size,int8 *out) +{ + + int i, j; + for ( i = 0 ; i < size ; i++ ) + { + for ( j = 0 ; j < size ; j++ ) + { + if(i==j) + { + out[(size+1)*i] = in[i] ; + /* Because to replace the diagonal element with input matrix, (_coulmn+1)*i gives the diagonal postion for m*n matrix + i.e if 3*3 matrix then diagonal postion will be 0,4,6 and for 4*4 matrix diagonal postion will be 0,5,10,15 */ + + + } + + } + } + + + +} + diff --git a/src/c/matrixOperations/diag/i8diags.c b/src/c/matrixOperations/diag/i8diags.c new file mode 100644 index 0000000..55eea1b --- /dev/null +++ b/src/c/matrixOperations/diag/i8diags.c @@ -0,0 +1,20 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +int8 i8diags(int8 in) +{ + + return in; + +} + diff --git a/src/c/matrixOperations/diag/u16diaga.c b/src/c/matrixOperations/diag/u16diaga.c new file mode 100644 index 0000000..ee27e53 --- /dev/null +++ b/src/c/matrixOperations/diag/u16diaga.c @@ -0,0 +1,40 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void u16diaga(uint16 in, int size,int insert_post,uint16 *out) +{ + + int i; + + for(i=0;i < ((size+abs(insert_post))*(size+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + + out[abs(insert_post)] = in; + + } + else + { + + out[(size + insert_post)*insert_post] = in; + + } + +} + diff --git a/src/c/matrixOperations/diag/u16diagexa.c b/src/c/matrixOperations/diag/u16diagexa.c new file mode 100644 index 0000000..ac996b7 --- /dev/null +++ b/src/c/matrixOperations/diag/u16diagexa.c @@ -0,0 +1,130 @@ +/* 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: Mushir + rganization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void u16diagexa(uint16 *in, int _row,int _column,int extract_post,uint16 *out) +{ + + + int j; + if(_row == _column) + { + if(extract_post <= 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + out[j] = in[((_column+1)*j)-extract_post] ; + + } + } + else + { + for ( j = extract_post ; j < _column ; j++ ) + { + + + out[j-extract_post] = in[((_column+1)*j)-extract_post] ; + + } + } + + } + else if(_row > _column) + { + + if(extract_post >=0) + { + + for(j = extract_post; j < _column;j++) + { + + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + + } + else + { + + if((abs(extract_post) <= (_row - _column))) + { + for(j = 0; j < _column ; j++) + { + out[j] = in[((_row+1)*j)-extract_post]; + + } + } + else + { + + for(j=0; j < (_row + extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + } + + + + } + + } + + } + else if (_row < _column) + { + + if(extract_post > 0) + { + if((extract_post <= (_column - _row))) + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + else + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + + } + else + { + + + for(j=0;j < (_row+extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + + + } + + + + } + + + } + + +} + diff --git a/src/c/matrixOperations/diag/u16diagexs.c b/src/c/matrixOperations/diag/u16diagexs.c new file mode 100644 index 0000000..dd04c5d --- /dev/null +++ b/src/c/matrixOperations/diag/u16diagexs.c @@ -0,0 +1,53 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +uint16 u16diagexs(uint16 *in, int _row,int _column,int extract_post) +{ + + if(_row == _column) + { + + if(extract_post < 0) + { + + return in[_row-1] ; + } + else + { + + return in[(_row)*(_row-1)] ; + + } + } + + else + { + + if(extract_post < 0) + { + + return in[_row-1]; + + } + else + { + return in[(_row)*(_column-1)]; + + } + + + + } + +} + diff --git a/src/c/matrixOperations/diag/u16diagina.c b/src/c/matrixOperations/diag/u16diagina.c new file mode 100644 index 0000000..97f5139 --- /dev/null +++ b/src/c/matrixOperations/diag/u16diagina.c @@ -0,0 +1,58 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void u16diagina(uint16 *in, int _row,int _column,int insert_post,uint16 *out) +{ + int i, j; + if(_row == 1) + { + _column = _column; + + } + else + { + _column = _row; + + } + + for(i=0;i < ((_column+abs(insert_post))*(_column+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + + out[((_column+abs(insert_post))*j)+abs(insert_post)+j] = in[j]; + } + + } + else + { + for ( j = insert_post ; j < _column+insert_post ; j++ ) + { + + + out[((_column+insert_post)*j)-insert_post+j] = in[j-insert_post] ; + + } + } + +} + diff --git a/src/c/matrixOperations/diag/u16diagins.c b/src/c/matrixOperations/diag/u16diagins.c new file mode 100644 index 0000000..65590bd --- /dev/null +++ b/src/c/matrixOperations/diag/u16diagins.c @@ -0,0 +1,37 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void u16diagins(uint16 *in, int size,uint16 *out) +{ + + int i, j; + for ( i = 0 ; i < size ; i++ ) + { + for ( j = 0 ; j < size ; j++ ) + { + if(i==j) + { + out[(size+1)*i] = in[i] ; + /* Because to replace the diagonal element with input matrix, (_coulmn+1)*i gives the diagonal postion for m*n matrix + i.e if 3*3 matrix then diagonal postion will be 0,4,6 and for 4*4 matrix diagonal postion will be 0,5,10,15 */ + + + } + + } + } + + + +} + diff --git a/src/c/matrixOperations/diag/u16diags.c b/src/c/matrixOperations/diag/u16diags.c new file mode 100644 index 0000000..1e9b451 --- /dev/null +++ b/src/c/matrixOperations/diag/u16diags.c @@ -0,0 +1,20 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +uint16 u16diags(uint16 in) +{ + + return in; + +} + diff --git a/src/c/matrixOperations/diag/u8diaga.c b/src/c/matrixOperations/diag/u8diaga.c new file mode 100644 index 0000000..e6641af --- /dev/null +++ b/src/c/matrixOperations/diag/u8diaga.c @@ -0,0 +1,40 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void u8diaga(uint8 in, int size,int insert_post,uint8 *out) +{ + + int i; + + for(i=0;i < ((size+abs(insert_post))*(size+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + + out[abs(insert_post)] = in; + + } + else + { + + out[(size + insert_post)*insert_post] = in; + + } + +} + diff --git a/src/c/matrixOperations/diag/u8diagexa.c b/src/c/matrixOperations/diag/u8diagexa.c new file mode 100644 index 0000000..17b873b --- /dev/null +++ b/src/c/matrixOperations/diag/u8diagexa.c @@ -0,0 +1,130 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void u8diagexa(uint8 *in, int _row,int _column,int extract_post,uint8 *out) +{ + + + int j; + if(_row == _column) + { + if(extract_post <= 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + out[j] = in[((_column+1)*j)-extract_post] ; + + } + } + else + { + for ( j = extract_post ; j < _column ; j++ ) + { + + + out[j-extract_post] = in[((_column+1)*j)-extract_post] ; + + } + } + + } + else if(_row > _column) + { + + if(extract_post >=0) + { + + for(j = extract_post; j < _column;j++) + { + + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + + } + else + { + + if((abs(extract_post) <= (_row - _column))) + { + for(j = 0; j < _column ; j++) + { + out[j] = in[((_row+1)*j)-extract_post]; + + } + } + else + { + + for(j=0; j < (_row + extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + } + + + + } + + } + + } + else if (_row < _column) + { + + if(extract_post > 0) + { + if((extract_post <= (_column - _row))) + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + else + { + for(j=extract_post;j < _column;j++) + { + out[j-extract_post] = in[((_row+1)*j)-extract_post]; + } + + } + + } + else + { + + + for(j=0;j < (_row+extract_post);j++) + { + + out[j] = in[((_row+1)*j)-extract_post]; + + + + } + + + + } + + + } + + +} + diff --git a/src/c/matrixOperations/diag/u8diagexs.c b/src/c/matrixOperations/diag/u8diagexs.c new file mode 100644 index 0000000..fb800fd --- /dev/null +++ b/src/c/matrixOperations/diag/u8diagexs.c @@ -0,0 +1,53 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +uint8 u8diagexs(uint8 *in, int _row,int _column,int extract_post) +{ + + if(_row == _column) + { + + if(extract_post < 0) + { + + return in[_row-1] ; + } + else + { + + return in[(_row)*(_row-1)] ; + + } + } + + else + { + + if(extract_post < 0) + { + + return in[_row-1]; + + } + else + { + return in[(_row)*(_column-1)]; + + } + + + + } + +} + diff --git a/src/c/matrixOperations/diag/u8diagina.c b/src/c/matrixOperations/diag/u8diagina.c new file mode 100644 index 0000000..178d0f6 --- /dev/null +++ b/src/c/matrixOperations/diag/u8diagina.c @@ -0,0 +1,58 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" + +void u8diagina(uint8 *in, int _row,int _column,int insert_post,uint8 *out) +{ + int i, j; + if(_row == 1) + { + _column = _column; + + } + else + { + _column = _row; + + } + + for(i=0;i < ((_column+abs(insert_post))*(_column+abs(insert_post)));i++) + { + out[i] = 0; + + } + + if(insert_post < 0) + { + for ( j = 0 ; j < _column ; j++ ) + { + + + + out[((_column+abs(insert_post))*j)+abs(insert_post)+j] = in[j]; + } + + } + else + { + for ( j = insert_post ; j < _column+insert_post ; j++ ) + { + + + out[((_column+insert_post)*j)-insert_post+j] = in[j-insert_post] ; + + } + } + +} + diff --git a/src/c/matrixOperations/diag/u8diagins.c b/src/c/matrixOperations/diag/u8diagins.c new file mode 100644 index 0000000..787cd64 --- /dev/null +++ b/src/c/matrixOperations/diag/u8diagins.c @@ -0,0 +1,37 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +void u8diagins(uint8 *in, int size,uint8 *out) +{ + + int i, j; + for ( i = 0 ; i < size ; i++ ) + { + for ( j = 0 ; j < size ; j++ ) + { + if(i==j) + { + out[(size+1)*i] = in[i] ; + /* Because to replace the diagonal element with input matrix, (_coulmn+1)*i gives the diagonal postion for m*n matrix + i.e if 3*3 matrix then diagonal postion will be 0,4,6 and for 4*4 matrix diagonal postion will be 0,5,10,15 */ + + + } + + } + } + + + +} + diff --git a/src/c/matrixOperations/diag/u8diags.c b/src/c/matrixOperations/diag/u8diags.c new file mode 100644 index 0000000..d3d2e46 --- /dev/null +++ b/src/c/matrixOperations/diag/u8diags.c @@ -0,0 +1,20 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#include "diag.h" +uint8 u8diags(uint8 in) +{ + + return in; + +} + diff --git a/src/c/matrixOperations/dist/Makefile.am b/src/c/matrixOperations/dist/Makefile.am new file mode 100644 index 0000000..a4a8b00 --- /dev/null +++ b/src/c/matrixOperations/dist/Makefile.am @@ -0,0 +1,87 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libDist_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libDist.la + +HEAD = ../includes/dist.h + +libDist_la_SOURCES = $(HEAD) \ + sdists.c \ + sdista.c \ + ddists.c \ + ddista.c \ + cdists.c \ + cdista.c \ + zdists.c \ + zdista.c + + +############ +## CHECK +############ + + +check_PROGRAMS = testDoubleDist testFloatDist + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/spec/libSpec.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + libDist.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +testDoubleDist_SOURCES = testDoubleDist.c +testDoubleDist_LDADD = $(check_LDADD) +testDoubleDist_CFLAGS = $(check_INCLUDES) + +testFloatDist_SOURCES = testFloatDist.c +testFloatDist_LDADD = $(check_LDADD) +testFloatDist_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleDist testFloatDist + + + + diff --git a/src/c/matrixOperations/dist/Makefile.in b/src/c/matrixOperations/dist/Makefile.in new file mode 100644 index 0000000..cd39443 --- /dev/null +++ b/src/c/matrixOperations/dist/Makefile.in @@ -0,0 +1,803 @@ +# 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 = testDoubleDist$(EXEEXT) testFloatDist$(EXEEXT) +TESTS = testDoubleDist$(EXEEXT) testFloatDist$(EXEEXT) +subdir = src/c/matrixOperations/dist +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) +libDist_la_LIBADD = +am__objects_1 = +am_libDist_la_OBJECTS = $(am__objects_1) libDist_la-sdists.lo \ + libDist_la-sdista.lo libDist_la-ddists.lo libDist_la-ddista.lo \ + libDist_la-cdists.lo libDist_la-cdista.lo libDist_la-zdists.lo \ + libDist_la-zdista.lo +libDist_la_OBJECTS = $(am_libDist_la_OBJECTS) +libDist_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDist_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleDist_OBJECTS = testDoubleDist-testDoubleDist.$(OBJEXT) +testDoubleDist_OBJECTS = $(am_testDoubleDist_OBJECTS) +testDoubleDist_DEPENDENCIES = $(check_LDADD) +testDoubleDist_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleDist_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatDist_OBJECTS = testFloatDist-testFloatDist.$(OBJEXT) +testFloatDist_OBJECTS = $(am_testFloatDist_OBJECTS) +testFloatDist_DEPENDENCIES = $(check_LDADD) +testFloatDist_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatDist_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 = $(libDist_la_SOURCES) $(testDoubleDist_SOURCES) \ + $(testFloatDist_SOURCES) +DIST_SOURCES = $(libDist_la_SOURCES) $(testDoubleDist_SOURCES) \ + $(testFloatDist_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@ +libDist_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libDist.la +HEAD = ../includes/dist.h +libDist_la_SOURCES = $(HEAD) \ + sdists.c \ + sdista.c \ + ddists.c \ + ddista.c \ + cdists.c \ + cdista.c \ + zdists.c \ + zdista.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/spec/libSpec.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + libDist.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +testDoubleDist_SOURCES = testDoubleDist.c +testDoubleDist_LDADD = $(check_LDADD) +testDoubleDist_CFLAGS = $(check_INCLUDES) +testFloatDist_SOURCES = testFloatDist.c +testFloatDist_LDADD = $(check_LDADD) +testFloatDist_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/dist/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/dist/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 +libDist.la: $(libDist_la_OBJECTS) $(libDist_la_DEPENDENCIES) + $(libDist_la_LINK) -rpath $(pkglibdir) $(libDist_la_OBJECTS) $(libDist_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 +testDoubleDist$(EXEEXT): $(testDoubleDist_OBJECTS) $(testDoubleDist_DEPENDENCIES) + @rm -f testDoubleDist$(EXEEXT) + $(testDoubleDist_LINK) $(testDoubleDist_OBJECTS) $(testDoubleDist_LDADD) $(LIBS) +testFloatDist$(EXEEXT): $(testFloatDist_OBJECTS) $(testFloatDist_DEPENDENCIES) + @rm -f testFloatDist$(EXEEXT) + $(testFloatDist_LINK) $(testFloatDist_OBJECTS) $(testFloatDist_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-cdista.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-cdists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-ddista.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-ddists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-sdista.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-sdists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-zdista.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDist_la-zdists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleDist-testDoubleDist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatDist-testFloatDist.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 $@ $< + +libDist_la-sdists.lo: sdists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-sdists.lo -MD -MP -MF $(DEPDIR)/libDist_la-sdists.Tpo -c -o libDist_la-sdists.lo `test -f 'sdists.c' || echo '$(srcdir)/'`sdists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-sdists.Tpo $(DEPDIR)/libDist_la-sdists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdists.c' object='libDist_la-sdists.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-sdists.lo `test -f 'sdists.c' || echo '$(srcdir)/'`sdists.c + +libDist_la-sdista.lo: sdista.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-sdista.lo -MD -MP -MF $(DEPDIR)/libDist_la-sdista.Tpo -c -o libDist_la-sdista.lo `test -f 'sdista.c' || echo '$(srcdir)/'`sdista.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-sdista.Tpo $(DEPDIR)/libDist_la-sdista.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdista.c' object='libDist_la-sdista.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-sdista.lo `test -f 'sdista.c' || echo '$(srcdir)/'`sdista.c + +libDist_la-ddists.lo: ddists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-ddists.lo -MD -MP -MF $(DEPDIR)/libDist_la-ddists.Tpo -c -o libDist_la-ddists.lo `test -f 'ddists.c' || echo '$(srcdir)/'`ddists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-ddists.Tpo $(DEPDIR)/libDist_la-ddists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ddists.c' object='libDist_la-ddists.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-ddists.lo `test -f 'ddists.c' || echo '$(srcdir)/'`ddists.c + +libDist_la-ddista.lo: ddista.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-ddista.lo -MD -MP -MF $(DEPDIR)/libDist_la-ddista.Tpo -c -o libDist_la-ddista.lo `test -f 'ddista.c' || echo '$(srcdir)/'`ddista.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-ddista.Tpo $(DEPDIR)/libDist_la-ddista.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ddista.c' object='libDist_la-ddista.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-ddista.lo `test -f 'ddista.c' || echo '$(srcdir)/'`ddista.c + +libDist_la-cdists.lo: cdists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-cdists.lo -MD -MP -MF $(DEPDIR)/libDist_la-cdists.Tpo -c -o libDist_la-cdists.lo `test -f 'cdists.c' || echo '$(srcdir)/'`cdists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-cdists.Tpo $(DEPDIR)/libDist_la-cdists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdists.c' object='libDist_la-cdists.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-cdists.lo `test -f 'cdists.c' || echo '$(srcdir)/'`cdists.c + +libDist_la-cdista.lo: cdista.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-cdista.lo -MD -MP -MF $(DEPDIR)/libDist_la-cdista.Tpo -c -o libDist_la-cdista.lo `test -f 'cdista.c' || echo '$(srcdir)/'`cdista.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-cdista.Tpo $(DEPDIR)/libDist_la-cdista.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdista.c' object='libDist_la-cdista.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-cdista.lo `test -f 'cdista.c' || echo '$(srcdir)/'`cdista.c + +libDist_la-zdists.lo: zdists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-zdists.lo -MD -MP -MF $(DEPDIR)/libDist_la-zdists.Tpo -c -o libDist_la-zdists.lo `test -f 'zdists.c' || echo '$(srcdir)/'`zdists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-zdists.Tpo $(DEPDIR)/libDist_la-zdists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zdists.c' object='libDist_la-zdists.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-zdists.lo `test -f 'zdists.c' || echo '$(srcdir)/'`zdists.c + +libDist_la-zdista.lo: zdista.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDist_la_CFLAGS) $(CFLAGS) -MT libDist_la-zdista.lo -MD -MP -MF $(DEPDIR)/libDist_la-zdista.Tpo -c -o libDist_la-zdista.lo `test -f 'zdista.c' || echo '$(srcdir)/'`zdista.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDist_la-zdista.Tpo $(DEPDIR)/libDist_la-zdista.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zdista.c' object='libDist_la-zdista.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) $(libDist_la_CFLAGS) $(CFLAGS) -c -o libDist_la-zdista.lo `test -f 'zdista.c' || echo '$(srcdir)/'`zdista.c + +testDoubleDist-testDoubleDist.o: testDoubleDist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleDist_CFLAGS) $(CFLAGS) -MT testDoubleDist-testDoubleDist.o -MD -MP -MF $(DEPDIR)/testDoubleDist-testDoubleDist.Tpo -c -o testDoubleDist-testDoubleDist.o `test -f 'testDoubleDist.c' || echo '$(srcdir)/'`testDoubleDist.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleDist-testDoubleDist.Tpo $(DEPDIR)/testDoubleDist-testDoubleDist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleDist.c' object='testDoubleDist-testDoubleDist.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) $(testDoubleDist_CFLAGS) $(CFLAGS) -c -o testDoubleDist-testDoubleDist.o `test -f 'testDoubleDist.c' || echo '$(srcdir)/'`testDoubleDist.c + +testDoubleDist-testDoubleDist.obj: testDoubleDist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleDist_CFLAGS) $(CFLAGS) -MT testDoubleDist-testDoubleDist.obj -MD -MP -MF $(DEPDIR)/testDoubleDist-testDoubleDist.Tpo -c -o testDoubleDist-testDoubleDist.obj `if test -f 'testDoubleDist.c'; then $(CYGPATH_W) 'testDoubleDist.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleDist.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleDist-testDoubleDist.Tpo $(DEPDIR)/testDoubleDist-testDoubleDist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleDist.c' object='testDoubleDist-testDoubleDist.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) $(testDoubleDist_CFLAGS) $(CFLAGS) -c -o testDoubleDist-testDoubleDist.obj `if test -f 'testDoubleDist.c'; then $(CYGPATH_W) 'testDoubleDist.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleDist.c'; fi` + +testFloatDist-testFloatDist.o: testFloatDist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatDist_CFLAGS) $(CFLAGS) -MT testFloatDist-testFloatDist.o -MD -MP -MF $(DEPDIR)/testFloatDist-testFloatDist.Tpo -c -o testFloatDist-testFloatDist.o `test -f 'testFloatDist.c' || echo '$(srcdir)/'`testFloatDist.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatDist-testFloatDist.Tpo $(DEPDIR)/testFloatDist-testFloatDist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatDist.c' object='testFloatDist-testFloatDist.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) $(testFloatDist_CFLAGS) $(CFLAGS) -c -o testFloatDist-testFloatDist.o `test -f 'testFloatDist.c' || echo '$(srcdir)/'`testFloatDist.c + +testFloatDist-testFloatDist.obj: testFloatDist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatDist_CFLAGS) $(CFLAGS) -MT testFloatDist-testFloatDist.obj -MD -MP -MF $(DEPDIR)/testFloatDist-testFloatDist.Tpo -c -o testFloatDist-testFloatDist.obj `if test -f 'testFloatDist.c'; then $(CYGPATH_W) 'testFloatDist.c'; else $(CYGPATH_W) '$(srcdir)/testFloatDist.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatDist-testFloatDist.Tpo $(DEPDIR)/testFloatDist-testFloatDist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatDist.c' object='testFloatDist-testFloatDist.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) $(testFloatDist_CFLAGS) $(CFLAGS) -c -o testFloatDist-testFloatDist.obj `if test -f 'testFloatDist.c'; then $(CYGPATH_W) 'testFloatDist.c'; else $(CYGPATH_W) '$(srcdir)/testFloatDist.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/dist/cdista.c b/src/c/matrixOperations/dist/cdista.c new file mode 100644 index 0000000..f9ffd17 --- /dev/null +++ b/src/c/matrixOperations/dist/cdista.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" +#include "conj.h" +#include "subtraction.h" + +float cdista(floatComplex* in1,floatComplex* in2, int lines, int columns){ + int i=0; + float out = 0; + floatComplex *a, *at, *mul; + floatComplex *eigenvalues; + + + /* FIXME : malloc here*/ + a=(floatComplex*)malloc((unsigned int)(lines*columns)*sizeof(floatComplex)); + at=(floatComplex*)malloc((unsigned int)(lines*columns)*sizeof(floatComplex)); + mul=(floatComplex*)malloc((unsigned int)(lines*lines)*sizeof(floatComplex)); + eigenvalues=(floatComplex*)malloc((unsigned int)(lines)*sizeof(floatComplex)); + + for (i=0;iout) out = creals(eigenvalues[i]); + } + + + free(a); + free(at); + free(mul); + free(eigenvalues); + + return out; +} diff --git a/src/c/matrixOperations/dist/cdists.c b/src/c/matrixOperations/dist/cdists.c new file mode 100644 index 0000000..c949e56 --- /dev/null +++ b/src/c/matrixOperations/dist/cdists.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "dist.h" +#include "pow.h" +#include "sqrt.h" + +float cdists(floatComplex in1, floatComplex in2){ + float out=0; + + out+=spows(creals(in1)-creals(in2),2); + out+=spows(cimags(in1)-cimags(in2),2); + return ssqrts(out); +} + + diff --git a/src/c/matrixOperations/dist/ddista.c b/src/c/matrixOperations/dist/ddista.c new file mode 100644 index 0000000..bf051a6 --- /dev/null +++ b/src/c/matrixOperations/dist/ddista.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" + + +double ddista(double* in1,double* in2, int lines, int columns){ + int i=0; + double out=0; + double *a, *at, *mul; + doubleComplex *eigenvalues,*mulCpx; + + + /* FIXME : malloc here*/ + a=(double*)malloc((unsigned int)(lines*columns)*sizeof(double)); + at=(double*)malloc((unsigned int)(lines*columns)*sizeof(double)); + mul=(double*)malloc((unsigned int)(lines*lines)*sizeof(double)); + eigenvalues=(doubleComplex*)malloc((unsigned int)(lines)*sizeof(doubleComplex)); + mulCpx=(doubleComplex*)malloc((unsigned int)(lines*lines)*sizeof(doubleComplex)); + + for (i=0;iout) out = zreals(eigenvalues[i]); + } + + free(a); + free(at); + free(mul); + free(eigenvalues); + free(mulCpx); + + return out; +} diff --git a/src/c/matrixOperations/dist/ddists.c b/src/c/matrixOperations/dist/ddists.c new file mode 100644 index 0000000..2bbd6fe --- /dev/null +++ b/src/c/matrixOperations/dist/ddists.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "dist.h" +#include "abs.h" + +double ddists(double in1, double in2){ + return dabss(in2-in1); +} + + + diff --git a/src/c/matrixOperations/dist/sdista.c b/src/c/matrixOperations/dist/sdista.c new file mode 100644 index 0000000..438c390 --- /dev/null +++ b/src/c/matrixOperations/dist/sdista.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" + + +float sdista(float* in1,float* in2, int lines, int columns){ + int i=0; + float out=0; + float *a, *at, *mul; + floatComplex *eigenvalues,*mulCpx; + + + /* FIXME : malloc here*/ + a=(float*)malloc((unsigned int)(lines*columns)*sizeof(float)); + at=(float*)malloc((unsigned int)(lines*columns)*sizeof(float)); + mul=(float*)malloc((unsigned int)(lines*lines)*sizeof(float)); + eigenvalues=(floatComplex*)malloc((unsigned int)(lines)*sizeof(floatComplex)); + mulCpx=(floatComplex*)malloc((unsigned int)(lines*lines)*sizeof(floatComplex)); + + for (i=0;iout) out = creals(eigenvalues[i]); + } + + free(a); + free(at); + free(mul); + free(eigenvalues); + free(mulCpx); + + return out; +} diff --git a/src/c/matrixOperations/dist/sdists.c b/src/c/matrixOperations/dist/sdists.c new file mode 100644 index 0000000..beb3895 --- /dev/null +++ b/src/c/matrixOperations/dist/sdists.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "dist.h" +#include "abs.h" + +float sdists(float in1, float in2){ + return sabss(in2-in1); +} + + diff --git a/src/c/matrixOperations/dist/testDoubleDist.c b/src/c/matrixOperations/dist/testDoubleDist.c new file mode 100644 index 0000000..0ec6965 --- /dev/null +++ b/src/c/matrixOperations/dist/testDoubleDist.c @@ -0,0 +1,116 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include +#include "dist.h" + +static void ddistsTest(void){ + double in1=2,in2=1; + printf("%f\n",ddists(in1,in2)); + +} + +static void ddistaTest(void){ + double in1[4]={3,4,5,6}; + double in2[4]={0}; + double out; + double result=9.271109059321277712229; + + double in3[6]={1,4,2,5,3,6}; + double in4[6]={0}; + double result2=9.5080320006957226297573; + + out=ddista(in1,in2,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=ddista(in3,in4,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <3e-16); +} + +static void zdistsTest(void){ + doubleComplex in1,in2; + double out; + in1=DoubleComplex(3,4); + in2=DoubleComplex(0,0); + + out=zdists(in1,in2); + printf("%f\n",out); + assert(fabs(out-5) / fabs(out) <1e-16); + +} + +static void zdistaTest(void){ + double in1[4]={3,4,5,6}; + double in2[4]={0}; + double out; + double result=9.271109059321277712229; + + double in3[6]={1,4,2,5,3,6}; + double in4[6]={0}; + double result2=9.5080320006957226297573; + + + double in5[15]={1.9379387702792882919312, 6.797837591730058193207, 5.88365742936730384827, 9.331753817386925220490 , 5.509122880175709724426 , + 8.0405469564720988273621 , 1.074489727616310119629 , 7.4039250845089554786682 , 5.6103316973894834518433 , 7.6611549546942114830017 , + 7.8306589089334011077881 , 1.4388314681127667427063 , 1.6471924725919961929321 , 3.1774142337962985038757 , 5.0265956297516822814941}; + double in6[15]={6.9204960623756051064 , 7.0065794046968221664429 , 8.8706119870766997337341 , 6.9797694869339466094971 , 6.7989911558106541633606 , + 3.6159398127347230911255 , 2.6739976881071925163269 , 0.7736870646476745605469 , 1.494100340642035007477 , 3.2018390577286481857300 , + 2.0260545751079916954041 , 4.4988587312400341033936 , 7.7075743721798062324524 , 2.4352242145687341690063 , 2.1261148853227496147156}; + double in7[15]={0}; + double result3=28.509738138317576527925; + doubleComplex *in1Cpx, *in2Cpx, *in3Cpx, *in4Cpx,*in5Cpx,*in6Cpx; + + in1Cpx=DoubleComplexMatrix(in1,in2,4); + in2Cpx=DoubleComplexMatrix(in2,in2,4); + in3Cpx=DoubleComplexMatrix(in3,in4,6); + in4Cpx=DoubleComplexMatrix(in4,in4,6); + in5Cpx=DoubleComplexMatrix(in5,in6,15); + in6Cpx=DoubleComplexMatrix(in7,in7,15); + + + + out=zdista(in1Cpx,in2Cpx,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=zdista(in3Cpx,in4Cpx,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <3e-16); + + out=zdista(in5Cpx,in6Cpx,5,3); + printf("%f\n",out); + assert(fabs(out-result3) / fabs(out) <3e-16); + +} + +static int distTest(void){ + printf("\n>>> Double Dist Tests <<<\n"); + printf(">>> double <<<\n"); + ddistsTest(); + ddistaTest(); + printf(">>> doubleComplex <<<\n"); + zdistsTest(); + zdistaTest(); + return 0; +} + +int main(void){ + assert(distTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/dist/testFloatDist.c b/src/c/matrixOperations/dist/testFloatDist.c new file mode 100644 index 0000000..895767e --- /dev/null +++ b/src/c/matrixOperations/dist/testFloatDist.c @@ -0,0 +1,116 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include +#include "dist.h" + +static void sdistsTest(void){ + float in1=2,in2=1; + printf("%f\n",sdists(in1,in2)); + +} + +static void sdistaTest(void){ + float in1[4]={3,4,5,6}; + float in2[4]={0}; + float out; + float result=9.271109059321277712229f; + + float in3[6]={1,4,2,5,3,6}; + float in4[6]={0}; + float result2=9.5080320006957226297573f; + + out=sdista(in1,in2,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=sdista(in3,in4,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <1e-15); +} + +static void cdistsTest(void){ + floatComplex in1,in2; + float out; + in1=FloatComplex(3,4); + in2=FloatComplex(0,0); + + out=cdists(in1,in2); + printf("%f\n",out); + assert(fabs(out-5) / fabs(out) <1e-16); + +} + +static void cdistaTest(void){ + float in1[4]={3,4,5,6}; + float in2[4]={0}; + float out; + float result=9.271109059321277712229f; + + float in3[6]={1,4,2,5,3,6}; + float in4[6]={0}; + float result2=9.5080320006957226297573f; + + + float in5[15]={1.9379387702792882919312f, 6.797837591730058193207f, 5.88365742936730384827f, 9.331753817386925220490f , 5.509122880175709724426f , + 8.0405469564720988273621f , 1.074489727616310119629f , 7.4039250845089554786682f , 5.6103316973894834518433f , 7.6611549546942114830017f , + 7.8306589089334011077881f , 1.4388314681127667427063f , 1.6471924725919961929321f , 3.1774142337962985038757f , 5.0265956297516822814941f}; + float in6[15]={6.9204960623756051064f , 7.0065794046968221664429f , 8.8706119870766997337341f , 6.9797694869339466094971f , 6.7989911558106541633606f , + 3.6159398127347230911255f , 2.6739976881071925163269f , 0.7736870646476745605469f , 1.494100340642035007477f , 3.2018390577286481857300f , + 2.0260545751079916954041f , 4.4988587312400341033936f , 7.7075743721798062324524f , 2.4352242145687341690063f , 2.1261148853227496147156f}; + float in7[15]={0}; + float result3=28.509738138317576527925f; + floatComplex *in1Cpx, *in2Cpx, *in3Cpx, *in4Cpx,*in5Cpx,*in6Cpx; + + in1Cpx=FloatComplexMatrix(in1,in2,4); + in2Cpx=FloatComplexMatrix(in2,in2,4); + in3Cpx=FloatComplexMatrix(in3,in4,6); + in4Cpx=FloatComplexMatrix(in4,in4,6); + in5Cpx=FloatComplexMatrix(in5,in6,15); + in6Cpx=FloatComplexMatrix(in7,in7,15); + + + + out=cdista(in1Cpx,in2Cpx,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=cdista(in3Cpx,in4Cpx,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <1e-15); + + out=cdista(in5Cpx,in6Cpx,5,3); + printf("%f\n",out); + assert(fabs(out-result3) / fabs(out) <1e-15); + +} + +static int distTest(void){ + printf("\n>>> Float Dist Tests <<<\n"); + printf(">>> float <<<\n"); + sdistsTest(); + sdistaTest(); + printf(">>> floatComplex <<<\n"); + cdistsTest(); + cdistaTest(); + return 0; +} + +int main(void){ + assert(distTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj b/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj new file mode 100644 index 0000000..b309519 --- /dev/null +++ b/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3902CF74-70D4-4FA4-AA53-71643B94BAB9} + testFloatDist + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters b/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters new file mode 100644 index 0000000..4bfcafe --- /dev/null +++ b/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/dist/zdista.c b/src/c/matrixOperations/dist/zdista.c new file mode 100644 index 0000000..72afa18 --- /dev/null +++ b/src/c/matrixOperations/dist/zdista.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" +#include "conj.h" +#include "subtraction.h" + +double zdista(doubleComplex* in1,doubleComplex* in2, int lines, int columns){ + int i=0; + double out = 0; + doubleComplex *a, *at, *mul; + doubleComplex *eigenvalues; + + + /* FIXME : malloc here*/ + a=(doubleComplex*)malloc((unsigned int)(lines*columns)*sizeof(doubleComplex)); + at=(doubleComplex*)malloc((unsigned int)(lines*columns)*sizeof(doubleComplex)); + mul=(doubleComplex*)malloc((unsigned int)(lines*lines)*sizeof(doubleComplex)); + eigenvalues=(doubleComplex*)malloc((unsigned int)(lines)*sizeof(doubleComplex)); + + for (i=0;iout) out = zreals(eigenvalues[i]); + } + + + free(a); + free(at); + free(mul); + free(eigenvalues); + + return out; +} diff --git a/src/c/matrixOperations/dist/zdists.c b/src/c/matrixOperations/dist/zdists.c new file mode 100644 index 0000000..5d257bd --- /dev/null +++ b/src/c/matrixOperations/dist/zdists.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "dist.h" +#include "pow.h" +#include "sqrt.h" + +double zdists(doubleComplex in1, doubleComplex in2){ + double out=0; + + out+=dpows(zreals(in1)-zreals(in2),2); + out+=dpows(zimags(in1)-zimags(in2),2); + return dsqrts(out); +} + + diff --git a/src/c/matrixOperations/division/Makefile.am b/src/c/matrixOperations/division/Makefile.am new file mode 100644 index 0000000..919ce99 --- /dev/null +++ b/src/c/matrixOperations/division/Makefile.am @@ -0,0 +1,73 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixDivision.la + +HEAD = ../includes/matrixDivision.h + +libMatrixDivision_la_SOURCES = $(HEAD) \ + srdivma.c \ + sldivma.c \ + drdivma.c \ + dldivma.c \ + zrdivma.c \ + zldivma.c \ + crdivma.c \ + cldivma.c \ + crdivcsv.c \ + crdivscv.c \ + crdivv.c \ + drdivv.c \ + srdivv.c \ + zrdivdzv.c \ + zrdivv.c \ + zrdivzdv.c + +check_PROGRAMS = testMatrixRDivision \ + testMatrixLDivision + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +ztestMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_LDADD = $(check_LDADD) +testMatrixLDivision_CFLAGS = $(check_INCLUDES) + +testMatrixRDivision_SOURCES = testMatrixRDivision.c +testMatrixRDivision_LDADD = $(check_LDADD) +testMatrixRDivision_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixRDivision \ + testMatrixLDivision diff --git a/src/c/matrixOperations/division/Makefile.in b/src/c/matrixOperations/division/Makefile.in new file mode 100644 index 0000000..02a150d --- /dev/null +++ b/src/c/matrixOperations/division/Makefile.in @@ -0,0 +1,880 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixRDivision$(EXEEXT) \ + testMatrixLDivision$(EXEEXT) +TESTS = testMatrixRDivision$(EXEEXT) testMatrixLDivision$(EXEEXT) +subdir = src/c/matrixOperations/division +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixDivision_la_LIBADD = +am__objects_1 = +am_libMatrixDivision_la_OBJECTS = $(am__objects_1) \ + libMatrixDivision_la-srdivma.lo \ + libMatrixDivision_la-sldivma.lo \ + libMatrixDivision_la-drdivma.lo \ + libMatrixDivision_la-dldivma.lo \ + libMatrixDivision_la-zrdivma.lo \ + libMatrixDivision_la-zldivma.lo \ + libMatrixDivision_la-crdivma.lo \ + libMatrixDivision_la-cldivma.lo \ + libMatrixDivision_la-crdivcsv.lo \ + libMatrixDivision_la-crdivscv.lo \ + libMatrixDivision_la-crdivv.lo libMatrixDivision_la-drdivv.lo \ + libMatrixDivision_la-srdivv.lo \ + libMatrixDivision_la-zrdivdzv.lo \ + libMatrixDivision_la-zrdivv.lo \ + libMatrixDivision_la-zrdivzdv.lo +libMatrixDivision_la_OBJECTS = $(am_libMatrixDivision_la_OBJECTS) +libMatrixDivision_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixDivision_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +testMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_OBJECTS = \ + testMatrixLDivision-testMatrixLDivision.$(OBJEXT) +testMatrixLDivision_DEPENDENCIES = $(check_LDADD) +testMatrixLDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixLDivision_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixRDivision_OBJECTS = \ + testMatrixRDivision-testMatrixRDivision.$(OBJEXT) +testMatrixRDivision_OBJECTS = $(am_testMatrixRDivision_OBJECTS) +testMatrixRDivision_DEPENDENCIES = $(check_LDADD) +testMatrixRDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixRDivision_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixDivision_la_SOURCES) testMatrixLDivision.c \ + $(testMatrixRDivision_SOURCES) +DIST_SOURCES = $(libMatrixDivision_la_SOURCES) testMatrixLDivision.c \ + $(testMatrixRDivision_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixDivision.la +HEAD = ../includes/matrixDivision.h +libMatrixDivision_la_SOURCES = $(HEAD) \ + srdivma.c \ + sldivma.c \ + drdivma.c \ + dldivma.c \ + zrdivma.c \ + zldivma.c \ + crdivma.c \ + cldivma.c \ + crdivcsv.c \ + crdivscv.c \ + crdivv.c \ + drdivv.c \ + srdivv.c \ + zrdivdzv.c \ + zrdivv.c \ + zrdivzdv.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +ztestMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_LDADD = $(check_LDADD) +testMatrixLDivision_CFLAGS = $(check_INCLUDES) +testMatrixRDivision_SOURCES = testMatrixRDivision.c +testMatrixRDivision_LDADD = $(check_LDADD) +testMatrixRDivision_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/division/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/division/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixDivision.la: $(libMatrixDivision_la_OBJECTS) $(libMatrixDivision_la_DEPENDENCIES) + $(libMatrixDivision_la_LINK) -rpath $(pkglibdir) $(libMatrixDivision_la_OBJECTS) $(libMatrixDivision_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixLDivision$(EXEEXT): $(testMatrixLDivision_OBJECTS) $(testMatrixLDivision_DEPENDENCIES) + @rm -f testMatrixLDivision$(EXEEXT) + $(testMatrixLDivision_LINK) $(testMatrixLDivision_OBJECTS) $(testMatrixLDivision_LDADD) $(LIBS) +testMatrixRDivision$(EXEEXT): $(testMatrixRDivision_OBJECTS) $(testMatrixRDivision_DEPENDENCIES) + @rm -f testMatrixRDivision$(EXEEXT) + $(testMatrixRDivision_LINK) $(testMatrixRDivision_OBJECTS) $(testMatrixRDivision_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-cldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivcsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivscv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-dldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-drdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-drdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-sldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-srdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-srdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivdzv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivzdv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixDivision_la-srdivma.lo: srdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-srdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-srdivma.Tpo -c -o libMatrixDivision_la-srdivma.lo `test -f 'srdivma.c' || echo '$(srcdir)/'`srdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-srdivma.Tpo $(DEPDIR)/libMatrixDivision_la-srdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivma.c' object='libMatrixDivision_la-srdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-srdivma.lo `test -f 'srdivma.c' || echo '$(srcdir)/'`srdivma.c + +libMatrixDivision_la-sldivma.lo: sldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-sldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-sldivma.Tpo -c -o libMatrixDivision_la-sldivma.lo `test -f 'sldivma.c' || echo '$(srcdir)/'`sldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-sldivma.Tpo $(DEPDIR)/libMatrixDivision_la-sldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sldivma.c' object='libMatrixDivision_la-sldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-sldivma.lo `test -f 'sldivma.c' || echo '$(srcdir)/'`sldivma.c + +libMatrixDivision_la-drdivma.lo: drdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-drdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-drdivma.Tpo -c -o libMatrixDivision_la-drdivma.lo `test -f 'drdivma.c' || echo '$(srcdir)/'`drdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-drdivma.Tpo $(DEPDIR)/libMatrixDivision_la-drdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivma.c' object='libMatrixDivision_la-drdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-drdivma.lo `test -f 'drdivma.c' || echo '$(srcdir)/'`drdivma.c + +libMatrixDivision_la-dldivma.lo: dldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-dldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-dldivma.Tpo -c -o libMatrixDivision_la-dldivma.lo `test -f 'dldivma.c' || echo '$(srcdir)/'`dldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-dldivma.Tpo $(DEPDIR)/libMatrixDivision_la-dldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dldivma.c' object='libMatrixDivision_la-dldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-dldivma.lo `test -f 'dldivma.c' || echo '$(srcdir)/'`dldivma.c + +libMatrixDivision_la-zrdivma.lo: zrdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivma.Tpo -c -o libMatrixDivision_la-zrdivma.lo `test -f 'zrdivma.c' || echo '$(srcdir)/'`zrdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivma.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivma.c' object='libMatrixDivision_la-zrdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivma.lo `test -f 'zrdivma.c' || echo '$(srcdir)/'`zrdivma.c + +libMatrixDivision_la-zldivma.lo: zldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zldivma.Tpo -c -o libMatrixDivision_la-zldivma.lo `test -f 'zldivma.c' || echo '$(srcdir)/'`zldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zldivma.Tpo $(DEPDIR)/libMatrixDivision_la-zldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zldivma.c' object='libMatrixDivision_la-zldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zldivma.lo `test -f 'zldivma.c' || echo '$(srcdir)/'`zldivma.c + +libMatrixDivision_la-crdivma.lo: crdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivma.Tpo -c -o libMatrixDivision_la-crdivma.lo `test -f 'crdivma.c' || echo '$(srcdir)/'`crdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivma.Tpo $(DEPDIR)/libMatrixDivision_la-crdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivma.c' object='libMatrixDivision_la-crdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivma.lo `test -f 'crdivma.c' || echo '$(srcdir)/'`crdivma.c + +libMatrixDivision_la-cldivma.lo: cldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-cldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-cldivma.Tpo -c -o libMatrixDivision_la-cldivma.lo `test -f 'cldivma.c' || echo '$(srcdir)/'`cldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-cldivma.Tpo $(DEPDIR)/libMatrixDivision_la-cldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cldivma.c' object='libMatrixDivision_la-cldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-cldivma.lo `test -f 'cldivma.c' || echo '$(srcdir)/'`cldivma.c + +libMatrixDivision_la-crdivcsv.lo: crdivcsv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivcsv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivcsv.Tpo -c -o libMatrixDivision_la-crdivcsv.lo `test -f 'crdivcsv.c' || echo '$(srcdir)/'`crdivcsv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivcsv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivcsv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivcsv.c' object='libMatrixDivision_la-crdivcsv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivcsv.lo `test -f 'crdivcsv.c' || echo '$(srcdir)/'`crdivcsv.c + +libMatrixDivision_la-crdivscv.lo: crdivscv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivscv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivscv.Tpo -c -o libMatrixDivision_la-crdivscv.lo `test -f 'crdivscv.c' || echo '$(srcdir)/'`crdivscv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivscv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivscv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivscv.c' object='libMatrixDivision_la-crdivscv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivscv.lo `test -f 'crdivscv.c' || echo '$(srcdir)/'`crdivscv.c + +libMatrixDivision_la-crdivv.lo: crdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivv.Tpo -c -o libMatrixDivision_la-crdivv.lo `test -f 'crdivv.c' || echo '$(srcdir)/'`crdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivv.c' object='libMatrixDivision_la-crdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivv.lo `test -f 'crdivv.c' || echo '$(srcdir)/'`crdivv.c + +libMatrixDivision_la-drdivv.lo: drdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-drdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-drdivv.Tpo -c -o libMatrixDivision_la-drdivv.lo `test -f 'drdivv.c' || echo '$(srcdir)/'`drdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-drdivv.Tpo $(DEPDIR)/libMatrixDivision_la-drdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivv.c' object='libMatrixDivision_la-drdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-drdivv.lo `test -f 'drdivv.c' || echo '$(srcdir)/'`drdivv.c + +libMatrixDivision_la-srdivv.lo: srdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-srdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-srdivv.Tpo -c -o libMatrixDivision_la-srdivv.lo `test -f 'srdivv.c' || echo '$(srcdir)/'`srdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-srdivv.Tpo $(DEPDIR)/libMatrixDivision_la-srdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivv.c' object='libMatrixDivision_la-srdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-srdivv.lo `test -f 'srdivv.c' || echo '$(srcdir)/'`srdivv.c + +libMatrixDivision_la-zrdivdzv.lo: zrdivdzv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivdzv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Tpo -c -o libMatrixDivision_la-zrdivdzv.lo `test -f 'zrdivdzv.c' || echo '$(srcdir)/'`zrdivdzv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivdzv.c' object='libMatrixDivision_la-zrdivdzv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivdzv.lo `test -f 'zrdivdzv.c' || echo '$(srcdir)/'`zrdivdzv.c + +libMatrixDivision_la-zrdivv.lo: zrdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivv.Tpo -c -o libMatrixDivision_la-zrdivv.lo `test -f 'zrdivv.c' || echo '$(srcdir)/'`zrdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivv.c' object='libMatrixDivision_la-zrdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivv.lo `test -f 'zrdivv.c' || echo '$(srcdir)/'`zrdivv.c + +libMatrixDivision_la-zrdivzdv.lo: zrdivzdv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivzdv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Tpo -c -o libMatrixDivision_la-zrdivzdv.lo `test -f 'zrdivzdv.c' || echo '$(srcdir)/'`zrdivzdv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivzdv.c' object='libMatrixDivision_la-zrdivzdv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivzdv.lo `test -f 'zrdivzdv.c' || echo '$(srcdir)/'`zrdivzdv.c + +testMatrixLDivision-testMatrixLDivision.o: testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -MT testMatrixLDivision-testMatrixLDivision.o -MD -MP -MF $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo -c -o testMatrixLDivision-testMatrixLDivision.o `test -f 'testMatrixLDivision.c' || echo '$(srcdir)/'`testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixLDivision.c' object='testMatrixLDivision-testMatrixLDivision.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -c -o testMatrixLDivision-testMatrixLDivision.o `test -f 'testMatrixLDivision.c' || echo '$(srcdir)/'`testMatrixLDivision.c + +testMatrixLDivision-testMatrixLDivision.obj: testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -MT testMatrixLDivision-testMatrixLDivision.obj -MD -MP -MF $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo -c -o testMatrixLDivision-testMatrixLDivision.obj `if test -f 'testMatrixLDivision.c'; then $(CYGPATH_W) 'testMatrixLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixLDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixLDivision.c' object='testMatrixLDivision-testMatrixLDivision.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -c -o testMatrixLDivision-testMatrixLDivision.obj `if test -f 'testMatrixLDivision.c'; then $(CYGPATH_W) 'testMatrixLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixLDivision.c'; fi` + +testMatrixRDivision-testMatrixRDivision.o: testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -MT testMatrixRDivision-testMatrixRDivision.o -MD -MP -MF $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo -c -o testMatrixRDivision-testMatrixRDivision.o `test -f 'testMatrixRDivision.c' || echo '$(srcdir)/'`testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixRDivision.c' object='testMatrixRDivision-testMatrixRDivision.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -c -o testMatrixRDivision-testMatrixRDivision.o `test -f 'testMatrixRDivision.c' || echo '$(srcdir)/'`testMatrixRDivision.c + +testMatrixRDivision-testMatrixRDivision.obj: testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -MT testMatrixRDivision-testMatrixRDivision.obj -MD -MP -MF $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo -c -o testMatrixRDivision-testMatrixRDivision.obj `if test -f 'testMatrixRDivision.c'; then $(CYGPATH_W) 'testMatrixRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixRDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixRDivision.c' object='testMatrixRDivision-testMatrixRDivision.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -c -o testMatrixRDivision-testMatrixRDivision.obj `if test -f 'testMatrixRDivision.c'; then $(CYGPATH_W) 'testMatrixRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixRDivision.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/c/matrixOperations/division/cldivma.c b/src/c/matrixOperations/division/cldivma.c new file mode 100644 index 0000000..d21510c --- /dev/null +++ b/src/c/matrixOperations/division/cldivma.c @@ -0,0 +1,65 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +/******FIXME********/ +/**** WARNING NOT WORK AT ALL FOR THE MOMENT ***/ +/**** Because of problem of conversion float-> double ****/ +#include "matrixDivision.h" +#include "lapack.h" + +void cldivma ( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin1 = NULL; + doubleComplex *dblin2 = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = DoubleComplex ( (double) creals( in1[i]) , (double) cimags ( in1[i])) ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = DoubleComplex ( (double) creals( in2[i]) , (double) cimags ( in2[i])) ; + } + + zldivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/crdivcsv.c b/src/c/matrixOperations/division/crdivcsv.c new file mode 100644 index 0000000..77b7750 --- /dev/null +++ b/src/c/matrixOperations/division/crdivcsv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +floatComplex crdivcsv (floatComplex* in1,float* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return crdivv(in1 , FloatComplexMatrix(in2,ZEROS,size),size ); + } diff --git a/src/c/matrixOperations/division/crdivma.c b/src/c/matrixOperations/division/crdivma.c new file mode 100644 index 0000000..ca6f356 --- /dev/null +++ b/src/c/matrixOperations/division/crdivma.c @@ -0,0 +1,62 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixDivision.h" +#include "lapack.h" + +void crdivma ( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin1 = NULL; + doubleComplex *dblin2 = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = DoubleComplex ( (double) creals( in1[i]) , (double) cimags ( in1[i])) ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = DoubleComplex ( (double) creals( in2[i]) , (double) cimags ( in2[i])) ; + } + + zrdivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/crdivscv.c b/src/c/matrixOperations/division/crdivscv.c new file mode 100644 index 0000000..0f4de32 --- /dev/null +++ b/src/c/matrixOperations/division/crdivscv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +floatComplex crdivscv (float* in1, floatComplex* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return crdivv(FloatComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/src/c/matrixOperations/division/crdivv.c b/src/c/matrixOperations/division/crdivv.c new file mode 100644 index 0000000..db7a81c --- /dev/null +++ b/src/c/matrixOperations/division/crdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixDivision.h" + +floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size){ + + floatComplex out[1] ={ FloatComplex (0.0f , 0.0f)}; + crdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/dldivma.c b/src/c/matrixOperations/division/dldivma.c new file mode 100644 index 0000000..2c81d84 --- /dev/null +++ b/src/c/matrixOperations/division/dldivma.c @@ -0,0 +1,111 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixDivision.h" +#include "lapack.h" + +void dldivma (double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + double *pAf = NULL; + double *pXb = NULL; + double *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (double*)malloc(sizeof(double) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (double*)malloc(sizeof(double) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (double*)malloc(sizeof(double) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/src/c/matrixOperations/division/drdivma.c b/src/c/matrixOperations/division/drdivma.c new file mode 100644 index 0000000..aad029a --- /dev/null +++ b/src/c/matrixOperations/division/drdivma.c @@ -0,0 +1,129 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include "matrixDivision.h" +#include "lapack.h" + +void drdivma ( double * in1, int lines1, int columns1, + double * in2, int lines2, int columns2, + double * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + double *pAf = NULL; + double *pAt = NULL; + double *pBt = NULL; + double *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (double*)malloc(sizeof(double) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (double*)malloc(sizeof(double) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (double*)malloc(sizeof(double) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/src/c/matrixOperations/division/drdivv.c b/src/c/matrixOperations/division/drdivv.c new file mode 100644 index 0000000..c6c2bf6 --- /dev/null +++ b/src/c/matrixOperations/division/drdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixDivision.h" + +double drdivv(double *in1, double *in2, int size){ + + double out[1] = { 0.0} ; + drdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/i16ldivma.c b/src/c/matrixOperations/division/i16ldivma.c new file mode 100644 index 0000000..decb8f3 --- /dev/null +++ b/src/c/matrixOperations/division/i16ldivma.c @@ -0,0 +1,111 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void i16ldivma (int16* in1, int lines1, int columns1 , + int16* in2, int lines2, int columns2 , + int16* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int16 dblRcond = 0; + + int16 dblEps = 0; + int16 dblAnorm = 0; + + int16 *pAf = NULL; + int16 *pXb = NULL; + int16 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (int16*)malloc(sizeof(int16) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (int16*)malloc(sizeof(int16) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (int16*)malloc(sizeof(int16) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/src/c/matrixOperations/division/i16rdivma.c b/src/c/matrixOperations/division/i16rdivma.c new file mode 100644 index 0000000..7cdebe5 --- /dev/null +++ b/src/c/matrixOperations/division/i16rdivma.c @@ -0,0 +1,129 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void i16rdivma ( int16 * in1, int lines1, int columns1, + int16 * in2, int lines2, int columns2, + int16 * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int16 dblRcond = 0; + + int16 dblEps = 0; + int16 dblAnorm = 0; + + int16 *pAf = NULL; + int16 *pAt = NULL; + int16 *pBt = NULL; + int16 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (int16*)malloc(sizeof(int16) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (int16*)malloc(sizeof(int16) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (int16*)malloc(sizeof(int16) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (int16*)malloc(sizeof(int16) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/src/c/matrixOperations/division/i16rdivv.c b/src/c/matrixOperations/division/i16rdivv.c new file mode 100644 index 0000000..ebbdf58 --- /dev/null +++ b/src/c/matrixOperations/division/i16rdivv.c @@ -0,0 +1,24 @@ +/* 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 "matrixDivision.h" + +int16 i16rdivv(int16 *in1, int16 *in2, int size){ + + int16 out[1] = { 0.0} ; + i16rdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/i8ldivma.c b/src/c/matrixOperations/division/i8ldivma.c new file mode 100644 index 0000000..d7ca2fd --- /dev/null +++ b/src/c/matrixOperations/division/i8ldivma.c @@ -0,0 +1,111 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void i8ldivma (int8* in1, int lines1, int columns1 , + int8* in2, int lines2, int columns2 , + int8* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int8 dblRcond = 0; + + int8 dblEps = 0; + int8 dblAnorm = 0; + + int8 *pAf = NULL; + int8 *pXb = NULL; + int8 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (int8*)malloc(sizeof(int8) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (int8*)malloc(sizeof(int8) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (int8*)malloc(sizeof(int8) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/src/c/matrixOperations/division/i8rdivma.c b/src/c/matrixOperations/division/i8rdivma.c new file mode 100644 index 0000000..0048c03 --- /dev/null +++ b/src/c/matrixOperations/division/i8rdivma.c @@ -0,0 +1,129 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void i8rdivma ( int8 * in1, int lines1, int columns1, + int8 * in2, int lines2, int columns2, + int8 * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int8 dblRcond = 0; + + int8 dblEps = 0; + int8 dblAnorm = 0; + + int8 *pAf = NULL; + int8 *pAt = NULL; + int8 *pBt = NULL; + int8 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (int8*)malloc(sizeof(int8) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (int8*)malloc(sizeof(int8) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (int8*)malloc(sizeof(int8) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (int8*)malloc(sizeof(int8) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/src/c/matrixOperations/division/i8rdivv.c b/src/c/matrixOperations/division/i8rdivv.c new file mode 100644 index 0000000..7d262af --- /dev/null +++ b/src/c/matrixOperations/division/i8rdivv.c @@ -0,0 +1,24 @@ +/* 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 "matrixDivision.h" + +int8 i8rdivv(int8 *in1, int8 *in2, int size){ + + int8 out[1] = { 0.0} ; + i8rdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/sldivma.c b/src/c/matrixOperations/division/sldivma.c new file mode 100644 index 0000000..766cfff --- /dev/null +++ b/src/c/matrixOperations/division/sldivma.c @@ -0,0 +1,61 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixDivision.h" +#include "lapack.h" +void sldivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin1 = NULL; + double *dblin2 = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (double*)malloc(sizeof(double) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = (double) in1[i] ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = (double) in2[i] ; + } + + dldivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = (float) dblout[i] ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/srdivma.c b/src/c/matrixOperations/division/srdivma.c new file mode 100644 index 0000000..bc1f035 --- /dev/null +++ b/src/c/matrixOperations/division/srdivma.c @@ -0,0 +1,63 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +/****FIXME****/ +/**** WARNING NOT WORK AT ALL FOR THE MOMENT ***/ +/**** Because of problem of conversion float-> double ****/ +#include "matrixDivision.h" +#include "lapack.h" +void srdivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin1 = NULL; + double *dblin2 = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (double*)malloc(sizeof(double) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = (double) in1[i] ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = (double) in2[i] ; + } + + drdivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = (float) dblout[i] ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/src/c/matrixOperations/division/srdivv.c b/src/c/matrixOperations/division/srdivv.c new file mode 100644 index 0000000..023e06f --- /dev/null +++ b/src/c/matrixOperations/division/srdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixDivision.h" + +float srdivv(float *in1, float *in2, int size){ + + float out[1] = {0.0f} ; + srdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/testMatrixLDivision.c b/src/c/matrixOperations/division/testMatrixLDivision.c new file mode 100644 index 0000000..b2f8319 --- /dev/null +++ b/src/c/matrixOperations/division/testMatrixLDivision.c @@ -0,0 +1,456 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include "matrixDivision.h" + + +#define LINES 2 +#define COLUMNS1 2 +#define COLUMNS2 2 + +#define ZLINES 2 +#define ZCOLUMNS1 2 +#define ZCOLUMNS2 1 + + +static void sldivmaTest ( void ){ + int i = 0; + + float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ; + float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ; + float result[] = { -1.25f , 0.75f , -1.166666666666666f ,0.83333333333333333f }; + + + float out [(COLUMNS2)*(LINES)] ; + + sldivma( in1 , LINES , COLUMNS1 , in2 , LINES , COLUMNS2 , out ) ; + for ( i = 0 ; i < LINES *COLUMNS2 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-06 ) ; + } + + + +} + + +static void dldivmaTest ( void ) +{ + int i = 0 ; +/* here the matrixes are linearized in the wrong way so need to transpose them */ +/* double in1[] = +{0.84155184263363481,0.26385784195736051,0.52570608118548989,0.54653349192813039, + 0.62128817522898316,0.98085420625284314,0.74896081397309899,0.01432593585923314, + 0.23678414756432176,0.70614896761253476,0.27255953708663583,0.06706167431548238, + 0.43117330456152558,0.7741842647083104,0.57694048294797540,0.26086253346875310, + 0.14094856614246964, +0.40620247554033995,0.52535630855709314,0.99312098976224661,0.98854076582938433, + 0.34549844544380903,0.81870661024004221,0.94149570073932409,0.81914897728711367, + 0.70153435599058867,0.67878311965614557,0.34376550372689962,0.76511315722018480, + 0.61453847866505384,0.79220082703977823,0.39386960770934820,0.36363423336297274, + 0.67591095995157957, +0.40948254754766822,0.53762298030778766,0.64885628735646605,0.73956565884873271, + 0.70648676296696067,0.42568723810836673,0.21240556007251143,0.13049928424879909, + 0.12025266280397773,0.41329363686963916,0.20337020372971892,0.04173615900799632, + 0.92589621385559440,0.55046048713847995,0.68885837262496352,0.17466178117319942, + 0.45126775791868567, +0.87841258011758327,0.11999255046248436,0.99231909401714802,0.00371731072664261, + 0.52114724926650524,0.24615605548024178,0.57950199581682682,0.96820035576820374, + 0.82874121330678463,0.14022908732295036,0.30119446106255054,0.34382718056440353, + 0.09938172809779644,0.40850437059998512,0.97023218311369419,0.92341394722461700, + 0.75430292449891567, +0.11383596854284406,0.2256303490139544,0.05004197778180242,0.59005728596821427, + 0.28704008506610990,0.92295324662700295,0.26281475694850087,0.6561381467618048, + 0.31610729591920972,0.49523561308160424,0.27625959040597081,0.1970167332328856, + 0.42805786477401853,0.72174380579963326,0.85157642932608724,0.76051409030333161, + 0.13702143030241132, +0.19983377400785685,0.62740930821746588,0.74855065811425447,0.3096467358991504, + 0.65027950797230005,0.10007458087056875,0.43609866220504045,0.24455389659851789, + 0.53051907662302256,0.41948772873729467,0.29445307422429323,0.21228986512869596, + 0.94318309519439936,0.47685358580201864,0.33933044690638781,0.56402041297405958, + 0.66082405392080545, +0.56186607433483005,0.76084325974807143,0.41040589986369014,0.25522057106718421, + 0.08813347620889544,0.46782181179150939,0.91105451015755534,0.52831235667690635, + 0.57151748193427920,0.86262222891673446,0.57180739520117640,0.31403985014185309, + 0.03273952705785632,0.63930579042062163,0.87725317804142833,0.37970651825889945, + 0.38900542212650180, +0.58961773291230202,0.04855662025511265,0.60845263302326202,0.62518793903291225, + 0.44987633451819420,0.39504976756870747,0.80826673656702042,0.84689256362617016, + 0.04780154302716255,0.28575096465647221,0.21417701244354248,0.78216253779828548, + 0.92132670804858208,0.99638652987778187,0.11314024776220322,0.87762261740863323, + 0.70018205419182777, +0.68539796629920602,0.67239497276023030,0.85442108893766999,0.11574173765257001, + 0.72272530803456903,0.03661171020939946,0.81026530498638749,0.78766220854595304, + 0.82486197212710977,0.25121363671496511,0.68954616272822022,0.05409323470667005, + 0.94490244099870324,0.15747882844880223,0.5264128320850432,0.82174257980659604, + 0.91680057207122445, +0.89062247332185507,0.20171726960688829,0.06426467280834913,0.61170040909200907, + 0.89767962601035833,0.51753685344010592,0.25904283951967955,0.12620826158672571, + 0.5798843121156096,0.33891015965491533,0.58555728476494551,0.91902069095522165, + 0.900706990621984,0.53506936598569155,0.52973940502852201,0.67870581243187189, + 0.21228999551385641, +0.50422128057107329,0.39115739194676280,0.82790829380974174,0.67839562846347690, + 0.24278218811377883,0.83254515705630183,0.41390872886404395,0.78838609857484698, + 0.27918082987889647,0.39219759730622172,0.42041230341419578,0.46035157097503543, + 0.80943161016330123,0.21290646074339747,0.92917560925707221,0.08220098121091723, + 0.26978330826386809, +0.34936154074966908,0.83003165572881699,0.92623437754809856,0.33200952783226967, + 0.43377211131155491,0.61048321425914764,0.35999277792870998,0.34530424699187279, + 0.95451109297573566,0.46815521270036697,0.42775720171630383,0.29926850274205208, + 0.02519542910158634,0.55914506316184998,0.97654302977025509,0.25527314469218254, + 0.31998893804848194, +0.38737787725403905,0.58787201577797532,0.56672112690284848,0.02587099233642220, + 0.96770532103255391,0.18711117887869477,0.69127879338338971,0.26598573336377740, + 0.90711546363309026,0.33616027468815446,0.31845858739688993,0.00291663268581033, + 0.00196450622752309,0.43049659812822938,0.62254639761522412,0.74444567272439599, + 0.02321802498772740, +0.92228986788541079,0.48291792999953032,0.57116389367729425,0.51744682248681784, + 0.50685344357043505,0.01895748358219862,0.76568587962538004,0.97098186518996954, + 0.33601493109017611,0.53368766140192747,0.57618944440037012,0.89934705849736929, + 0.50752213317900896,0.02280548494309187,0.98225832823663950,0.22695036139339209, + 0.72654472757130861, +0.94881842611357570,0.22328650346025825,0.81601104838773608,0.39168732380494475, + 0.52329764096066356,0.84335647663101554,0.35726496530696750,0.88752476638182998, + 0.11756130633875728,0.20390639593824744,0.42549022240564227,0.83879271661862731, + 0.40760429529473186,0.57614597817882895,0.75429888023063540,0.68369307881221175, + 0.15340585587546229, +0.34353372454643250,0.84008856676518917,0.05689279362559319,0.24135384149849415, + 0.5596947595477104,0.07485948316752911,0.76933998242020607,0.20667528547346592, + 0.92537237703800201,0.15899897180497646,0.97619816288352013,0.43437494523823261, + 0.84080461412668228,0.71491303853690624,0.54547880962491035,0.93650726415216923, + 0.23552638292312622, +0.37601187312975526,0.12059959070757031,0.55959366867318749,0.50644348980858922, + 0.56173070007935166,0.85328151332214475,0.54776339093223214,0.85251609655097127, + 0.72636712575331330,0.01818151073530316,0.25189600000157952,0.77678761305287480, + 0.5017265700735152,0.93216359661892056,0.72860160330310464,0.50530174048617482, + 0.08797382796183228, +0.73409405630081892,0.28553641680628061,0.12493403162807226,0.42361020017415285, + 0.46817600261420012,0.01245901081711054,0.09622887428849936,0.67446978110820055, + 0.90094979386776686,0.40983706060796976,0.43911290075629950,0.13953176606446505, + 0.91287807654589415,0.12326993141323328,0.02525969501584768,0.25248145777732134, + 0.71059537213295698, +0.26157614728435874,0.86075146449729800,0.72792222863063216,0.28937275288626552, + 0.77945467224344611,0.18675393564626575,0.95611717319115996,0.91528743831440806, + 0.39489932497963309,0.01058345986530185,0.07593036955222487,0.11506372271105647, + 0.44357294728979468,0.28655522270128131,0.40251684701070189,0.68188397912308574, + 0.68887275597080588, +0.49934938363730907,0.84941016510128975,0.26777664758265018,0.08879321813583374, + 0.79010718129575253,0.49205840751528740,0.22074085660278797,0.02848597615957260, + 0.56551797501742840,0.19653097167611122,0.25593801774084568,0.53554199635982513, + 0.59837839566171169,0.01247995719313622,0.09831319935619831,0.28363681584596634, + 0.65953194908797741}; + + + double in2[] = +{0.18151161121204495,0.77340125897899270,0.25145971449092031,0.37096222722902894, + 0.46179189579561353,0.47909884760156274,0.66919379355385900,0.06942595774307847, + 0.56079538213089108,0.69204960623756051,0.99401472182944417,0.00291080260649323, +0.3904965976253152,0.4244190966710448,0.38433500844985247,0.30322382133454084, + 0.62512917164713144,0.28169692959636450,0.20426016021519899,0.11522095929831266, + 0.94247916433960199,0.70065794046968222,0.18287624139338732,0.30681814532727003, +0.15869047446176410,0.72621259605512023,0.43964602379128337,0.95195201179012656, + 0.70597065938636661,0.23800977831706405,0.8310431349091232,0.48626806726679206, + 0.68177247745916247,0.88706119870766997,0.30219173757359385,0.79026939114555717, +0.62407150492072105,0.70999773032963276,0.65407369285821915,0.71278580836951733, + 0.70181696489453316,0.32942054606974125,0.01221632957458496,0.76715826056897640, + 0.27342410013079643,0.69797694869339466,0.37854864448308945,0.95779503695666790, +0.63760355720296502,0.47457459988072515,0.58781063789501786,0.11923700617626309, + 0.40879997471347451,0.23067280324175954,0.48844617092981935,0.08805298106744885, + 0.20717754075303674,0.67989911558106542,0.71531985932961106,0.66892711864784360, +0.42704886104911566,0.9438692079856992,0.60208318661898375,0.50091631803661585, + 0.06362213846296072,0.21362966019660234,0.95498770754784346,0.70085612777620554, + 0.19379387702792883,0.36159398127347231,0.95241537224501371,0.29296159837394953, +0.10716815060004592,0.14596485672518611,0.04535020282492042,0.32900535268709064, + 0.06573933875188231,0.40549980429932475,0.05874312063679099,0.18791387928649783, + 0.67978375917300582,0.26739976881071925,0.47039186349138618,0.82238993747159839, +0.23822965659201145,0.07141010463237762,0.20294443331658840,0.48089468106627464, + 0.53310041315853596,0.30953712016344070,0.82584649138152599,0.20178856328129768, + 0.58836574293673038,0.07736870646476746,0.18709417246282101,0.01798455044627190, +0.94629473658278584,0.67337385797873139,0.78442738251760602,0.33036959776654840, + 0.03315818728879094,0.67629716033115983,0.29807415651157498,0.40628212550655007, + 0.93317538173869252,0.14941003406420350,0.25571879046037793,0.87107013771310449, +0.45766852516680956,0.65369247179478407,0.26375361625105143,0.63044753577560186, + 0.31578356493264437,0.97069163154810667,0.07757596764713526,0.40966569539159536, + 0.55091228801757097,0.32018390577286482,0.44350660685449839,0.31810243334621191, +0.89644787041470408,0.19968961318954825,0.43832763982936740,0.21171907847747207, + 0.37858232436701655,0.54417965700849891,0.58460923237726092,0.17695645010098815, + 0.80405469564720988,0.20260545751079917,0.72340781940147281,0.57244732743129134, +0.44384705275297165,0.60141251794993877,0.86648589745163918,0.44860231317579746, + 0.46195234358310699,0.02047479711472988,0.75287136062979698,0.33129312284290791, + 0.10744897276163101,0.44988587312400341,0.87619100883603096,0.57386581040918827, +0.80895681912079453,0.18993748771026731,0.37921421090140939,0.59145097108557820, + 0.62873698258772492,0.89413649635389447,0.05172297963872552,0.05184767069295049, + 0.74039250845089555,0.77075743721798062,0.03733208635821939,0.34920182498171926, +0.68317985069006681,0.25839814636856318,0.76687160786241293,0.68067426700145006, + 0.28785153012722731,0.34903638903051615,0.59586250688880682,0.41492417920380831, + 0.56103316973894835,0.24352242145687342,0.42934664245694876,0.7067297669127584, +0.03401931514963508,0.09878737432882190,0.60066213225945830,0.07392961112782359, + 0.3292048736475408,0.11053651524707675,0.38337053125724196,0.72212355909869075, + 0.76611549546942115,0.21261148853227496,0.31572330510243773,0.35992007283493876, +0.23805456422269344,0.06199027225375175,0.78567356057465076,0.94336947053670883, + 0.47192330472171307,0.20233777537941933,0.49002202786505222,0.07746253907680511, + 0.78306589089334011,0.10992341861128807,0.36824773438274860,0.40523112565279007, +0.94920115964487195,0.04034968325868249,0.73871155502274632,0.12863306934013963, + 0.33537696348503232,0.13046909729018807,0.52727950783446431,0.58558783913031220, + 0.14388314681127667,0.69814807781949639,0.14587742509320378,0.61408105725422502, +0.21827886346727610,0.74001471605151892,0.55442603398114443,0.20190807711333036, + 0.55530697200447321,0.85739529784768820,0.06889454741030931,0.37079446297138929, + 0.16471924725919962,0.41509064938873053,0.67683792579919100,0.65240467619150877, +0.61546878470107913,0.61626600986346602,0.99291495559737086,0.19693034281954169, + 0.11960808141157031,0.63780163740739226,0.88430777518078685,0.21161167463287711, + 0.31774142337962985,0.50298188393935561,0.52619793592020869,0.02951709320768714, +0.83135433867573738,0.6583583448082209,0.97574284672737122,0.89286901615560055, + 0.76139996573328972,0.40711227245628834,0.71912937611341476,0.19032685272395611, + 0.50265956297516823,0.75116067565977573,0.400362566113472,0.56688958965241909} +; + + double result[] = +{-1.35304848520861487,0.45754085729476712,-0.6736280871889024,0.33207797896852592, + 0.43686665386108053,1.19699150804728482,-0.53382978138054371,0.29027772826683890, + -0.00827371705993142,-0.14056593966637726,0.97528495242825564,-0.50640321961329704, +-1.02292396789679763,0.14683824772822532,0.07187827219700703,0.26493234152584039, + 0.19039952557132572,0.55480813680166574,0.39823783903528059,0.10487653718583664, + -0.01169765032881238,-0.12935543309398898,0.91373948525086457,-0.42095065668914605, +-0.19349758378824730,-0.02882981029864774,-0.22391869192699457,-0.15720068678475169, + -0.07066729236062046,-0.22778476192919797,-0.07232798550562215,0.25736303036550690, + 0.46282933263406362,-0.30812642599955187,-0.13899968979779151,-0.29110054036689564, +-1.03603776312515605,0.41831226411022665,-0.26815455630947649,0.32749202801394556, + 0.71958381253175108,0.50743495139986494,-0.77843454048260496,-0.65128619093814355, + 0.45389989732032809,0.25340453725266349,-0.22487431273588654,-0.69327413947497007, +1.23257217178938916,-0.20500752874670841,1.17935058240805546,-0.07005924340124725, + 0.02202972751083646,-0.74349480264981749,0.78826180830363013,0.00378475165255014, + 0.20312102001296634,0.76317680003707100,-1.2444586343524908,0.61835799875331021, +0.82435969088956451,0.14161838805165022,0.54413699368884894,-0.35024810526933553, + 0.10736628125177422,-0.30342706713796774,0.16551618468279145,-0.33044241080800685, + 0.26090949768379634,0.36311977822561886,-0.02216943459020578,0.28290526888357609, +0.60758986375566237,-0.17769508155988095,-0.37428738263361294,0.06973138803028064, + -0.26917609149376737,0.57488494776039478,-0.16182837448139925,-0.54589681560051329, + 0.35855708857331126,-0.06225155630035748,-0.01420478239284544,-0.51044946988565809, +0.30247332250465692,-0.58709398545244817,0.52755056373610110,-0.87395680874726944, + -0.25878588799924235,-0.14016351767195534,0.26932123245105705,0.18741971186875042, + -0.10443218008098379,-0.04666556894424437,-0.28998246181099013,0.39888953797173432, +0.29894996645459254,0.44648385188893014,-0.2747623990687768,0.12767005544410789, + 0.31187612680253268,0.93787911555703019,-0.69506239058785912,0.05675543905552551, + -0.38364317006532606,0.3015716880761152,0.60874303825197718,-0.02132168933396992, +0.28919354677500908,0.08791044194229901,-0.66719204004654808,-0.38892391716572344, + -0.35074795512020418,0.52079480741130679,-0.12341534994946383,0.10603293453188402, + 0.13292792440340936,-0.03924161719101939,0.50135087079896590,0.13741552942080246, +0.38584460158392103,-1.05581700070645756,1.33305654920496308,-0.4661197871120432, + -0.29411616444505956,-2.27258047015748854,0.15783833704105082,-0.52713266629484568, + 1.16440529465468257,-0.45001368365485012,-2.15999736051125257,1.01319717905315843, +0.29660053528020919,-0.30427398541498984,-0.12504282968902436,0.25589579382097077, + -0.08693274594974670,-0.03498727188829748,0.07574429063044799,0.24558509581470137, + -0.11120224069858284,-0.21580250756805028,-0.02724340730221109,-0.16362172134690667, +0.39424507332817937,0.26915663350224511,-0.48616892178714571,0.06722217755862435, + -0.30789732141190385,0.93830157987553686,0.36043785223845126,0.42644383761017990, + -0.13641385018671429,-0.30094945006660034,1.13850388440322159,-0.12250602188987858, +-0.66991170773376507,-0.33568935537136302,0.34616388717968199,0.16394571168478128, + 0.11497788571365419,-1.12355992799920523,0.90321218371657097,0.51843407168999134, + -0.5333460102169536,0.19508185891564755,-0.24491167665302710,0.43625522780082732, +0.52362419925864290,0.35626701996484733,0.07409894473807596,0.6687300563276672, + 0.02130172947699538,0.07525160898747016,0.33548314852403621,0.36350170853544833, + -0.43456386741360986,0.30564069254711729,0.60413672598431878,0.62344267157598554, +-0.55671778762503188,0.51384740986051547,-0.66364280764764905,0.20946393028509858, + 0.21734134196942456,1.01080770232414596,-0.81218225821401002,-0.14076620249135630, + 0.32963958497594853,-0.23647842638263297,0.58596014599473090,-0.68150457913031526, +0.52872556238983059,0.57098625620273025,1.06212082783082407,0.59423966432136910, + 0.34731906030365728,-1.35636228486699051,0.60027136476023302,-0.01921912593105047, + -0.26023872041264290,0.60546432820947238,-0.64774098495099597,1.07329929083653908} +; + +*/ + + + double in1[] = { 4 , 3 , 8 , 9 } ; + double in2[] = { 1 , 3 , 2 , 4 } ; + double result[] = { -1.25 , 0.75 , -1.166666666666666 ,0.83333333333333333 }; + + + double out [(COLUMNS2)*(LINES)] ; + + dldivma( in1 , LINES , COLUMNS1 , in2 , LINES , COLUMNS2 , out ) ; + for ( i = 0 ; i < LINES *COLUMNS2 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-15 ) ; + } + +} + + + +static void cldivmaTest (void ) +{ + int i = 0 ; + + float tin1[] = { 10.0f , 9.0f , 2.0f ,4.0f}; + float tin2[] = { 1.0f , 2.0f}; + + + + floatComplex* in1 ; + floatComplex* in2 ; + floatComplex* out ; + floatComplex Result[ZLINES*ZLINES] ; + + in1 = FloatComplexMatrix ( tin1 , tin1 , ZLINES*ZCOLUMNS1 ); + in2 = FloatComplexMatrix ( tin2 , tin2 , ZLINES*ZCOLUMNS2 ); + out = FloatComplexMatrix ( tin2 , tin2 , ZLINES*ZLINES ); + + Result[0] = FloatComplex ( 0 , 0 ); + Result[1] = FloatComplex ( 0.5f , 0 ); + + + cldivma ( in1 , ZLINES , ZCOLUMNS1 , in2 ,ZLINES , ZCOLUMNS2 , out) ; + + for ( i = 0 ; i < (ZCOLUMNS1*ZCOLUMNS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-06 && creals (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-16 ); + + + if ( cimags(out[i]) < 1e-06 && cimags (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-16 ) ; +} + +} + + + + + + + + + +static void zldivmaTest (void ) +{ + int i = 0 ; + + double tin1[] = { 10 , 9 , 2 ,4}; + double tin2[] = { 1 , 2}; +/* + double tin1[] = { 4 , 3 , 8 , 9 } ; + double tin2[] = { 1 , 3 , 2 , 4 } ; +*/ + + + doubleComplex* in1 ; + doubleComplex* in2 ; + doubleComplex* out ; + doubleComplex Result[ZLINES*ZLINES] ; + + in1 = DoubleComplexMatrix ( tin1 , tin1 , ZLINES*ZCOLUMNS1 ); + in2 = DoubleComplexMatrix ( tin2 , tin2 , ZLINES*ZCOLUMNS2 ); + out = DoubleComplexMatrix ( tin2 , tin2 , ZLINES*ZLINES ); + + Result[0] = DoubleComplex ( 0 , 0 ); + Result[1] = DoubleComplex ( 0.5 , 0 ); + /* + Result[0] = DoubleComplex ( -1.25 , 0 ); + Result[1] = DoubleComplex ( 0.75 , 0 ); + Result[2] = DoubleComplex ( -1.16666666 , 0 ); + Result[3] = DoubleComplex ( 0.833333333333 , 0 ); */ + + zldivma ( in1 , ZLINES , ZCOLUMNS1 , in2 ,ZLINES , ZCOLUMNS2 , out) ; + + for ( i = 0 ; i < (ZCOLUMNS1*ZCOLUMNS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + if ( zreals(out[i]) < 1e-16 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-16 ); + + + if ( zimags(out[i]) < 1e-16 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-16 ) ; + + } + +} + + + +static void mytest (void ){ + double in1[2] = { 1 , 4 } ; + double in2[3] = { 1 , 2 , 3 }; + double out[6] = { 0 , 0 , 0 , 0 ,0 , 0 } ; + + int i = 0 ; + + dldivma ( in1 , 1, 2, in2 , 1, 3 , out ); + + for ( i = 0 ; i <6; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + +static int testLDivma (void) { + printf ("&&&& WARNING , TESTS FOR COMPLEX ARE STILL WRONG &&&&&&\n\n" ) ; + + printf("\n\n\n\n*********************\n"); + printf("***** Left Tests ****\n"); + printf("*********************\n"); + + + + printf("\n\n\n\t>>> MY TEST Tests\n"); + mytest () ; + + printf("\n\t>>>>Float real Tests\n"); + sldivmaTest(); + + printf("\n\n\n\t>>>> Double real Tests\n"); + dldivmaTest(); + + + + printf("\n\t>>>> Double complex Tests\n"); + zldivmaTest(); + printf("\n\t>>>> Float complex Tests\n"); + cldivmaTest(); + + return 0; +} + +int main(void) { + assert(testLDivma () == 0); + return 0; +} + diff --git a/src/c/matrixOperations/division/testMatrixRDivision.c b/src/c/matrixOperations/division/testMatrixRDivision.c new file mode 100644 index 0000000..9f4bf27 --- /dev/null +++ b/src/c/matrixOperations/division/testMatrixRDivision.c @@ -0,0 +1,504 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "matrixDivision.h" + +#define LINES1 2 +#define LINES2 1 +#define COLUMNS 2 + +#define ZLINES1 2 +#define ZLINES2 1 +#define ZCOLUMNS 2 + + + + +static void sdivmaTest ( void ) +{ + int i = 0 ; +/* + float in1[] = + {0.51323400903493166f,0.6807207581587136f,0.54669387824833393f,0.24904179340228438f, + 0.95017496403306723f,0.91187966475263238f,0.78931419923901558f,0.30985609395429492f, + 0.71984737459570169f,0.9819172923453152f,0.76060794852674007f,0.504620002117008f, + 0.06844846438616514f,0.1693508871831f,0.76318027824163437f,0.30514528928324580f, + 0.92679917532950640f,0.04813073994591832f,0.93056132830679417f,0.31760499393567443f, +0.20109100220724940f,0.75775502342730761f,0.15586951794102788f,0.59756303764879704f, + 0.93055095290765166f,0.94091763999313116f,0.42790159443393350f,0.01439402624964714f, + 0.85971397114917636f,0.11901073250919580f,0.59864782588556409f,0.15444914810359478f, + 0.44080717256292701f,0.09636751096695662f,0.47461007768288255f,0.42803008854389191f, + 0.92924218205735087f,0.47864412236958742f,0.44434435339644551f,0.52509398944675922f, +0.78608208894729614f,0.46497652260586619f,0.06789979804307222f,0.24485790403559804f, + 0.71605867333710194f,0.99458031123504043f,0.84305586572736502f,0.45727639505639672f, + 0.29075053706765175f,0.55482550663873553f,0.28596154693514109f,0.07587631093338132f, + 0.66903266869485378f,0.32733985921368f,0.90166416298598051f,0.83553476119413972f, + 0.80835641175508499f,0.73590047238394618f,0.83198319096118212f,0.93355408729985356f, +0.78650354826822877f,0.74095427244901657f,0.95994638977572322f,0.51785656530410051f, + 0.78444739105179906f,0.13383972086012363f,0.43243235861882567f,0.74689115490764380f, + 0.96420694747939706f,0.22162469848990440f,0.41627834690734744f,0.81930211279541254f, + 0.21618453459814191f,0.08386900834739208f,0.48852836480364203f,0.20842899661511183f, + 0.22902313107624650f,0.78962677717208862f,0.25109061924740672f,0.57858273852616549f, +0.69515300076454878f,0.48902340466156602f,0.47249071300029755f,0.59868981270119548f, + 0.75798543263226748f,0.80475882859900594f,0.61186199076473713f,0.6943939602933824f, + 0.10014689620584249f,0.01250550756230950f,0.47080435231328011f,0.58039451343938708f, + 0.95630660001188517f,0.32801365898922086f,0.27026554010808468f,0.52016736706718802f, + 0.16067446302622557f,0.04408275568857789f,0.88035558909177780f,0.92851745663210750f, +0.42481321236118674f,0.73924016486853361f,0.16896168375387788f,0.39154956489801407f, + 0.97163037536665797f,0.88981838244944811f,0.90427244128659368f,0.31537816859781742f, + 0.06473635649308562f,0.58296835329383612f,0.14059370616450906f,0.63762421533465385f, + 0.67373040271922946f,0.44792105350643396f,0.60066422121599317f,0.06632651202380657f, + 0.66453591873869300f,0.19733488839119673f,0.45683057839050889f,0.08710412681102753f, +0.34466254524886608f,0.09304937114939094f,0.06055234652012587f,0.10790407890453935f, + 0.15703585743904114f,0.72192603675648570f,0.34105927217751741f,0.62482782872393727f, + 0.68893781490623951f,0.03671516245231032f,0.98292266484349966f,0.73650254914537072f, + 0.13196587935090065f,0.18807678623124957f,0.43376339320093393f,0.47929613338783383f, + 0.15195304714143276f,0.18539744755253196f,0.92726647388190031f,0.80549291754141450f, +0.64977857517078519f,0.70831089280545712f,0.90016864379867911f,0.51403949689120054f, + 0.49954565847292542f,0.55090149492025375f,0.92046913085505366f,0.74058383423835039f, + 0.82662396552041173f,0.3313873652368784f,0.68757036840543151f,0.06999884452670813f, + 0.41287241736426950f,0.04925781115889549f,0.85545881045982242f,0.31712341401726007f, + 0.03992868261411786f,0.92384314350783825f,0.74299975624307990f,0.00424729567021132f, +0.01225362811237574f,0.3223448325879872f,0.93296645395457745f,0.08063758304342628f, + 0.74957344215363264f,0.82469086581841111f,0.35314525663852692f,0.44088636664673686f, + 0.79343967605382204f,0.06321920128539205f,0.87087013013660908f,0.05352633958682418f, + 0.47160778101533651f,0.38195306668058038f,0.04547535255551338f,0.02313599688932300f, + 0.63996278587728739f,0.36444053100422025f,0.37049167416989803f,0.76907502254471183f, +0.89965870184823871f,0.89933154825121164f,0.64569224463775754f,0.34696785174310207f, + 0.39040711661800742f,0.08694788347929716f,0.22625351930037141f,0.21681279689073563f, + 0.33453882811591029f,0.15584628004580736f,0.95653126062825322f,0.83982629515230656f, + 0.50479181623086333f,0.54758223798125982f,0.83060362795367837f,0.21214072033762932f, + 0.02860224200412631f,0.95791505370289087f,0.91556971566751599f,0.94719038717448711f, +0.30791273340582848f,0.81771020544692874f,0.74679336044937372f,0.87552759842947125f, + 0.49545058421790600f,0.48191254725679755f,0.39087839704006910f,0.88425681227818131f, + 0.54299664497375488f,0.20552197424694896f,0.31019500363618135f,0.57183724315837026f, + 0.54999292083084583f,0.12055991357192397f,0.26517685409635305f,0.29529260704293847f, + 0.95132300630211830f,0.57458581728860736f,0.71528563741594553f,0.91191364871338010f, +0.18359116325154901f,0.45608301833271980f,0.17441136343404651f,0.18253823462873697f, + 0.77341705607250333f,0.01534702442586422f,0.27907355269417167f,0.94600243400782347f, + 0.39083331311121583f,0.35583620518445969f,0.58566563902422786f,0.44004907924681902f, + 0.79277362348511815f,0.96740394271910191f,0.06400812184438109f,0.07406814303249121f, + 0.03709788480773568f,0.85063817724585533f,0.10404936922714114f,0.12005183193832636f, +0.52963322307914495f,0.42104291776195168f,0.92252827808260918f,0.17444357229396701f, + 0.34813721571117640f,0.98178615467622876f,0.51038642041385174f,0.35229418566450477f, + 0.33187932055443525f,0.12522496515884995f,0.17751775681972504f,0.30953403143212199f, + 0.30514361429959536f,0.69633625121787190f,0.58739017136394978f,0.95729830628260970f, + 0.78135449346154928f,0.41670671710744500f,0.55824907496571541f,0.17518991930410266f, +0.11329598492011428f,0.87877958174794912f,0.81112976977601647f,0.1327551044523716f, + 0.88772260351106524f,0.77383322361856699f,0.39891980635002255f,0.42609489522874355f, + 0.29346287390217185f,0.29799025785177946f,0.62878308678045869f,0.90327445417642593f, + 0.88942573545500636f,0.11638559121638536f,0.92788035096600652f,0.30957929231226444f, + 0.2565767071209848f,0.42655616905540228f,0.26941573480144143f,0.65786541625857353f, +0.98608913458883762f,0.04273471748456359f,0.26294819917529821f,0.66961710015311837f, + 0.19781696423888206f,0.62439860356971622f,0.25354105327278376f,0.55396229820325971f, + 0.92479544691741467f,0.09095242014154792f,0.63873832207173109f,0.97996837133541703f, + 0.67638632655143738f,0.89037371007725596f,0.41085386741906404f,0.07612052233889699f, + 0.31289586611092091f,0.62697393959388137f,0.15661530848592520f,0.28013094374909997f}; + +float in2[] = + {0.56034345272928476f,0.89566554129123688f,0.53930272068828344f,0.3547350224107504f, + 0.80800013709813356f,0.62323769554495811f,0.58200186025351286f,0.56180121190845966f, + 0.23549679014831781f,0.28873602300882339f,0.43252215441316366f,0.7673156540840864f, + 0.06873596925288439f,0.18797885254025459f,0.86748637538403273f,0.73920361138880253f, + 0.97392784897238016f,0.86080306768417358f,0.39093428757041693f,0.57339327596127987f, +0.16198171628639102f,0.66783405328169465f,0.1454864419065416f,0.32747871475294232f, + 0.51621831534430385f,0.79978153714910150f,0.09275748720392585f,0.14153907122090459f, + 0.06119967205449939f,0.32070356840267777f,0.73968251561746001f,0.37837028549984097f, + 0.56752133695408702f,0.11224916437640786f,0.28770424565300345f,0.00037088664248586f, + 0.79149663401767612f,0.58377730334177613f,0.59390504425391555f,0.02694623963907361f, +0.76592414453625679f,0.02564378362149000f,0.74512455798685551f,0.02366107050329447f, + 0.06156063079833984f,0.04258572962135077f,0.63941287063062191f,0.38405111897736788f, + 0.14321060106158257f,0.42103306483477354f,0.05339348502457142f,0.93415357265621424f, + 0.59929492324590683f,0.66478141304105520f,0.14329732768237591f,0.42867958266288042f, + 0.10990926995873451f,0.63394964020699263f,0.05351450480520725f,0.54702291730791330f, +0.69746216991916299f,0.03159578284248710f,0.25769635709002614f,0.59392183972522616f, + 0.01609914982691407f,0.86753786867484450f,0.32879876391962171f,0.22861831961199641f, + 0.33929981896653771f,0.75886590173467994f,0.61312689306214452f,0.48855357570573688f, + 0.10645245248451829f,0.14542592084035277f,0.18745915638282895f,0.87820987729355693f, + 0.92918653646484017f,0.92348486324772239f,0.39261205168440938f,0.68466226710006595f, +0.08946218248456717f,0.42732305638492107f,0.77090662438422441f,0.924068246036768f, + 0.50982708018273115f,0.34508761204779148f,0.10317245963960886f,0.63696919381618500f, + 0.88041578140109777f,0.65034613572061062f,0.80938913393765688f,0.9986613355576992f, + 0.38141551148146391f,0.43060396797955036f,0.61948752496391535f,0.80996788293123245f, + 0.05324298795312643f,0.29668187908828259f,0.00448737759143114f,0.82276185229420662f, +0.19805425917729735f,0.10866974340751767f,0.99788628844544291f,0.6723356381990016f, + 0.46966064115986228f,0.79823006363585591f,0.67132972134277225f,0.35570297623053193f, + 0.52579802041873336f,0.25843874411657453f,0.19287035940214992f,0.59324032673612237f, + 0.25955950608476996f,0.61404782952740788f,0.21750316722318530f,0.81994143361225724f, + 0.19624035572633147f,0.8358787004835904f,0.42109713284298778f,0.31491625169292092f, +0.25988535769283772f,0.76794129703193903f,0.84549946337938309f,0.48446214850991964f, + 0.52822500281035900f,0.37241784948855639f,0.85067357495427132f,0.16846220474690199f, + 0.71482414938509464f,0.78300847951322794f,0.54156896471977234f,0.89239248540252447f, + 0.00643130205571651f,0.21658254135400057f,0.44520513340830803f,0.32618630956858397f, + 0.52326664514839649f,0.32250450644642115f,0.26230763643980026f,0.23438148852437735f, +0.50999558391049504f,0.37397424085065722f,0.64668390387669206f,0.64172910666093230f, + 0.03306737588718534f,0.18668571440503001f,0.83025926211848855f,0.99121205648407340f, + 0.38945918949320912f,0.27384403301402926f,0.41589357936754823f,0.99599931901320815f, + 0.81049045221880078f,0.96830060658976436f,0.40803860733285546f,0.52525822212919593f, + 0.33058117749169469f,0.23706211848184466f,0.17479355866089463f,0.62723324215039611f, +0.16741782892495394f,0.15187738463282585f,0.72003478836268187f,0.59474316425621510f, + 0.71126131806522608f,0.50548844784498215f,0.43874060269445181f,0.84671537391841412f, + 0.46396317798644304f,0.84823036566376686f,0.28646126668900251f,0.48104315437376499f, + 0.26604998949915171f,0.66378767788410187f,0.63686545100063086f,0.79531485401093960f, + 0.95694970060139894f,0.70720722898840904f,0.83713256847113371f,0.62996550090610981f, +0.34009417472407222f,0.72199993440881371f,0.67456434061750770f,0.10675506712868810f, + 0.79017778439447284f,0.34282173449173570f,0.58765271818265319f,0.07389529095962644f, + 0.16408033994957805f,0.12704358855262399f,0.51104495069012046f,0.07703803153708577f, + 0.12485344661399722f,0.51966900611296296f,0.49762418633326888f,0.77279568510130048f, + 0.95798523304983974f,0.22388020763173699f,0.83013197174295783f,0.04275623383000493f}; + + +float result[] = +{-0.13425098694507090f,0.24735018618193444f,-0.13997367470679392f,0.11987585715392905f, + -0.07023550140255914f,-0.32818483956327921f,0.82293845909628660f,-0.04825208923032670f, + 0.41107043821212774f,0.28834120500378574f, +0.26097631689267364f,0.41112922481604613f,-0.48704150701173060f,0.16756167892414930f, + 0.18525816194433214f,0.24194769618197037f,0.04516579999951376f,0.08210988946198612f, + -0.17724539433971653f,0.21570365259908197f, +0.46476238563747729f,0.12929328091152756f,0.03791742144738922f,0.33232469296313982f, + -0.14531956716307623f,-0.04355937726216118f,-0.32871318476723438f,0.16208735115250936f, + 0.27759742819012267f,0.20883772519304408f, +0.60589399320385928f,0.06028369176400562f,0.33610957414517950f,-0.32741653379843827f, + 0.32006732568590329f,0.12357809346654614f,0.26645037101516444f,-0.15778041923768410f, + -0.02281069075548223f,-0.21831876232917027f, +0.11316162639341981f,0.44869069077875356f,0.05087241573803265f,-0.07310286041500898f, + 0.24172631454502305f,0.20582249789901347f,-0.49030030296647070f,0.49725834464740676f, + -0.15098926456955386f,0.29845287904710704f, +0.26126025652717821f,0.61602266860724408f,-0.04395376298763495f,-0.31468851985942192f, + -0.42610430769336133f,0.07619666627024707f,0.42141080474076514f,0.34732212135875368f, + 0.21966932936729675f,-0.16465486570712187f, +0.01801836442044520f,0.13867951307716378f,-0.22823955222461578f,0.35528257041935002f, + 0.3416886047495104f,-0.05324845913867078f,-0.18334602929956423f,0.34486570917896908f, + -0.09850219178062529f,0.15717539967151753f, +0.26027320955453370f,0.24744146889140337f,-0.164185466873868f,-0.18897859269730288f, + -0.10286928200189474f,0.54800666111794050f,0.32097861553203794f,0.16617893447929227f, + -0.03433269255504845f,-0.01421332288783149f, +-0.24887241840873561f,0.52303584234440914f,0.02976416459895397f,-0.12264750867737524f, + 0.30087087321455463f,0.28120264259279731f,-0.02981261204955734f,-0.05832040687613257f, + 0.09480786369785668f,0.26640553810556677f, +0.28112837735944118f,0.53844297257991636f,0.87478164836631844f,-0.1409682347398108f, + 0.66145942836153393f,-0.26119505204825816f,-0.34297154024663806f,-0.24798246038042729f, + -0.30432340939641339f,0.37887301625026215f, +0.38327878821721156f,0.28922881585078497f,-0.34742629642806333f,-0.03677194909448467f, + -0.04829379940842784f,0.06878313210496664f,0.04495930782786764f,0.47892284040726463f, + 0.32833980213443120f,-0.23534654463679133f, +-0.02763634740677747f,0.72078725530634646f,0.48763002329592203f,-0.57876872035917137f, + 0.23063708055466298f,0.04745273757978258f,-0.28751023415434818f,0.138229588096174f, + 0.36392895348902060f,-0.15741181362164816f, +0.13480297497174423f,-0.06082319210597478f,-0.03346206227374363f,0.157369564795072f, + -0.09939329142432089f,0.50801256096451919f,-0.21552055455365590f,0.18726599728475304f, + -0.09981549922929681f,0.56837678961938298f, +0.51101691288362061f,0.72117205689181529f,0.47311124338037619f,-0.59816447223287172f, + 0.56148184747810326f,0.06803537921378118f,-0.12236345370998958f,-0.2366952577209536f, + -0.10560524465448745f,-0.03700000431544657f, +-0.07318875604760167f,0.49681103126620946f,0.16658812117729807f,0.19247716660649325f, + 0.17479922937365650f,0.20305642078183334f,-0.11893261285117168f,0.52167729786941019f, + -0.26590601210923126f,-0.17052720242327102f}; + */ + + /*float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ; + float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ; + float result[] = { 4.0f , 7.5f , 0.0f ,-1.5f }; +float out[(COLUMNS)*(LINES2)] ;*/ + + float in1[] = { 1.0f ,3.0f ,2.0f ,4.0f } ; + float in2[] = { 1.0f , 2.0f } ; + float result[] = { 1.0f , 2.2f }; + float out [(COLUMNS)*(LINES2)] ; + + + + srdivma ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ; + + for ( i = 0 ; i < LINES2 *COLUMNS ; ++i ) + { + printf ( "\t\t %d out : %e result : %e assert : %e \n" , + i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-6 ) ; + } + +} + + + + + + + +static void drdivmaTest ( void ) +{ + int i = 0 ; + +/* double in1[] = { 4 , 3 , 8 , 9 } ; + double in2[] = { 1 , 3 , 2 , 4 } ; + double result[] = { 4 , 7.5 , 0 ,-1.5 };*/ + + + double in1[] = { 1 ,3 ,2 ,4 } ; + double in2[] = { 1 , 2 } ; + double result[] = { 1 , 2.2 }; + double out [(COLUMNS)*(LINES2)] ; + + drdivma ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ; + for ( i = 0 ; i < LINES2 *COLUMNS ; i++ ) + { + printf ( "\t\t %d out : %e result : %e assert : %e \n" , + i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-16 ) ; + } + +} + +static void crdivmaTest (void ) +{ + int i = 0 ; + + float tin1[] = { 1.0f , 3.0f , 2.0f ,4.0f}; + float tin2[] = { 1.0f , 2.0f}; + + + floatComplex* in1 ; + floatComplex* in2 ; + floatComplex out[ZLINES2*ZCOLUMNS] ; + floatComplex Result[ZLINES1*ZLINES2] ; + + in1 = FloatComplexMatrix ( tin1 , tin1 , ZLINES1*ZCOLUMNS ); + in2 = FloatComplexMatrix ( tin2 , tin2 , ZLINES2*ZCOLUMNS ); + + + Result[0] = FloatComplex ( 1.0f , 0 ); + Result[1] = FloatComplex ( 2.2f , 0 ); + + crdivma ( in1 , ZLINES1 , ZCOLUMNS , in2 ,ZLINES2 , ZCOLUMNS , out) ; + + for ( i = 0 ; i < (ZLINES2*ZCOLUMNS ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-06 && creals (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-16 ); + + + if ( cimags(out[i]) < 1e-06 && cimags (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-16 ) ; + + } + +} + + + + + +static void zrdivmaTest ( void ){ + int i = 0 ; + +/* double tin1 [] = + {0.69949407549574971,0.25834653992205858,0.61552664963528514,0.19030105322599411, + 0.46075769001618028,0.52200102340430021,0.70538004627451301,0.88748936913907528, + 0.18582182424142957,0.09225247148424387,0.37796644819900393,0.93693156912922859, + 0.19805216649547219, +0.47020285483449697,0.37788185989484191,0.36296494491398335,0.27933338703587651, + 0.67214426863938570,0.69089507637545466,0.5104757994413376,0.06106034899130464, + 0.93353842478245497,0.14489983161911368,0.57212112657725811,0.54598869429901242, + 0.05166801903396845, +0.50110132200643420,0.92609716579318047,0.85469480464234948,0.58570997323840857, + 0.8791871047578752,0.25320483185350895,0.7903951373882592,0.63298055250197649, + 0.86023237137123942,0.90196201950311661,0.31587493652477860,0.40010235738009214, + 0.11108959605917335, +0.47051278315484524,0.53627631859853864,0.28784319106489420,0.87401255918666720, + 0.07408339157700539,0.28149573365226388,0.70837680157274008,0.16526474570855498, + 0.26673525758087635,0.88194080116227269,0.35371549893170595,0.02646211860701442, + 0.08616474270820618, +0.23139652097597718,0.13406464736908674,0.67240026732906699,0.19029983691871166, + 0.73075085924938321,0.50484903249889612,0.87911593122407794,0.55444371327757835, + 0.2063297093845904,0.40116110350936651,0.45593289798125625,0.69771515764296055, + 0.39659122796729207, +0.49838109035044909,0.14524227706715465,0.90753587335348129,0.10092954570427537, + 0.01771899592131376,0.79376714816316962,0.43091466091573238,0.58433785336092114, + 0.79542846325784922,0.13906158460304141,0.10127847269177437,0.331680862698704, + 0.83444251772016287, +0.05499405181035399,0.36960034258663654,0.74532664241269231,0.05718118418008089, + 0.59996518073603511,0.20857419073581696,0.87988782906904817,0.47828097920864820, + 0.71160991629585624,0.85858650319278240,0.80782221304252744,0.51599627826362848, + 0.89173404080793262, +0.88423488661646843,0.70964269945397973,0.66102255787700415,0.72523507243022323, + 0.51014349795877934,0.28248664410784841,0.22149151284247637,0.57675753859803081, + 0.70482534915208817,0.56079456442967057,0.36288804840296507,0.30883262446150184, + 0.98134148679673672, +0.74284822540357709,0.16163914743810892,0.36525219632312655,0.38350704684853554, + 0.11691810050979257,0.89112461265176535,0.06342720007523894,0.62639418430626392, + 0.68077020766213536,0.25885968375951052,0.43948043463751674,0.85988187789916992, + 0.54828232014551759, +0.81359952967613935,0.48982370039448142,0.02400260977447033,0.73691955255344510, + 0.24111561570316553,0.15296932263299823,0.26483592018485069,0.42981932172551751, + 0.76739394571632147,0.87532604997977614,0.37969883717596531,0.30623568268492818, + 0.38800517935305834} +; + double tin2[] = + {0.10472932783886790,0.76038318127393723,0.03409303957596421,0.14239662420004606, + 0.55545594682916999,0.80318974517285824,0.51839923160150647, +0.15185610298067331,0.58847306622192264,0.25450934842228889,0.99926799396052957, + 0.63989769574254751,0.55067161237820983,0.46070076711475849, +0.59330079378560185,0.65381935704499483,0.41683405218645930,0.99101553857326508, + 0.37207804108038545,0.70618240814656019,0.57808654149994254, +0.60231964103877544,0.57150967465713620,0.05496290419250727,0.12058544857427478, + 0.01436204835772514,0.02579512307420373,0.84112487640231848, +0.43818825250491500,0.46434015966951847,0.41974264057353139,0.80236544925719500, + 0.52285881666466594,0.50951210409402847,0.45319801801815629, +0.78178183268755674,0.77655703714117408,0.04660592041909695,0.51133266882970929, + 0.75021018926054239,0.68836286617442966,0.01677561178803444, +0.93454108992591500,0.56098637636750937,0.22058471059426665,0.76485407538712025, + 0.48169769765809178,0.15587856341153383,0.24760220525786281, +0.5216529071331024,0.08052303874865174,0.44094172399491072,0.89119336148723960, + 0.97805908136069775,0.45880937622860074,0.55104400310665369, +0.09609609050676227,0.41967850551009178,0.75025565037503839,0.72181495930999517, + 0.28955410188063979,0.39077644981443882,0.66866181464865804, +0.48776568192988634,0.46859717695042491,0.35626485198736191,0.34423254663124681, + 0.42533078324049711,0.55880581727251410,0.33048649691045284}; + + double tresult [] = +{0.09451169317317064,0.75015055776907902,0.36496074775718695,0.68454978838459446, + 0.13580235186649750,-0.73350613524989861,0.36833823393043919,0.27427787570717332, + 0.17435767433670571,1.27922130237729870,-0.15718152608891298,-0.66812523122285583, + 0.43535989166783623, +-0.17216817930992268,-1.11920478787033972,0.09365729285784405,-0.91168598672719281, + -0.5256902016286176,1.47418373212534837,0.32785551967187748,0.09665910045214705, + 0.38963814934750451,-0.74599090807052515,0.77435560834796702,1.17862196275483577, + 0.41913747422722752, +0.65168405083167491,-0.79778304970274549,-0.36689764540805470,-0.07037790812871010, + -0.90964747913660449,0.87009086524746737,-0.86086796711204328,0.69420170666117553, + 0.39900228216491013,0.01839542030829135,0.34079166496122038,0.94979559344928910, + 1.29342689865858507, +-0.64010890644433138,0.43942520236508265,0.36871562427022309,-0.23543430717113373, + 0.9837594524525952,-0.15541789413277388,0.51832027142464965,-0.49730447418173146, + 0.37785363034287500,0.05031307256758123,0.14529056591993289,-0.19261761155662854, + -0.65165849136819898, +0.56992829732488970,-0.67626872453203313,0.08987541550832115,-0.27809079516465274, + -0.52685742082861620,0.87085948155471882,-0.36015598439076552,0.24628281709439132, + 0.16018284982540432,-0.78765458348414275,0.4868803314915888,0.67004786693098373, + 1.38638653773561149, +0.49065638508775172,1.15002211885645633,0.31098171282535453,0.772677804931936, + 0.77563266454559698,-0.93158860042668212,0.20092451587523308,0.56834988643083173, + -0.03774794264631696,0.70322729924980754,-0.84660509947179974,-0.48910607201144141, + -0.91999377725600595, +0.57044463605090034,0.85729374705550832,0.03549271915962299,1.08806327983132478, + 0.40323683962485551,-0.27978276073461661,0.45277262688908537,0.06218152458345420, + -0.2153422115217984,0.68840508909853904,0.09945644614561956,-0.17861252621808085, + -0.44037299008464365} +;*/ + + double bR[6]={1,4,2,5,3,6}; + double bI[6]={1,0,4,0,1,2}; + double dR[9]={4,8,3,2,8,4,3,4,5}; + double dI[9]={0,0,4,0,-1,0,0,0,0}; + double rR[6]={0.9845119462120300868335,1.191739704646416209144,- 0.1118981870572697823185, + 0.2069876335694560698375,0.0988113819185977154680,0.3193660703565854852570}; + double rI[6]={- 1.3492616160403412273183,- 0.3196061952215153434409,0.5309160763597071674980, + - 0.3168447592748228625048,0.5848241085364388469614,0.8452395245527674072505}; + doubleComplex* in1 ; + doubleComplex* in2 ; + doubleComplex* out ; + doubleComplex* Result ; + + in1 = DoubleComplexMatrix ( bR,bI,6 ); + in2 = DoubleComplexMatrix ( dR,dI,9 ); + out = (doubleComplex*)malloc((unsigned int)6*sizeof(doubleComplex)); + Result = (doubleComplex*)malloc((unsigned int)6*sizeof(doubleComplex)); + + Result = DoubleComplexMatrix ( rR , rI , 6 ); + + zrdivma ( in1 , 2 , 3 , in2 ,3 , 3 , out) ; + + for ( i = 0 ; i < (6 ) ; i++ ) + { + printf ( "\t\t %d out : %1.20f + %1.20f * i result : %1.20f + %1.20f * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + if ( zreals(out[i]) < 1e-16 && zreals (Result[i]) < 1e-16 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-16 && zimags (Result[i]) < 1e-16 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(Result); + free(out); +} + + + +static void mytest (void ){ + double in1[16] = { 1 , 5 , 9 , 13 } ; + double in2[16] = { 2 , 6 , 10 } ; + + double out[16] = { 0 } ; + + int i = 0 ; + + drdivma ( in1 , 1 , 4 , in2 ,1, 3 , out ); + + for ( i = 0 ; i <1; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + + +static int testRDivma (void) { + + printf("\n\n\n\n**********************\n"); + printf("***** Right Tests ****\n"); + printf("**********************\n"); + mytest ( ); + printf("\n\t>>>> Float real Tests\n"); + sdivmaTest(); + + printf("\n\n\n\n\t>>>> Double real Tests\n"); + drdivmaTest(); + + printf("\n\t>>>> Float complex Tests\n"); + crdivmaTest(); + + printf("\n\t>>>> Double complex Tests\n"); + zrdivmaTest(); + return 0; +} + + +int main(void) { + assert(testRDivma () == 0); + return 0; +} diff --git a/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj new file mode 100644 index 0000000..73c770d --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B1F2A8CE-764A-4D51-AABD-998D48783894} + testMatrixLDivision + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters new file mode 100644 index 0000000..c7100b4 --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj new file mode 100644 index 0000000..5e554d6 --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {33833932-6973-483B-B0D1-B3CC800BDFF5} + testMatrixRDivision + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters new file mode 100644 index 0000000..edfc100 --- /dev/null +++ b/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/division/u16ldivma.c b/src/c/matrixOperations/division/u16ldivma.c new file mode 100644 index 0000000..d7901f3 --- /dev/null +++ b/src/c/matrixOperations/division/u16ldivma.c @@ -0,0 +1,111 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void u16ldivma (uint16* in1, int lines1, int columns1 , + uint16* in2, int lines2, int columns2 , + uint16* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + uint16 dblRcond = 0; + + uint16 dblEps = 0; + uint16 dblAnorm = 0; + + uint16 *pAf = NULL; + uint16 *pXb = NULL; + uint16 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (uint16*)malloc(sizeof(uint16) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (uint16*)malloc(sizeof(uint16) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (uint16*)malloc(sizeof(uint16) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/src/c/matrixOperations/division/u16rdivma.c b/src/c/matrixOperations/division/u16rdivma.c new file mode 100644 index 0000000..d664207 --- /dev/null +++ b/src/c/matrixOperations/division/u16rdivma.c @@ -0,0 +1,129 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void u16rdivma ( uint16 * in1, int lines1, int columns1, + uint16 * in2, int lines2, int columns2, + uint16 * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + uint16 dblRcond = 0; + + uint16 dblEps = 0; + uint16 dblAnorm = 0; + + uint16 *pAf = NULL; + uint16 *pAt = NULL; + uint16 *pBt = NULL; + uint16 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (uint16*)malloc(sizeof(uint16) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (uint16*)malloc(sizeof(uint16) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (uint16*)malloc(sizeof(uint16) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (uint16*)malloc(sizeof(uint16) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/src/c/matrixOperations/division/u16rdivv.c b/src/c/matrixOperations/division/u16rdivv.c new file mode 100644 index 0000000..66dc214 --- /dev/null +++ b/src/c/matrixOperations/division/u16rdivv.c @@ -0,0 +1,24 @@ +/* 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 "matrixDivision.h" + +uint16 u16rdivv(uint16 *in1, uint16 *in2, int size){ + + uint16 out[1] = { 0.0} ; + u16rdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/u8ldivma.c b/src/c/matrixOperations/division/u8ldivma.c new file mode 100644 index 0000000..ce491b4 --- /dev/null +++ b/src/c/matrixOperations/division/u8ldivma.c @@ -0,0 +1,111 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void u8ldivma (uint8* in1, int lines1, int columns1 , + uint8* in2, int lines2, int columns2 , + uint8* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + uint8 dblRcond = 0; + + uint8 dblEps = 0; + uint8 dblAnorm = 0; + + uint8 *pAf = NULL; + uint8 *pXb = NULL; + uint8 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (uint8*)malloc(sizeof(uint8) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (uint8*)malloc(sizeof(uint8) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (uint8*)malloc(sizeof(uint8) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/src/c/matrixOperations/division/u8rdivma.c b/src/c/matrixOperations/division/u8rdivma.c new file mode 100644 index 0000000..6ff4b17 --- /dev/null +++ b/src/c/matrixOperations/division/u8rdivma.c @@ -0,0 +1,129 @@ +/* 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 +#include +#include "matrixDivision.h" +#include "lapack.h" + +void u8rdivma ( uint8 * in1, int lines1, int columns1, + uint8 * in2, int lines2, int columns2, + uint8 * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + uint8 dblRcond = 0; + + uint8 dblEps = 0; + uint8 dblAnorm = 0; + + uint8 *pAf = NULL; + uint8 *pAt = NULL; + uint8 *pBt = NULL; + uint8 *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (uint8*)malloc(sizeof(uint8) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (uint8*)malloc(sizeof(uint8) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (uint8*)malloc(sizeof(uint8) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (uint8*)malloc(sizeof(uint8) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/src/c/matrixOperations/division/u8rdivv.c b/src/c/matrixOperations/division/u8rdivv.c new file mode 100644 index 0000000..92e5762 --- /dev/null +++ b/src/c/matrixOperations/division/u8rdivv.c @@ -0,0 +1,24 @@ +/* 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 "matrixDivision.h" + +uint8 u8rdivv(uint8 *in1, uint8 *in2, int size){ + + uint8 out[1] = { 0.0} ; + u8rdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/src/c/matrixOperations/division/zldivma.c b/src/c/matrixOperations/division/zldivma.c new file mode 100644 index 0000000..8557735 --- /dev/null +++ b/src/c/matrixOperations/division/zldivma.c @@ -0,0 +1,125 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixDivision.h" +#include "lapack.h" + +void zldivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ) +{ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int iRank = 0; + + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + doubleComplex *pAf = NULL; + doubleComplex *pXb = NULL; + doubleComplex *pDwork = NULL; + + + double *pRwork = NULL; + + + int *pIpiv = NULL; + int *pJpvt = NULL; + + iWork = max(2*columns2, min(lines2, columns2) + max(2 * min(lines2, columns2), max(lines2 + 1, min(lines2, columns2) + lines1))); + + + + /* Array allocations*/ + + + pAf = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) lines1 *(unsigned int)columns1); + pXb = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) max(lines1,columns1) *(unsigned int) columns2); + + + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns1); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)columns1); + pRwork = (double*)malloc(sizeof(double) * (unsigned int)columns1*2); + + + cNorm = '1'; + pDwork = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = C2F(zlange)(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + + if(lines1 == columns1) + { + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + + C2F(zlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, pXb, &columns1); + C2F(zgetrf)(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(zgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pRwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(zgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, pXb, &columns1, &iInfo); + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns2, pXb, &columns1, out, &columns1); + + iExit = 1; + } + + } + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(zlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int)columns1); + C2F(zgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &iRank, pDwork, &iWork, pRwork, &iInfo); + + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + + } + } + + + + + + free(pAf); + free(pXb); + free(pIpiv); + free(pJpvt); + free(pRwork); + free(pDwork); + +} diff --git a/src/c/matrixOperations/division/zrdivdzv.c b/src/c/matrixOperations/division/zrdivdzv.c new file mode 100644 index 0000000..eb17a8b --- /dev/null +++ b/src/c/matrixOperations/division/zrdivdzv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +doubleComplex zrdivdzv (double* in1, doubleComplex* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zrdivv(DoubleComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/src/c/matrixOperations/division/zrdivma.c b/src/c/matrixOperations/division/zrdivma.c new file mode 100644 index 0000000..73e69f4 --- /dev/null +++ b/src/c/matrixOperations/division/zrdivma.c @@ -0,0 +1,165 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixDivision.h" + +void zrdivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ) +{ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + + doubleComplex *poAf = NULL; + doubleComplex *poAt = NULL; + doubleComplex *poBt = NULL; + doubleComplex *poDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + double *pRwork = NULL; + + iWork = max(2*columns2, min(lines2, columns2) + max(2 * min(lines2, columns2), max(lines2 + 1, min(lines2, columns2) + lines1))); + + + + /* Array allocations*/ + + + poAf = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) lines2 *(unsigned int) columns2); + poAt = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines2 *(unsigned int) columns2); + poBt = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) max(lines2, columns2) *(unsigned int) lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns2); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) lines2); + pRwork = (double*)malloc(sizeof(double) * 2 *(unsigned int) lines2); + + + + cNorm = '1'; + poDwork = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = C2F(zlange)(&cNorm, &lines2, &columns2, in2, &lines2, poDwork); + + /* hermitian tranpose A (transpose + conjugate )*/ + + ztransposea(in2, lines2, columns2, poAt); + zconja ( poAt , lines2*columns2 , poAt ); + { + int i,j,ij,ji; + for(j = 0 ; j < lines1 ; j++) + { + for(i = 0 ; i < columns2 ; i++) + { + ij = i + j * max(lines2, columns2); + ji = j + i * lines1; + + poBt[ij] = DoubleComplex (zreals ( in1[ji] ) , - zimags ( in1[ji] ) ); + } + } + } + + if(lines2 == columns2) + { + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns2, &columns2, poAt, &columns1, poAf, &columns2); + C2F(zgetrf)(&columns2, &columns2, poAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(zgecon)(&cNorm, &columns2, poAf, &columns2, &dblAnorm, + &dblRcond, poDwork, pRwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(zgetrs)(&cNorm, &columns2, &lines1, poAf, &columns2, pIpiv, poBt, &columns2, &iInfo); + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = DoubleComplex ( zreals( poBt[ji]) , -zimags ( poBt[ji])); + + } + } + } + + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + + memset(pJpvt, 0x00,(unsigned int) sizeof(int) *(unsigned int) lines2); + C2F(zgelsy)(&columns2, &lines2, &lines1, poAt, &columns2, poBt, &iMax, + pJpvt, &dblRcond, &pRank[0], poDwork, &iWork, pRwork, &iInfo); + + if(iInfo == 0) + { + + /*// TransposeRealMatrix(pBt, lines1, lines2, _pdblRealOut, Max(lines1,columns1), lines2); + + //Mega caca de la mort qui tue des ours a mains nues + //mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = DoubleComplex ( zreals( poBt[ji]) , -zimags ( poBt[ji])); + } + } + } + } + } + + + + free(poAf); + free(poAt); + free(poBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pRwork); + free(poDwork); + +} + + diff --git a/src/c/matrixOperations/division/zrdivv.c b/src/c/matrixOperations/division/zrdivv.c new file mode 100644 index 0000000..f06abc4 --- /dev/null +++ b/src/c/matrixOperations/division/zrdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "division.h" +#include "matrixDivision.h" + +doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size){ + + doubleComplex out[1] ={ DoubleComplex (0.0 , 0.0) }; + zrdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + diff --git a/src/c/matrixOperations/division/zrdivzdv.c b/src/c/matrixOperations/division/zrdivzdv.c new file mode 100644 index 0000000..9a0e283 --- /dev/null +++ b/src/c/matrixOperations/division/zrdivzdv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +doubleComplex zrdivzdv (doubleComplex* in1,double* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zrdivv(in1 , DoubleComplexMatrix(in2,ZEROS,size),size ); + } diff --git a/src/c/matrixOperations/expm/Makefile.am b/src/c/matrixOperations/expm/Makefile.am new file mode 100644 index 0000000..682a250 --- /dev/null +++ b/src/c/matrixOperations/expm/Makefile.am @@ -0,0 +1,79 @@ +## +## 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 +## +## + +libMatrixExponential_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixExponential.la + +HEAD = ../includes/matrixExponential.h + +libMatrixExponential_la_SOURCES = $(HEAD) \ + dexpma.c \ + zexpma.c \ + sexpma.c \ + cexpma.c + + +check_PROGRAMS = testMatrixExponential + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + libMatrixExponential.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + + +testMatrixExponential_SOURCES = testMatrixExponential.c +testMatrixExponential_LDADD = $(check_LDADD) +testMatrixExponential_CFLAGS = $(check_INCLUDES) + + +TESTS = testMatrixExponential diff --git a/src/c/matrixOperations/expm/Makefile.in b/src/c/matrixOperations/expm/Makefile.in new file mode 100644 index 0000000..5bbe331 --- /dev/null +++ b/src/c/matrixOperations/expm/Makefile.in @@ -0,0 +1,753 @@ +# 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 = testMatrixExponential$(EXEEXT) +TESTS = testMatrixExponential$(EXEEXT) +subdir = src/c/matrixOperations/expm +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) +libMatrixExponential_la_LIBADD = +am__objects_1 = +am_libMatrixExponential_la_OBJECTS = $(am__objects_1) \ + libMatrixExponential_la-dexpma.lo \ + libMatrixExponential_la-zexpma.lo \ + libMatrixExponential_la-sexpma.lo \ + libMatrixExponential_la-cexpma.lo +libMatrixExponential_la_OBJECTS = \ + $(am_libMatrixExponential_la_OBJECTS) +libMatrixExponential_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixExponential_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixExponential_OBJECTS = \ + testMatrixExponential-testMatrixExponential.$(OBJEXT) +testMatrixExponential_OBJECTS = $(am_testMatrixExponential_OBJECTS) +testMatrixExponential_DEPENDENCIES = $(check_LDADD) +testMatrixExponential_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixExponential_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 = $(libMatrixExponential_la_SOURCES) \ + $(testMatrixExponential_SOURCES) +DIST_SOURCES = $(libMatrixExponential_la_SOURCES) \ + $(testMatrixExponential_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@ +libMatrixExponential_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixExponential.la +HEAD = ../includes/matrixExponential.h +libMatrixExponential_la_SOURCES = $(HEAD) \ + dexpma.c \ + zexpma.c \ + sexpma.c \ + cexpma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + libMatrixExponential.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMatrixExponential_SOURCES = testMatrixExponential.c +testMatrixExponential_LDADD = $(check_LDADD) +testMatrixExponential_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/expm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/expm/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 +libMatrixExponential.la: $(libMatrixExponential_la_OBJECTS) $(libMatrixExponential_la_DEPENDENCIES) + $(libMatrixExponential_la_LINK) -rpath $(pkglibdir) $(libMatrixExponential_la_OBJECTS) $(libMatrixExponential_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 +testMatrixExponential$(EXEEXT): $(testMatrixExponential_OBJECTS) $(testMatrixExponential_DEPENDENCIES) + @rm -f testMatrixExponential$(EXEEXT) + $(testMatrixExponential_LINK) $(testMatrixExponential_OBJECTS) $(testMatrixExponential_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-cexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-dexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-sexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-zexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixExponential-testMatrixExponential.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 $@ $< + +libMatrixExponential_la-dexpma.lo: dexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-dexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-dexpma.Tpo -c -o libMatrixExponential_la-dexpma.lo `test -f 'dexpma.c' || echo '$(srcdir)/'`dexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-dexpma.Tpo $(DEPDIR)/libMatrixExponential_la-dexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dexpma.c' object='libMatrixExponential_la-dexpma.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) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-dexpma.lo `test -f 'dexpma.c' || echo '$(srcdir)/'`dexpma.c + +libMatrixExponential_la-zexpma.lo: zexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-zexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-zexpma.Tpo -c -o libMatrixExponential_la-zexpma.lo `test -f 'zexpma.c' || echo '$(srcdir)/'`zexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-zexpma.Tpo $(DEPDIR)/libMatrixExponential_la-zexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zexpma.c' object='libMatrixExponential_la-zexpma.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) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-zexpma.lo `test -f 'zexpma.c' || echo '$(srcdir)/'`zexpma.c + +libMatrixExponential_la-sexpma.lo: sexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-sexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-sexpma.Tpo -c -o libMatrixExponential_la-sexpma.lo `test -f 'sexpma.c' || echo '$(srcdir)/'`sexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-sexpma.Tpo $(DEPDIR)/libMatrixExponential_la-sexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexpma.c' object='libMatrixExponential_la-sexpma.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) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-sexpma.lo `test -f 'sexpma.c' || echo '$(srcdir)/'`sexpma.c + +libMatrixExponential_la-cexpma.lo: cexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-cexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-cexpma.Tpo -c -o libMatrixExponential_la-cexpma.lo `test -f 'cexpma.c' || echo '$(srcdir)/'`cexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-cexpma.Tpo $(DEPDIR)/libMatrixExponential_la-cexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cexpma.c' object='libMatrixExponential_la-cexpma.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) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-cexpma.lo `test -f 'cexpma.c' || echo '$(srcdir)/'`cexpma.c + +testMatrixExponential-testMatrixExponential.o: testMatrixExponential.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixExponential_CFLAGS) $(CFLAGS) -MT testMatrixExponential-testMatrixExponential.o -MD -MP -MF $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo -c -o testMatrixExponential-testMatrixExponential.o `test -f 'testMatrixExponential.c' || echo '$(srcdir)/'`testMatrixExponential.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo $(DEPDIR)/testMatrixExponential-testMatrixExponential.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixExponential.c' object='testMatrixExponential-testMatrixExponential.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) $(testMatrixExponential_CFLAGS) $(CFLAGS) -c -o testMatrixExponential-testMatrixExponential.o `test -f 'testMatrixExponential.c' || echo '$(srcdir)/'`testMatrixExponential.c + +testMatrixExponential-testMatrixExponential.obj: testMatrixExponential.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixExponential_CFLAGS) $(CFLAGS) -MT testMatrixExponential-testMatrixExponential.obj -MD -MP -MF $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo -c -o testMatrixExponential-testMatrixExponential.obj `if test -f 'testMatrixExponential.c'; then $(CYGPATH_W) 'testMatrixExponential.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixExponential.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo $(DEPDIR)/testMatrixExponential-testMatrixExponential.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixExponential.c' object='testMatrixExponential-testMatrixExponential.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) $(testMatrixExponential_CFLAGS) $(CFLAGS) -c -o testMatrixExponential-testMatrixExponential.obj `if test -f 'testMatrixExponential.c'; then $(CYGPATH_W) 'testMatrixExponential.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixExponential.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/expm/cexpma.c b/src/c/matrixOperations/expm/cexpma.c new file mode 100644 index 0000000..7da0fc7 --- /dev/null +++ b/src/c/matrixOperations/expm/cexpma.c @@ -0,0 +1,173 @@ +/* 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 "matrixExponential.h" + +void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim) +{ + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + float fltExp = 0; + float fltS = 0; + float fltS2 = 0; + double fltCst = 0.5; + + + + floatComplex *pfltMatrixA = NULL; + floatComplex *pfltMatrixX = NULL; + floatComplex *pfltMatrixD = NULL; + floatComplex *pfltMatrixcX = NULL; + floatComplex *pfltMatrixcA = NULL; + floatComplex *pfltMatrixEye = NULL; + floatComplex *pfltMatrixTemp = NULL; + floatComplex *pfltMatrixTemp2 = NULL; + + + + + iSquare = _iLeadDim * _iLeadDim; + + pfltMatrixA = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixX = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixD = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixcX = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixcA = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixEye = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixTemp = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixTemp2 = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + + + /*// Scale A by power of 2 so that its norm is < 1/2 .*/ + sfrexps( cinfnorma( in, _iLeadDim, _iLeadDim) , &fltExp); + fltS = max(0, fltExp + 1); + fltS2 = spows(2.0f, fltS); + + /*A = A./2^s */ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixA[iIndex1] = crdivs ( in[iIndex1] , FloatComplex ( fltS2 , 0 )); + + + /* Pade approximation for exp(A) + //X = A */ + /*C2F(zcopy)(&iSquare, pfltMatrixA, &iOne, pfltMatrixX, &iOne );*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ; + + + ceyea(pfltMatrixEye, _iLeadDim, _iLeadDim); + + /*cmulma ( & cfltCst , 1 ,1, + pfltMatrixA , _iLeadDim, _iLeadDim, + pfltMatrixcA);*/ + + /* cA = A * c */ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcA[iIndex1] = cmuls ( pfltMatrixA[iIndex1] , FloatComplex((float) fltCst , 0) ) ; + + /*E = Eye + cA*/ + + cadda (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare, out ) ; + + /* D = Eye - cA */ + + cdiffa (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare,pfltMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + fltCst = fltCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + + /*Temp = X */ + /*C2F(zcopy)(&iSquare, pfltMatrixX, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ; + /* X = A * Temp; */ + + cmulma ( pfltMatrixA , _iLeadDim , _iLeadDim, + pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixX ); + /* cX = c * X */ + + /* cmulma ( & cfltCst , 1 ,1, + pfltMatrixX , _iLeadDim, _iLeadDim, + pfltMatrixcX);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcX[iIndex1] = cmuls ( pfltMatrixX[iIndex1] , FloatComplex((float) fltCst , 0) ) ; + + /* E = E + cX */ + + cadda ( out, iSquare , pfltMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /* D = D + cX */ + { + cadda ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ) ; + } + else /* D = D - cX */ + { + cdiffa ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ); + } + + /* Toggle iFlag */ + iFlag = !iFlag; + } + + /* Temp = E */ + /*C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = out[iIndex1] ; + + /* E = D\E */ + cldivma ( pfltMatrixD , _iLeadDim , _iLeadDim , pfltMatrixTemp , _iLeadDim , _iLeadDim , out ) ; + + /*/ Undo scaling by repeated squaring */ + for(iLoop1 = 0 ; iLoop1 < fltS ; iLoop1++) + { + /*//Temp = E */ + /*//Temp2 = E */ + + /*C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne); + C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp2, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pfltMatrixTemp [iIndex1] = out[iIndex1] ; + pfltMatrixTemp2[iIndex1] = out[iIndex1] ; + } + + /* E = E*E*/ + cmulma ( pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + + } + + free(pfltMatrixA); + free(pfltMatrixX); + free(pfltMatrixD); + free(pfltMatrixcX); + free(pfltMatrixcA); + free(pfltMatrixEye); + free(pfltMatrixTemp); + free(pfltMatrixTemp2); + + + + return ; +} diff --git a/src/c/matrixOperations/expm/dexpma.c b/src/c/matrixOperations/expm/dexpma.c new file mode 100644 index 0000000..d9b4232 --- /dev/null +++ b/src/c/matrixOperations/expm/dexpma.c @@ -0,0 +1,163 @@ +/* + * 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 "matrixExponential.h" + +void dexpma (double* in, double* out, int _iLeadDim){ + + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + double dblExp = 0; + double dblS = 0; + double dblS2 = 0; + double dblCst = 0.5; + + double *pdblMatrixA = NULL;/*A'*/ + double *pdblMatrixX = NULL;/*X*/ + double *pdblMatrixD = NULL;/*D*/ + double *pdblMatrixcX = NULL;/*cX*/ + double *pdblMatrixcA = NULL;/*cX*/ + double *pdblMatrixEye = NULL;/*Eye*/ + double *pdblMatrixTemp = NULL;/*Temp*/ + double *pdblMatrixTemp2 = NULL;/*Temp2*/ + + + + iSquare = _iLeadDim * _iLeadDim; + + pdblMatrixA = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixX = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixD = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixcX = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixcA = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixEye = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixTemp = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixTemp2 = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + + + + /* Scale A by power of 2 so that its norm is < 1/2 .*/ + dfrexps( dinfnorma( in, _iLeadDim, _iLeadDim), &dblExp); + dblS = max(0, dblExp + 1); + dblS2 = dpows(2, dblS); + + /*A = A./2^s*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixA[iIndex1] = in[iIndex1] / dblS2 ; + + /* Pade approximation for exp(A)*/ + /*X = A */ + /*C2F(dcopy)(&iSquare, pdblMatrixA, &iOne, pdblMatrixX, &iOne );*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ; + + deyea(pdblMatrixEye, _iLeadDim, _iLeadDim); + + + /*cA = A * c*/ + + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcA[iIndex1] = pdblMatrixA[iIndex1] * dblCst ; + + + /*E = Eye + cA*/ + dadda (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare, out ) ; + + /*D = Eye - cA*/ + ddiffa (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare,pdblMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + + /*Temp = X*/ + /*C2F(dcopy)(&iSquare, pdblMatrixX, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ; + /*X = A * Temp;*/ + + dmulma ( pdblMatrixA , _iLeadDim , _iLeadDim, + pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixX ); + + /*cX = c * X*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcX[iIndex1] = pdblMatrixX[iIndex1] * dblCst ; + + /*E = E + cX*/ + dadda ( out, iSquare , pdblMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /*D = D + cX*/ + { + dadda ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ) ; + } + else /*D = D - cX*/ + { + ddiffa ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ); + } + + /*Toggle iFlag*/ + iFlag = !iFlag; + } + + /*Temp = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = out[iIndex1] ; + + /*E = D\E*/ + dldivma ( pdblMatrixD , _iLeadDim , _iLeadDim , pdblMatrixTemp , _iLeadDim , _iLeadDim , out ); + + /* Undo scaling by repeated squaring*/ + for(iLoop1 = 0 ; iLoop1 < dblS ; iLoop1++) + { + /*Temp = E*/ + /*Temp2 = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne); + C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp2, &iOne);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pdblMatrixTemp [iIndex1] = out[iIndex1] ; + pdblMatrixTemp2[iIndex1] = out[iIndex1] ; + } + /* E = E*E*/ + dmulma ( pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + } + + free(pdblMatrixA); + free(pdblMatrixX); + free(pdblMatrixD); + free(pdblMatrixcX); + free(pdblMatrixcA); + free(pdblMatrixEye); + free(pdblMatrixTemp); + free(pdblMatrixTemp2); + + + + return ; +} diff --git a/src/c/matrixOperations/expm/sexpma.c b/src/c/matrixOperations/expm/sexpma.c new file mode 100644 index 0000000..cd96998 --- /dev/null +++ b/src/c/matrixOperations/expm/sexpma.c @@ -0,0 +1,167 @@ +/* + * 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 "matrixExponential.h" + +void sexpma (float* in, float* out, int _iLeadDim){ + + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + float fltExp = 0; + float fltS = 0; + float fltS2 = 0; + float fltCst = 0.5f; + double dblCst = 0.5; + + float *pfltMatrixA = NULL;/*A'*/ + float *pfltMatrixX = NULL;/*X*/ + float *pfltMatrixD = NULL;/*D*/ + float *pfltMatrixcX = NULL;/*cX*/ + float *pfltMatrixcA = NULL;/*cX*/ + float *pfltMatrixEye = NULL;/*Eye*/ + float *pfltMatrixTemp = NULL;/*Temp*/ + float *pfltMatrixTemp2 = NULL;/*Temp2*/ + + + + iSquare = _iLeadDim * _iLeadDim; + + pfltMatrixA = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixX = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixD = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixcX = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixcA = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixEye = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixTemp = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixTemp2 = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + + + + /* Scale A by power of 2 so that its norm is < 1/2 .*/ + sfrexps( sinfnorma( in, _iLeadDim, _iLeadDim), &fltExp); + fltS = max(0, fltExp + 1); + fltS2 = spows(2, fltS); + + /*A = A./2^s*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixA[iIndex1] = in[iIndex1] / fltS2; + + /* Pade approximation for exp(A)*/ + /*X = A */ + /*C2F(dcopy)(&iSquare, pfltMatrixA, &iOne, pfltMatrixX, &iOne );*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ; + + seyea(pfltMatrixEye, _iLeadDim, _iLeadDim); + + + /*cA = A * c*/ + + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcA[iIndex1] = pfltMatrixA[iIndex1] * fltCst ; + + + /*E = Eye + cA*/ + sadda (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare, out ) ; + + /*D = Eye - cA*/ + sdiffa (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare,pfltMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + + + dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + + dblCst += 0 ; + /*Temp = X*/ + /*C2F(dcopy)(&iSquare, pfltMatrixX, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ; + /*X = A * Temp;*/ + + smulma ( pfltMatrixA , _iLeadDim , _iLeadDim, + pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixX ); + + /*cX = c * X*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcX[iIndex1] = pfltMatrixX[iIndex1] * (float) dblCst ; + + /*E = E + cX*/ + sadda ( out, iSquare , pfltMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /*D = D + cX*/ + { + sadda ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ) ; + } + else /*D = D - cX*/ + { + sdiffa ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ); + } + + /*Toggle iFlag*/ + iFlag = !iFlag; + } + + /*Temp = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = out[iIndex1] ; + + /*E = D\E*/ + sldivma ( pfltMatrixD , _iLeadDim , _iLeadDim , pfltMatrixTemp , _iLeadDim , _iLeadDim , out ); + + /* Undo scaling by repeated squaring*/ + for(iLoop1 = 0 ; iLoop1 < fltS ; iLoop1++) + { + /*Temp = E*/ + /*Temp2 = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne); + C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp2, &iOne);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pfltMatrixTemp [iIndex1] = out[iIndex1] ; + pfltMatrixTemp2[iIndex1] = out[iIndex1] ; + } + /* E = E*E*/ + smulma ( pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + } + + free(pfltMatrixA); + free(pfltMatrixX); + free(pfltMatrixD); + free(pfltMatrixcX); + free(pfltMatrixcA); + free(pfltMatrixEye); + free(pfltMatrixTemp); + free(pfltMatrixTemp2); + + + + return ; +} diff --git a/src/c/matrixOperations/expm/testMatrixExponential.c b/src/c/matrixOperations/expm/testMatrixExponential.c new file mode 100644 index 0000000..278c36c --- /dev/null +++ b/src/c/matrixOperations/expm/testMatrixExponential.c @@ -0,0 +1,570 @@ +/* + * 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 +#include +#include "matrixExponential.h" + + +#define LEADDIM 10 + +#define DMATRIX_IN {0.15869047446176410,0.80895681912079453,0.72621259605512023,0.18993748771026731,\ + 0.43964602379128337,0.37921421090140939,0.95195201179012656,0.59145097108557820,\ + 0.70597065938636661,0.62873698258772492,\ +0.62407150492072105,0.68317985069006681,0.70999773032963276,0.25839814636856318,\ + 0.65407369285821915,0.76687160786241293,0.71278580836951733,0.68067426700145006,\ + 0.70181696489453316,0.28785153012722731,\ +0.63760355720296502,0.03401931514963508,0.47457459988072515,0.09878737432882190,\ + 0.58781063789501786,0.60066213225945830,0.11923700617626309,0.07392961112782359,\ + 0.40879997471347451,0.3292048736475408,\ +0.42704886104911566,0.23805456422269344,0.9438692079856992,0.06199027225375175,\ + 0.60208318661898375,0.78567356057465076,0.50091631803661585,0.94336947053670883,\ + 0.06362213846296072,0.47192330472171307,\ +0.10716815060004592,0.94920115964487195,0.14596485672518611,0.04034968325868249,\ + 0.04535020282492042,0.73871155502274632,0.32900535268709064,0.12863306934013963,\ + 0.06573933875188231,0.33537696348503232,\ +0.23822965659201145,0.21827886346727610,0.07141010463237762,0.74001471605151892,\ + 0.20294443331658840,0.55442603398114443,0.48089468106627464,0.20190807711333036,\ + 0.53310041315853596,0.55530697200447321,\ +0.94629473658278584,0.61546878470107913,0.67337385797873139,0.61626600986346602,\ + 0.78442738251760602,0.99291495559737086,0.33036959776654840,0.19693034281954169,\ + 0.03315818728879094,0.11960808141157031,\ +0.45766852516680956,0.83135433867573738,0.65369247179478407,0.6583583448082209,\ + 0.26375361625105143,0.97574284672737122,0.63044753577560186,0.89286901615560055,\ + 0.31578356493264437,0.76139996573328972,\ +0.89644787041470408,0.77340125897899270,0.19968961318954825,0.25145971449092031,\ + 0.43832763982936740,0.37096222722902894,0.21171907847747207,0.46179189579561353,\ + 0.37858232436701655,0.47909884760156274,\ +0.44384705275297165,0.4244190966710448,0.60141251794993877,0.38433500844985247,\ + 0.86648589745163918,0.30322382133454084,0.44860231317579746,0.62512917164713144,\ + 0.46195234358310699,0.28169692959636450} + +#define DMATRIX_RESULT {14.6458099031118518,15.9879935334969154,14.5023146230340352,9.79104027026660262,\ + 13.658147977601745,18.2826677794023276,13.9913488019182726,13.0555850244756648,\ + 11.2702097163264696,12.2080852641231488,\ +14.9576657268129818,18.0415870145381838,15.4577532112657572,10.6060207869925502,\ + 14.6987916130120198,19.9917861348452170,14.8484467294549827,14.0994958596124,\ + 12.1294313366477713,12.8836800651605152,\ +7.72729140087719646,8.27571528291814396,8.78222511899259928,5.22537042408334251,\ + 7.61718988429527233,10.1106593547443495,7.22727291477849576,6.72646688774223733,\ + 6.21430065514425589,6.69442204331610213,\ +11.8618893865302528,13.2731189359057637,12.8373872935372706,9.52692469532374631,\ + 11.9056327368823247,16.3654355264039921,11.8674243780595265,11.7206072002431814,\ + 9.24712051368910970,10.6966525674175159,\ +7.25089971320127891,8.98673751651268127,7.49831172728240691,5.29368504368777693,\ + 8.12154956830077346,10.3089262075282218,7.4337348502224856,6.83888206810676191,\ + 5.87125977419815737,6.5321378683758375,\ +9.25854069422946502,10.4059421461299539,9.47515410794143342,7.263789985253827,\ + 9.16034813421007321,13.6353552693330933,9.3726649654333336,8.83558176180042132,\ + 7.6055387753197277,8.4871270614444292,\ +12.6878667266786511,14.1417583108624711,13.0448499416136254,9.182764814582713,\ + 12.4852121681423256,17.073953108953809,13.2550267101027224,11.3640159258193041,\ + 9.6279844249894015,10.6765282334921068,\ +16.0691497196859565,18.4667994666424704,16.975871456346809,12.083598083627443,\ + 15.7522021028722747,22.0489520587189212,16.1322911282790358,16.8044904865300744,\ + 12.7829232118433556,14.5730443462997599,\ +11.943978463537455,13.6259118560125358,11.8068134298221956,8.21687415305816771,\ + 11.4127920042158735,15.2296090993128281,11.3826577511842082,11.0976684273648587,\ + 10.3857413785092909,10.2894980707345525,\ +11.5843985401712821,13.2781579371486753,12.1725305229437293,8.37850128011447204,\ + 11.8141382209783163,15.4022074994757734,11.484608766021573,11.1535660239869383,\ + 9.31343988645433285,11.1349864749012912} + + + + + +#define ZRMATRIX_IN {0.21132486546412110,0.56084860628470778,0.30760907428339124,0.50153415976092219, \ + 0.28064980218186975,0.40948254754766822,0.38737787725403905,0.53762298030778766,\ + 0.58787201577797532,0.64885628735646605,\ +0.75604385416954756,0.66235693730413914,0.93296162132173777,0.43685875833034515,\ + 0.12800584640353918,0.87841258011758327,0.92228986788541079,0.11999255046248436,\ + 0.48291792999953032,0.99231909401714802,\ +0.00022113462910056,0.72635067673400044,0.21460078610107303,0.26931248093023896,\ + 0.77831285959109664,0.11383596854284406,0.94881842611357570,0.2256303490139544,\ + 0.22328650346025825,0.05004197778180242,\ +0.33032709173858166,0.19851438421756029,0.31264199689030647,0.63257448654621840,\ + 0.21190304495394230,0.19983377400785685,0.34353372454643250,0.62740930821746588,\ + 0.84008856676518917,0.74855065811425447,\ +0.66538110421970487,0.54425731627270579,0.36163610080257058,0.40519540151581168,\ + 0.11213546665385365,0.56186607433483005,0.37601187312975526,0.76084325974807143,\ + 0.12059959070757031,0.41040589986369014,\ +0.62839178834110498,0.23207478970289230,0.2922266637906432,0.91847078315913677,\ + 0.68568959552794695,0.58961773291230202,0.73409405630081892,0.04855662025511265,\ + 0.28553641680628061,0.60845263302326202,\ +0.84974523587152362,0.23122371966019273,0.56642488157376647,0.04373343335464597,\ + 0.15312166837975383,0.68539796629920602,0.26157614728435874,0.67239497276023030,\ + 0.86075146449729800,0.85442108893766999,\ +0.68573101982474327,0.21646326314657927,0.48264719732105732,0.48185089323669672,\ + 0.69708506017923355,0.89062247332185507,0.49934938363730907,0.20171726960688829,\ + 0.84941016510128975,0.06426467280834913,\ +0.87821648130193353,0.88338878145441413,0.33217189135029912,0.26395560009405017,\ + 0.84155184263363481,0.50422128057107329,0.26385784195736051,0.39115739194676280,\ + 0.52570608118548989,0.82790829380974174,\ +0.06837403681129217,0.65251349471509457,0.59350947011262178,0.41481037065386772,\ + 0.40620247554033995,0.34936154074966908,0.52535630855709314,0.83003165572881699,\ + 0.99312098976224661,0.92623437754809856} + +#define ZIMATRIX_IN {0.56672112690284848,0.73956565884873271,0.02587099233642220,0.70648676296696067,\ + 0.96770532103255391,0.42568723810836673,0.18711117887869477,0.21240556007251143,\ + 0.69127879338338971,0.13049928424879909,\ +0.57116389367729425,0.00371731072664261,0.51744682248681784,0.52114724926650524,\ + 0.50685344357043505,0.24615605548024178,0.01895748358219862,0.57950199581682682,\ + 0.76568587962538004,0.96820035576820374,\ +0.81601104838773608,0.59005728596821427,0.39168732380494475,0.28704008506610990,\ + 0.52329764096066356,0.92295324662700295,0.84335647663101554,0.26281475694850087,\ + 0.35726496530696750,0.6561381467618048,\ +0.05689279362559319,0.3096467358991504,0.24135384149849415,0.65027950797230005,\ + 0.5596947595477104,0.10007458087056875,0.07485948316752911,0.43609866220504045,\ + 0.76933998242020607,0.24455389659851789,\ +0.55959366867318749,0.25522057106718421,0.50644348980858922,0.08813347620889544,\ + 0.56173070007935166,0.46782181179150939,0.85328151332214475,0.91105451015755534,\ + 0.54776339093223214,0.52831235667690635,\ +0.12493403162807226,0.62518793903291225,0.42361020017415285,0.44987633451819420,\ + 0.46817600261420012,0.39504976756870747,0.01245901081711054,0.80826673656702042,\ + 0.09622887428849936,0.84689256362617016,\ +0.72792222863063216,0.11574173765257001,0.28937275288626552,0.72272530803456903,\ + 0.77945467224344611,0.03661171020939946,0.18675393564626575,0.81026530498638749,\ + 0.95611717319115996,0.78766220854595304,\ +0.26777664758265018,0.61170040909200907,0.08879321813583374,0.89767962601035833,\ + 0.79010718129575253,0.51753685344010592,0.49205840751528740,0.25904283951967955,\ + 0.22074085660278797,0.12620826158672571,\ +0.54653349192813039,0.67839562846347690,0.62128817522898316,0.24278218811377883,\ + 0.98085420625284314,0.83254515705630183,0.74896081397309899,0.41390872886404395,\ + 0.01432593585923314,0.78838609857484698,\ +0.98854076582938433,0.33200952783226967,0.34549844544380903,0.43377211131155491,\ + 0.81870661024004221,0.61048321425914764,0.94149570073932409,0.35999277792870998,\ + 0.81914897728711367,0.34530424699187279} + + +#define ZRMATRIX_RESULT {4.6052332809216896,2.16205411267794823,1.12245312965776556,4.0468190853821735,\ + 7.29705295628955231,2.45894799152591625,2.29331674633863614,4.21571156291592253,\ + 2.81922686558935887,2.348781949769843,\ +2.07401297354815162,1.50063692688995753,0.25219828236411757,2.7063265188290884,\ + 6.35812780561968260,0.67264506810224134,0.79079814568186024,2.91747981321864280,\ + 1.01032692983832129,0.75975015828076931,\ +7.04077899650083694,5.39363072316827363,4.99449464719530045,6.79878933472462954,\ + 11.2977866849707205,5.7026161792862045,6.09443833294921244,7.35970702338152272,\ + 6.14030297304667272,5.80227288585002476,\ +1.52422494456658053,0.15792523935350228,-0.39437456229879331,3.21063571532312331,\ + 4.72654937095295491,0.19681048033039794,0.13926710536989889,2.4098033377935764,\ + 1.19110231590601412,0.24431206393184518,\ +5.84910802491279558,3.67968516288822922,2.73879619563976862,5.69547375492497387,\ + 10.2284804678743431,4.40378197582331143,3.9855513762320007,6.24858736599414133,\ + 4.57057059205936156,4.19331143449899635,\ +2.84423960711997825,0.91341486330902766,0.32799575263405639,3.63130361353437925,\ + 6.73358898182897025,2.44092642244158631,1.4035651670524776,3.29646069585033841,\ + 1.63804041671370615,1.34065096546340268,\ +5.04689360696997724,2.58451417966281571,1.89915292921285772,4.62170835433455451,\ + 9.05019265678329887,3.33670002112993291,3.66038974983755372,5.62296495186113443,\ + 4.04432332701467434,3.48415716881126114,\ +2.99051528256943167,0.76077291642727529,0.19995186822386554,2.96972391032047955,\ + 6.60462877127714787,1.8346028052798535,1.31621250911818244,3.73816126628208467,\ + 1.3788533261260996,0.30973924698106181,\ +5.20595600060592734,3.44646883779368096,1.85946748567920750,5.1361216710529769,\ + 10.0941765681228333,3.49429925842045552,3.05021742013193098,5.4348094549241184,\ + 4.51765668386982977,3.40850797720926035,\ +4.65702831667450212,3.03706964016556746,2.06940591125521856,5.11047315752830578,\ + 9.94379845012778674,3.3321507049026704,3.29919175160893818,5.94111235727490428,\ + 4.22429837741492253,4.41612421969640145} + +#define ZIMATRIX_RESULT {-14.2670217568608670,-12.454640354285063,-11.2804810864205063,-12.2724799117031509,\ + -14.2468231668880438,-13.7336716491454212,-13.4126704881317167,-13.2354295209306141,\ + -15.0748008268599314,-16.4106582082002141,\ +-18.1383938627890586,-16.2500310962210612,-13.6080240801173602,-16.1094229201551187,\ + -18.8440235801764437,-17.4411014766214336,-16.8096205594578301,-16.4844610002227725,\ + -18.6024277051838922,-19.7565384964549153,\ +-13.6088148145822956,-12.746762149308113,-10.9388281270062464,-12.2279241359128505,\ + -13.2072598928012983,-13.2417837783338328,-12.6472077791728861,-12.2778413042734709,\ + -14.8521542656410972,-15.7031049148228732,\ +-13.2144981163630746,-11.2231448799035274,-9.7632306445459864,-11.1681914913523084,\ + -13.2326349218083568,-12.3373828754640584,-11.7842111257382829,-11.8870664403988826,\ + -13.3125999502667849,-14.6665812584015534,\ +-14.2784445192169489,-13.0211070334450945,-11.1550881344005877,-12.7744646170515193,\ + -13.8646425595775469,-13.6955906712953759,-12.98118927813419,-12.5125330823426655,\ + -15.2470302805889251,-16.6299797243330687,\ +-15.3135193060880574,-12.8989039623516373,-11.1097185418698405,-12.9878481756480575,\ + -15.1819592065246791,-14.1554345301917017,-13.7019470831634962,-13.1000905274159241,\ + -15.697504333561957,-16.4727155095115592,\ +-16.6151865381969657,-15.0301220873079888,-13.119515101239017,-14.6038902499774128,\ + -16.5465022870658487,-16.2745681097221642,-15.5790325754692791,-14.9778105214080721,\ + -17.5880407064706752,-18.9858728410024717,\ +-15.2244202423134851,-12.9437967685452655,-11.4320003274904263,-12.6340981883688794,\ + -15.2648705712828949,-14.0427697860698029,-13.5757724082098221,-13.5147279252801411,\ + -15.9307999370437052,-16.8057661616885916,\ +-18.255930649471658,-16.1956269359019345,-13.6756135725252594,-16.3611958886634667,\ + -18.0721805983153097,-17.0517408001458151,-16.231614445430882,-16.4843630200203357,\ + -19.7691884354979948,-20.3871124127432672,\ +-18.2105493706955421,-16.9125659016652854,-14.4302205379609418,-16.7267447227195518,\ + -18.7135188739136353,-17.6467699531147559,-16.5820479292089722,-17.0861611432949942,\ + -19.7638794191151916,-21.2748129090505991} + +#define FMATRIX_IN {0.15869047446176410f,0.80895681912079453f,0.72621259605512023f,0.18993748771026731f,\ + 0.43964602379128337f,0.37921421090140939f,0.95195201179012656f,0.59145097108557820f,\ + 0.70597065938636661f,0.62873698258772492f,\ +0.62407150492072105f,0.68317985069006681f,0.70999773032963276f,0.25839814636856318f,\ + 0.65407369285821915f,0.76687160786241293f,0.71278580836951733f,0.68067426700145006f,\ + 0.70181696489453316f,0.28785153012722731f,\ +0.63760355720296502f,0.03401931514963508f,0.47457459988072515f,0.09878737432882190f,\ + 0.58781063789501786f,0.60066213225945830f,0.11923700617626309f,0.07392961112782359f,\ + 0.40879997471347451f,0.3292048736475408f,\ +0.42704886104911566f,0.23805456422269344f,0.9438692079856992f,0.06199027225375175f,\ + 0.60208318661898375f,0.78567356057465076f,0.50091631803661585f,0.94336947053670883f,\ + 0.06362213846296072f,0.47192330472171307f,\ +0.10716815060004592f,0.94920115964487195f,0.14596485672518611f,0.04034968325868249f,\ + 0.04535020282492042f,0.73871155502274632f,0.32900535268709064f,0.12863306934013963f,\ + 0.06573933875188231f,0.33537696348503232f,\ +0.23822965659201145f,0.21827886346727610f,0.07141010463237762f,0.74001471605151892f,\ + 0.20294443331658840f,0.55442603398114443f,0.48089468106627464f,0.20190807711333036f,\ + 0.53310041315853596f,0.55530697200447321f,\ +0.94629473658278584f,0.61546878470107913f,0.67337385797873139f,0.61626600986346602f,\ + 0.78442738251760602f,0.99291495559737086f,0.33036959776654840f,0.19693034281954169f,\ + 0.03315818728879094f,0.11960808141157031f,\ +0.45766852516680956f,0.83135433867573738f,0.65369247179478407f,0.6583583448082209f,\ + 0.26375361625105143f,0.97574284672737122f,0.63044753577560186f,0.89286901615560055f,\ + 0.31578356493264437f,0.76139996573328972f,\ +0.89644787041470408f,0.77340125897899270f,0.19968961318954825f,0.25145971449092031f,\ + 0.43832763982936740f,0.37096222722902894f,0.21171907847747207f,0.46179189579561353f,\ + 0.37858232436701655f,0.47909884760156274f,\ +0.44384705275297165f,0.4244190966710448f,0.60141251794993877f,0.38433500844985247f,\ + 0.86648589745163918f,0.30322382133454084f,0.44860231317579746f,0.62512917164713144f,\ + 0.46195234358310699f,0.28169692959636450f} + +#define FMATRIX_RESULT {14.6458099031118518f,15.9879935334969154f,14.5023146230340352f,9.79104027026660262f,\ + 13.658147977601745f,18.2826677794023276f,13.9913488019182726f,13.0555850244756648f,\ + 11.2702097163264696f,12.2080852641231488f,\ +14.9576657268129818f,18.0415870145381838f,15.4577532112657572f,10.6060207869925502f,\ + 14.6987916130120198f,19.9917861348452170f,14.8484467294549827f,14.0994958596124f,\ + 12.1294313366477713f,12.8836800651605152f,\ +7.72729140087719646f,8.27571528291814396f,8.78222511899259928f,5.22537042408334251f,\ + 7.61718988429527233f,10.1106593547443495f,7.22727291477849576f,6.72646688774223733f,\ + 6.21430065514425589f,6.69442204331610213f,\ +11.8618893865302528f,13.2731189359057637f,12.8373872935372706f,9.52692469532374631f,\ + 11.9056327368823247f,16.3654355264039921f,11.8674243780595265f,11.7206072002431814f,\ + 9.24712051368910970f,10.6966525674175159f,\ +7.25089971320127891f,8.98673751651268127f,7.49831172728240691f,5.29368504368777693f,\ + 8.12154956830077346f,10.3089262075282218f,7.4337348502224856f,6.83888206810676191f,\ + 5.87125977419815737f,6.5321378683758375f,\ +9.25854069422946502f,10.4059421461299539f,9.47515410794143342f,7.263789985253827f,\ + 9.16034813421007321f,13.6353552693330933f,9.3726649654333336f,8.83558176180042132f,\ + 7.6055387753197277f,8.4871270614444292f,\ +12.6878667266786511f,14.1417583108624711f,13.0448499416136254f,9.182764814582713f,\ + 12.4852121681423256f,17.073953108953809f,13.2550267101027224f,11.3640159258193041f,\ + 9.6279844249894015f,10.6765282334921068f,\ +16.0691497196859565f,18.4667994666424704f,16.975871456346809f,12.083598083627443f,\ + 15.7522021028722747f,22.0489520587189212f,16.1322911282790358f,16.8044904865300744f,\ + 12.7829232118433556f,14.5730443462997599f,\ +11.943978463537455f,13.6259118560125358f,11.8068134298221956f,8.21687415305816771f,\ + 11.4127920042158735f,15.2296090993128281f,11.3826577511842082f,11.0976684273648587f,\ + 10.3857413785092909f,10.2894980707345525f,\ +11.5843985401712821f,13.2781579371486753f,12.1725305229437293f,8.37850128011447204f,\ + 11.8141382209783163f,15.4022074994757734f,11.484608766021573f,11.1535660239869383f,\ + 9.31343988645433285f,11.1349864749012912f} + + + + + +#define CRMATRIX_IN {0.21132486546412110f,0.56084860628470778f,0.30760907428339124f,0.50153415976092219f, \ + 0.28064980218186975f,0.40948254754766822f,0.38737787725403905f,0.53762298030778766f,\ + 0.58787201577797532f,0.64885628735646605f,\ +0.75604385416954756f,0.66235693730413914f,0.93296162132173777f,0.43685875833034515f,\ + 0.12800584640353918f,0.87841258011758327f,0.92228986788541079f,0.11999255046248436f,\ + 0.48291792999953032f,0.99231909401714802f,\ +0.00022113462910056f,0.72635067673400044f,0.21460078610107303f,0.26931248093023896f,\ + 0.77831285959109664f,0.11383596854284406f,0.94881842611357570f,0.2256303490139544f,\ + 0.22328650346025825f,0.05004197778180242f,\ +0.33032709173858166f,0.19851438421756029f,0.31264199689030647f,0.63257448654621840f,\ + 0.21190304495394230f,0.19983377400785685f,0.34353372454643250f,0.62740930821746588f,\ + 0.84008856676518917f,0.74855065811425447f,\ +0.66538110421970487f,0.54425731627270579f,0.36163610080257058f,0.40519540151581168f,\ + 0.11213546665385365f,0.56186607433483005f,0.37601187312975526f,0.76084325974807143f,\ + 0.12059959070757031f,0.41040589986369014f,\ +0.62839178834110498f,0.23207478970289230f,0.2922266637906432f,0.91847078315913677f,\ + 0.68568959552794695f,0.58961773291230202f,0.73409405630081892f,0.04855662025511265f,\ + 0.28553641680628061f,0.60845263302326202f,\ +0.84974523587152362f,0.23122371966019273f,0.56642488157376647f,0.04373343335464597f,\ + 0.15312166837975383f,0.68539796629920602f,0.26157614728435874f,0.67239497276023030f,\ + 0.86075146449729800f,0.85442108893766999f,\ +0.68573101982474327f,0.21646326314657927f,0.48264719732105732f,0.48185089323669672f,\ + 0.69708506017923355f,0.89062247332185507f,0.49934938363730907f,0.20171726960688829f,\ + 0.84941016510128975f,0.06426467280834913f,\ +0.87821648130193353f,0.88338878145441413f,0.33217189135029912f,0.26395560009405017f,\ + 0.84155184263363481f,0.50422128057107329f,0.26385784195736051f,0.39115739194676280f,\ + 0.52570608118548989f,0.82790829380974174f,\ +0.06837403681129217f,0.65251349471509457f,0.59350947011262178f,0.41481037065386772f,\ + 0.40620247554033995f,0.34936154074966908f,0.52535630855709314f,0.83003165572881699f,\ + 0.99312098976224661f,0.92623437754809856f} + +#define CIMATRIX_IN {0.56672112690284848f,0.73956565884873271f,0.02587099233642220f,0.70648676296696067f,\ + 0.96770532103255391f,0.42568723810836673f,0.18711117887869477f,0.21240556007251143f,\ + 0.69127879338338971f,0.13049928424879909f,\ +0.57116389367729425f,0.00371731072664261f,0.51744682248681784f,0.52114724926650524f,\ + 0.50685344357043505f,0.24615605548024178f,0.01895748358219862f,0.57950199581682682f,\ + 0.76568587962538004f,0.96820035576820374f,\ +0.81601104838773608f,0.59005728596821427f,0.39168732380494475f,0.28704008506610990f,\ + 0.52329764096066356f,0.92295324662700295f,0.84335647663101554f,0.26281475694850087f,\ + 0.35726496530696750f,0.6561381467618048f,\ +0.05689279362559319f,0.3096467358991504f,0.24135384149849415f,0.65027950797230005f,\ + 0.5596947595477104f,0.10007458087056875f,0.07485948316752911f,0.43609866220504045f,\ + 0.76933998242020607f,0.24455389659851789f,\ +0.55959366867318749f,0.25522057106718421f,0.50644348980858922f,0.08813347620889544f,\ + 0.56173070007935166f,0.46782181179150939f,0.85328151332214475f,0.91105451015755534f,\ + 0.54776339093223214f,0.52831235667690635f,\ +0.12493403162807226f,0.62518793903291225f,0.42361020017415285f,0.44987633451819420f,\ + 0.46817600261420012f,0.39504976756870747f,0.01245901081711054f,0.80826673656702042f,\ + 0.09622887428849936f,0.84689256362617016f,\ +0.72792222863063216f,0.11574173765257001f,0.28937275288626552f,0.72272530803456903f,\ + 0.77945467224344611f,0.03661171020939946f,0.18675393564626575f,0.81026530498638749f,\ + 0.95611717319115996f,0.78766220854595304f,\ +0.26777664758265018f,0.61170040909200907f,0.08879321813583374f,0.89767962601035833f,\ + 0.79010718129575253f,0.51753685344010592f,0.49205840751528740f,0.25904283951967955f,\ + 0.22074085660278797f,0.12620826158672571f,\ +0.54653349192813039f,0.67839562846347690f,0.62128817522898316f,0.24278218811377883f,\ + 0.98085420625284314f,0.83254515705630183f,0.74896081397309899f,0.41390872886404395f,\ + 0.01432593585923314f,0.78838609857484698f,\ +0.98854076582938433f,0.33200952783226967f,0.34549844544380903f,0.43377211131155491f,\ + 0.81870661024004221f,0.61048321425914764f,0.94149570073932409f,0.35999277792870998f,\ + 0.81914897728711367f,0.34530424699187279f} + + +#define CRMATRIX_RESULT {4.6052332809216896f,2.16205411267794823f,1.12245312965776556f,4.0468190853821735f,\ + 7.29705295628955231f,2.45894799152591625f,2.29331674633863614f,4.21571156291592253f,\ + 2.81922686558935887f,2.348781949769843f,\ +2.07401297354815162f,1.50063692688995753f,0.25219828236411757f,2.7063265188290884f,\ + 6.35812780561968260f,0.67264506810224134f,0.79079814568186024f,2.91747981321864280f,\ + 1.01032692983832129f,0.75975015828076931f,\ +7.04077899650083694f,5.39363072316827363f,4.99449464719530045f,6.79878933472462954f,\ + 11.2977866849707205f,5.7026161792862045f,6.09443833294921244f,7.35970702338152272f,\ + 6.14030297304667272f,5.80227288585002476f,\ +1.52422494456658053f,0.15792523935350228f,-0.39437456229879331f,3.21063571532312331f,\ + 4.72654937095295491f,0.19681048033039794f,0.13926710536989889f,2.4098033377935764f,\ + 1.19110231590601412f,0.24431206393184518f,\ +5.84910802491279558f,3.67968516288822922f,2.73879619563976862f,5.69547375492497387f,\ + 10.2284804678743431f,4.40378197582331143f,3.9855513762320007f,6.24858736599414133f,\ + 4.57057059205936156f,4.19331143449899635f,\ +2.84423960711997825f,0.91341486330902766f,0.32799575263405639f,3.63130361353437925f,\ + 6.73358898182897025f,2.44092642244158631f,1.4035651670524776f,3.29646069585033841f,\ + 1.63804041671370615f,1.34065096546340268f,\ +5.04689360696997724f,2.58451417966281571f,1.89915292921285772f,4.62170835433455451f,\ + 9.05019265678329887f,3.33670002112993291f,3.66038974983755372f,5.62296495186113443f,\ + 4.04432332701467434f,3.48415716881126114f,\ +2.99051528256943167f,0.76077291642727529f,0.19995186822386554f,2.96972391032047955f,\ + 6.60462877127714787f,1.8346028052798535f,1.31621250911818244f,3.73816126628208467f,\ + 1.3788533261260996f,0.30973924698106181f,\ +5.20595600060592734f,3.44646883779368096f,1.85946748567920750f,5.1361216710529769f,\ + 10.0941765681228333f,3.49429925842045552f,3.05021742013193098f,5.4348094549241184f,\ + 4.51765668386982977f,3.40850797720926035f,\ +4.65702831667450212f,3.03706964016556746f,2.06940591125521856f,5.11047315752830578f,\ + 9.94379845012778674f,3.3321507049026704f,3.29919175160893818f,5.94111235727490428f,\ + 4.22429837741492253f,4.41612421969640145f} + +#define CIMATRIX_RESULT {-14.2670217568608670f,-12.454640354285063f,-11.2804810864205063f,-12.2724799117031509f,\ + -14.2468231668880438f,-13.7336716491454212f,-13.4126704881317167f,-13.2354295209306141f,\ + -15.0748008268599314f,-16.4106582082002141f,\ +-18.1383938627890586f,-16.2500310962210612f,-13.6080240801173602f,-16.1094229201551187f,\ + -18.8440235801764437f,-17.4411014766214336f,-16.8096205594578301f,-16.4844610002227725f,\ + -18.6024277051838922f,-19.7565384964549153f,\ +-13.6088148145822956f,-12.746762149308113f,-10.9388281270062464f,-12.2279241359128505f,\ + -13.2072598928012983f,-13.2417837783338328f,-12.6472077791728861f,-12.2778413042734709f,\ + -14.8521542656410972f,-15.7031049148228732f,\ +-13.2144981163630746f,-11.2231448799035274f,-9.7632306445459864f,-11.1681914913523084f,\ + -13.2326349218083568f,-12.3373828754640584f,-11.7842111257382829f,-11.8870664403988826f,\ + -13.3125999502667849f,-14.6665812584015534f,\ +-14.2784445192169489f,-13.0211070334450945f,-11.1550881344005877f,-12.7744646170515193f,\ + -13.8646425595775469f,-13.6955906712953759f,-12.98118927813419f,-12.5125330823426655f,\ + -15.2470302805889251f,-16.6299797243330687f,\ +-15.3135193060880574f,-12.8989039623516373f,-11.1097185418698405f,-12.9878481756480575f,\ + -15.1819592065246791f,-14.1554345301917017f,-13.7019470831634962f,-13.1000905274159241f,\ + -15.697504333561957f,-16.4727155095115592f,\ +-16.6151865381969657f,-15.0301220873079888f,-13.119515101239017f,-14.6038902499774128f,\ + -16.5465022870658487f,-16.2745681097221642f,-15.5790325754692791f,-14.9778105214080721f,\ + -17.5880407064706752f,-18.9858728410024717f,\ +-15.2244202423134851f,-12.9437967685452655f,-11.4320003274904263f,-12.6340981883688794f,\ + -15.2648705712828949f,-14.0427697860698029f,-13.5757724082098221f,-13.5147279252801411f,\ + -15.9307999370437052f,-16.8057661616885916f,\ +-18.255930649471658f,-16.1956269359019345f,-13.6756135725252594f,-16.3611958886634667f,\ + -18.0721805983153097f,-17.0517408001458151f,-16.231614445430882f,-16.4843630200203357f,\ + -19.7691884354979948f,-20.3871124127432672f,\ +-18.2105493706955421f,-16.9125659016652854f,-14.4302205379609418f,-16.7267447227195518f,\ + -18.7135188739136353f,-17.6467699531147559f,-16.5820479292089722f,-17.0861611432949942f,\ + -19.7638794191151916f,-21.2748129090505991f} + +/* FIXME: assert are 1e04 and 1e14 */ +static void sexpmaTest (void ) { + + int i = 0 ; + + float in[] = FMATRIX_IN ; + + float result[] = FMATRIX_RESULT ; + + float out[LEADDIM*LEADDIM] ; + + float mon_test[9]={4,8,3,2,8,4,3,4,5}; + float result_mon_test[9]={179660.90104359941324219f,452187.79172967246267945f,273148.88425553269917145f, + 163436.47016010177321732f,411353.63271151197841391f,248489.23907714022789150f, + 138776.82498170930193737f,349268.28353250800864771f,210989.61389596699154936f}; + float out_mon_test[9] ; + + sexpma ( in, out, LEADDIM) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-6 ) ; + } + + sexpma(mon_test,out_mon_test,3); + for ( i = 0 ; i < 9 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out_mon_test[i] - result_mon_test[i] ) / fabs( out_mon_test[i]) < 3e-5 ) ; + } +} + + + +static void dexpmaTest (void ) { + + int i = 0 ; + + double in[] = DMATRIX_IN ; + + double result[] = DMATRIX_RESULT ; + + double out[LEADDIM*LEADDIM] ; + + + dexpma ( in, out, LEADDIM) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-14 ) ; + } +} + + +static void cexpmaTest ( void) { + + int i = 0 ; + + float tRealIn [] = CRMATRIX_IN ; + float tImagIn [] = CIMATRIX_IN ; + + + + float tRealResult [] = CRMATRIX_RESULT ; + float tImagResult [] = CIMATRIX_RESULT ; + + floatComplex out[LEADDIM*LEADDIM ] ; + + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + cexpma ( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t + %e\t * i result : %e\t + %e\t * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 3e-16 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-4 ); + + + if ( cimags(out[i]) < 3e-16 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } +} + + + +static void zexpmaTest ( void) { + + int i = 0 ; + + double tRealIn [] = ZRMATRIX_IN ; + double tImagIn [] = ZIMATRIX_IN ; + + + + double tRealResult [] = ZRMATRIX_RESULT ; + double tImagResult [] = ZIMATRIX_RESULT ; + + doubleComplex out[LEADDIM*LEADDIM ] ; + + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + zexpma ( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t + %e\t * i result : %e\t + %e\t * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 3e-16 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-13 ); + + + if ( zimags(out[i]) < 3e-16 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-14) ; + + } +} + + +static int testExponential(void) { + + printf("\n>>>> Matrix Exponential Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dexpmaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sexpmaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cexpmaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zexpmaTest(); + + return 0; +} + + + +int main(void) { + assert(testExponential() == 0); + return 0; +} diff --git a/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj b/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj new file mode 100644 index 0000000..bac19e9 --- /dev/null +++ b/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1A4DDF0E-CF14-43FF-BBA3-6928EF6D1072} + testMatrixExponential + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters b/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters new file mode 100644 index 0000000..14a2384 --- /dev/null +++ b/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/expm/zexpma.c b/src/c/matrixOperations/expm/zexpma.c new file mode 100644 index 0000000..3de35e0 --- /dev/null +++ b/src/c/matrixOperations/expm/zexpma.c @@ -0,0 +1,178 @@ +/* + * 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 "matrixExponential.h" + +void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim) +{ + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + double dblExp = 0; + double dblS = 0; + double dblS2 = 0; + double dblCst = 0.5; + + doubleComplex zdblCst ; + + doubleComplex *pdblMatrixA = NULL; + doubleComplex *pdblMatrixX = NULL; + doubleComplex *pdblMatrixD = NULL; + doubleComplex *pdblMatrixcX = NULL; + doubleComplex *pdblMatrixcA = NULL; + doubleComplex *pdblMatrixEye = NULL; + doubleComplex *pdblMatrixTemp = NULL; + doubleComplex *pdblMatrixTemp2 = NULL; + + + + + iSquare = _iLeadDim * _iLeadDim; + + pdblMatrixA = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixX = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixD = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixcX = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixcA = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixEye = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixTemp = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixTemp2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + + zdblCst = DoubleComplex ( 0.5 , 0 ); + + /*// Scale A by power of 2 so that its norm is < 1/2 .*/ + dfrexps( zinfnorma( in, _iLeadDim, _iLeadDim) , &dblExp); + dblS = max(0, dblExp + 1); + dblS2 = pow(2, dblS); + + /*A = A./2^s */ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixA[iIndex1] = zrdivs ( in[iIndex1] , DoubleComplex ( dblS2 , 0 )); + + + /* Pade approximation for exp(A) + //X = A */ + /*C2F(zcopy)(&iSquare, pdblMatrixA, &iOne, pdblMatrixX, &iOne );*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ; + + + zeyea(pdblMatrixEye, _iLeadDim, _iLeadDim); + + /* zmulma ( & zdblCst , 1 ,1, + pdblMatrixA , _iLeadDim, _iLeadDim, + pdblMatrixcA);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcA[iIndex1] = zmuls ( pdblMatrixA[iIndex1] , zdblCst ) ; + + /* cA = A * c */ + + + /*E = Eye + cA*/ + + zadda (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare, out ) ; + + /* D = Eye - cA */ + + zdiffa (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare,pdblMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + zdblCst = DoubleComplex( dblCst , 0); + + /*Temp = X */ + /*C2F(zcopy)(&iSquare, pdblMatrixX, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ; + /* X = A * Temp; */ + + zmulma ( pdblMatrixA , _iLeadDim , _iLeadDim, + pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixX ); + /* cX = c * X */ + + /* zmulma ( & zdblCst , 1 ,1, + pdblMatrixX , _iLeadDim, _iLeadDim, + pdblMatrixcX);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcX[iIndex1] = zmuls ( pdblMatrixX[iIndex1] , zdblCst ) ; + + /* E = E + cX */ + + zadda ( out, iSquare , pdblMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /* D = D + cX */ + { + zadda ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ) ; + } + else /* D = D - cX */ + { + zdiffa ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ); + } + + /* Toggle iFlag */ + iFlag = !iFlag; + } + + /* Temp = E */ + /*C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = out[iIndex1] ; + + /* E = D\E */ + zldivma ( pdblMatrixD , _iLeadDim , _iLeadDim , pdblMatrixTemp , _iLeadDim , _iLeadDim , out ) ; + + /*/ Undo scaling by repeated squaring */ + for(iLoop1 = 0 ; iLoop1 < dblS ; iLoop1++) + { + /*//Temp = E */ + /*//Temp2 = E */ + + /*C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne); + C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp2, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pdblMatrixTemp [iIndex1] = out[iIndex1] ; + pdblMatrixTemp2[iIndex1] = out[iIndex1] ; + } + + /* E = E*E*/ + zmulma ( pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + + } + + free(pdblMatrixA); + free(pdblMatrixX); + free(pdblMatrixD); + free(pdblMatrixcX); + free(pdblMatrixcA); + free(pdblMatrixEye); + free(pdblMatrixTemp); + free(pdblMatrixTemp2); + + + + return ; +} diff --git a/src/c/matrixOperations/eye/Makefile.am b/src/c/matrixOperations/eye/Makefile.am new file mode 100644 index 0000000..706830d --- /dev/null +++ b/src/c/matrixOperations/eye/Makefile.am @@ -0,0 +1,46 @@ +## +## 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 +## +## + +libMatrixEye_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixEye.la + +HEAD = ../includes/matrixEye.h + +libMatrixEye_la_SOURCES = $(HEAD) \ + seyea.c \ + deyea.c \ + ceyea.c \ + zeyea.c + + + +check_PROGRAMS = testMatrixEye + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixEye.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/includes + +testMatrixEye_SOURCES = testMatrixEye.c +testMatrixEye_LDADD = $(check_LDADD) +testMatrixEye_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixEye diff --git a/src/c/matrixOperations/eye/Makefile.in b/src/c/matrixOperations/eye/Makefile.in new file mode 100644 index 0000000..5a07fc0 --- /dev/null +++ b/src/c/matrixOperations/eye/Makefile.in @@ -0,0 +1,712 @@ +# 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 = testMatrixEye$(EXEEXT) +TESTS = testMatrixEye$(EXEEXT) +subdir = src/c/matrixOperations/eye +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) +libMatrixEye_la_LIBADD = +am__objects_1 = +am_libMatrixEye_la_OBJECTS = $(am__objects_1) libMatrixEye_la-seyea.lo \ + libMatrixEye_la-deyea.lo libMatrixEye_la-ceyea.lo \ + libMatrixEye_la-zeyea.lo +libMatrixEye_la_OBJECTS = $(am_libMatrixEye_la_OBJECTS) +libMatrixEye_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixEye_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testMatrixEye_OBJECTS = testMatrixEye-testMatrixEye.$(OBJEXT) +testMatrixEye_OBJECTS = $(am_testMatrixEye_OBJECTS) +testMatrixEye_DEPENDENCIES = $(check_LDADD) +testMatrixEye_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixEye_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 = $(libMatrixEye_la_SOURCES) $(testMatrixEye_SOURCES) +DIST_SOURCES = $(libMatrixEye_la_SOURCES) $(testMatrixEye_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@ +libMatrixEye_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixEye.la +HEAD = ../includes/matrixEye.h +libMatrixEye_la_SOURCES = $(HEAD) \ + seyea.c \ + deyea.c \ + ceyea.c \ + zeyea.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixEye.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/includes + +testMatrixEye_SOURCES = testMatrixEye.c +testMatrixEye_LDADD = $(check_LDADD) +testMatrixEye_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/eye/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/eye/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 +libMatrixEye.la: $(libMatrixEye_la_OBJECTS) $(libMatrixEye_la_DEPENDENCIES) + $(libMatrixEye_la_LINK) -rpath $(pkglibdir) $(libMatrixEye_la_OBJECTS) $(libMatrixEye_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 +testMatrixEye$(EXEEXT): $(testMatrixEye_OBJECTS) $(testMatrixEye_DEPENDENCIES) + @rm -f testMatrixEye$(EXEEXT) + $(testMatrixEye_LINK) $(testMatrixEye_OBJECTS) $(testMatrixEye_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-ceyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-deyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-seyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-zeyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixEye-testMatrixEye.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 $@ $< + +libMatrixEye_la-seyea.lo: seyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-seyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-seyea.Tpo -c -o libMatrixEye_la-seyea.lo `test -f 'seyea.c' || echo '$(srcdir)/'`seyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-seyea.Tpo $(DEPDIR)/libMatrixEye_la-seyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='seyea.c' object='libMatrixEye_la-seyea.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) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-seyea.lo `test -f 'seyea.c' || echo '$(srcdir)/'`seyea.c + +libMatrixEye_la-deyea.lo: deyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-deyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-deyea.Tpo -c -o libMatrixEye_la-deyea.lo `test -f 'deyea.c' || echo '$(srcdir)/'`deyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-deyea.Tpo $(DEPDIR)/libMatrixEye_la-deyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deyea.c' object='libMatrixEye_la-deyea.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) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-deyea.lo `test -f 'deyea.c' || echo '$(srcdir)/'`deyea.c + +libMatrixEye_la-ceyea.lo: ceyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-ceyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-ceyea.Tpo -c -o libMatrixEye_la-ceyea.lo `test -f 'ceyea.c' || echo '$(srcdir)/'`ceyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-ceyea.Tpo $(DEPDIR)/libMatrixEye_la-ceyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ceyea.c' object='libMatrixEye_la-ceyea.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) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-ceyea.lo `test -f 'ceyea.c' || echo '$(srcdir)/'`ceyea.c + +libMatrixEye_la-zeyea.lo: zeyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-zeyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-zeyea.Tpo -c -o libMatrixEye_la-zeyea.lo `test -f 'zeyea.c' || echo '$(srcdir)/'`zeyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-zeyea.Tpo $(DEPDIR)/libMatrixEye_la-zeyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zeyea.c' object='libMatrixEye_la-zeyea.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) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-zeyea.lo `test -f 'zeyea.c' || echo '$(srcdir)/'`zeyea.c + +testMatrixEye-testMatrixEye.o: testMatrixEye.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixEye_CFLAGS) $(CFLAGS) -MT testMatrixEye-testMatrixEye.o -MD -MP -MF $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo -c -o testMatrixEye-testMatrixEye.o `test -f 'testMatrixEye.c' || echo '$(srcdir)/'`testMatrixEye.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo $(DEPDIR)/testMatrixEye-testMatrixEye.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixEye.c' object='testMatrixEye-testMatrixEye.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) $(testMatrixEye_CFLAGS) $(CFLAGS) -c -o testMatrixEye-testMatrixEye.o `test -f 'testMatrixEye.c' || echo '$(srcdir)/'`testMatrixEye.c + +testMatrixEye-testMatrixEye.obj: testMatrixEye.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixEye_CFLAGS) $(CFLAGS) -MT testMatrixEye-testMatrixEye.obj -MD -MP -MF $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo -c -o testMatrixEye-testMatrixEye.obj `if test -f 'testMatrixEye.c'; then $(CYGPATH_W) 'testMatrixEye.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixEye.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo $(DEPDIR)/testMatrixEye-testMatrixEye.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixEye.c' object='testMatrixEye-testMatrixEye.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) $(testMatrixEye_CFLAGS) $(CFLAGS) -c -o testMatrixEye-testMatrixEye.obj `if test -f 'testMatrixEye.c'; then $(CYGPATH_W) 'testMatrixEye.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixEye.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/eye/ceyea.c b/src/c/matrixOperations/eye/ceyea.c new file mode 100644 index 0000000..735018c --- /dev/null +++ b/src/c/matrixOperations/eye/ceyea.c @@ -0,0 +1,24 @@ +/* + * 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 "eye.h" + +void ceyea(floatComplex *in, int _iRows, int _iCols) +{ + int i , j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = FloatComplex ( (i == j)? 1.0f:0 , 0) ; + + +} diff --git a/src/c/matrixOperations/eye/deyea.c b/src/c/matrixOperations/eye/deyea.c new file mode 100644 index 0000000..eed9c05 --- /dev/null +++ b/src/c/matrixOperations/eye/deyea.c @@ -0,0 +1,23 @@ +/* + * 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 "eye.h" + +void deyea(double *in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?1:0 ; +} + diff --git a/src/c/matrixOperations/eye/i16eyea.c b/src/c/matrixOperations/eye/i16eyea.c new file mode 100644 index 0000000..a769061 --- /dev/null +++ b/src/c/matrixOperations/eye/i16eyea.c @@ -0,0 +1,23 @@ +/* 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 "eye.h" + +void i16eyea(int16* in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?(int16)1:(int16)0 ; +} + diff --git a/src/c/matrixOperations/eye/i8eyea.c b/src/c/matrixOperations/eye/i8eyea.c new file mode 100644 index 0000000..d69ac05 --- /dev/null +++ b/src/c/matrixOperations/eye/i8eyea.c @@ -0,0 +1,23 @@ +/* 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 "eye.h" + +void i8eyea(int8* in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?(int8)1:(int8)0 ; +} + diff --git a/src/c/matrixOperations/eye/seyea.c b/src/c/matrixOperations/eye/seyea.c new file mode 100644 index 0000000..2f256b8 --- /dev/null +++ b/src/c/matrixOperations/eye/seyea.c @@ -0,0 +1,23 @@ +/* + * 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 "eye.h" + +void seyea(float* in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?1.0f:0 ; +} + diff --git a/src/c/matrixOperations/eye/testMatrixEye.c b/src/c/matrixOperations/eye/testMatrixEye.c new file mode 100644 index 0000000..a368274 --- /dev/null +++ b/src/c/matrixOperations/eye/testMatrixEye.c @@ -0,0 +1,348 @@ +/* + * 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 +#include +#include + +#include "eye.h" + +#define LEADDIM 10 +#define ROWS 10 +#define COLS 5 + +#define ROWS2 5 +#define COLS2 10 + +static void deyeaTest ( void ) +{ + int i, j = 0 ; + + double result = 0 ; + double in [LEADDIM*LEADDIM] ; + double in2 [ROWS * COLS]; + double in3 [ROWS2 * COLS2]; + + deyea ( in , LEADDIM , LEADDIM ) ; + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + if ( i%(LEADDIM+1) == 0 ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + + if ( in[i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 3e-16 ) ; + } + + deyea ( in2, ROWS, COLS ); + for ( i = 0 ; i < ROWS ; i++ ) + { + for ( j = 0 ; j < COLS ; ++j ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in[i * ROWS + j] , result , + fabs( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) ) ; + + if ( in[i * ROWS + j] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) < 3e-16 ) ; + } + } + + deyea ( in3, ROWS2, COLS2); + for ( j = 0 ; j < COLS2 ; ++j ) + { + for ( i = 0 ; i < ROWS2 ; i++ ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in3[j * ROWS2 + i] , result , + fabs( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) ) ; + + if ( in3[j * ROWS2 + i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) < 3e-16 ) ; + } + } + +} + + +static void seyeaTest ( void ) +{ + int i, j = 0 ; + + float result = 0 ; + + float in[LEADDIM*LEADDIM] ; + float in2 [ROWS * COLS]; + float in3 [ROWS2 * COLS2]; + seyea ( in , LEADDIM , LEADDIM ) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++) + { + if ( i%(LEADDIM+1) == 0 ) + result = 1.0f ; + else + result = 0 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + if ( in[i] < 1e-6 && result < 1e-6 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 1e-6 ) ; + } + + seyea ( in2, ROWS, COLS ); + for ( i = 0 ; i < ROWS ; i++ ) + { + for ( j = 0 ; j < COLS ; ++j ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in[i * ROWS + j] , result , + fabs( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) ) ; + + if ( in[i * ROWS + j] < 1e-8 && result < 1e-8 ) + assert(1); + else + assert ( fabs ( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) < 1e-8 ) ; + } + } + + seyea ( in3, ROWS2, COLS2); + for ( j = 0 ; j < COLS2 ; ++j ) + { + for ( i = 0 ; i < ROWS2 ; i++ ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in3[j * ROWS2 + i] , result , + fabs( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) ) ; + + if ( in3[j * ROWS2 + i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) < 1e-14 ) ; + } + } + +} + + +static void zeyeaTest ( void ) +{ + int i = 0 ; + + doubleComplex result = DoubleComplex ( 0 , 0) ; + + doubleComplex in[LEADDIM*LEADDIM] ; + + zeyea ( in , LEADDIM , LEADDIM ) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + if ( i%(LEADDIM+1) == 0 ) + result = DoubleComplex ( 1 , 0 ) ; + else + result = DoubleComplex ( 0 , 0 ) ; + + printf ( "\t\t %d in : %e\tresult : %e \n" , i, zreals( in[i]) , zreals ( result ) ) ; + + if ( zreals( in[i]) < 1e-14 && zreals( result) < 1e-14 ) + assert(1); + else + assert ( fabs ( zreals(in[i]) - zreals(result)) / fabs( zreals(in[i])) < 3e-16) ; + + if ( zimags ( in[i]) < 1e-14 ) + assert (1); + else + assert (0); + + } +} + + + + + +static void ceyeaTest ( void ) +{ + int i = 0 ; + + floatComplex result = FloatComplex ( 0 , 0 ) ; + + floatComplex in[LEADDIM*LEADDIM] ; + + ceyea ( in , LEADDIM , LEADDIM ) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++) + { + if ( i%(LEADDIM+1) == 0 ) + result = FloatComplex ( 1.0f , 0 ) ; + else + result = FloatComplex ( 0 , 0 ) ; + + printf ( "\t\t %d in : %e\tresult : %e \n" , i, creals( in[i]) , creals ( result ) ) ; + if ( creals( in[i]) < 1e-6 && creals( result) < 1e-6 ) + assert(1); + else + assert ( fabs ( creals(in[i]) - creals(result)) / fabs( creals(in[i])) < 1e-6 ) ; + + if ( cimags ( in[i]) < 1e-6 ) + assert (1); + else + assert (0); + + } +} + +/* EYES TEST */ + +static void ceyesTest ( void ) +{ + + + floatComplex result = FloatComplex ( 1.0f , 0 ) ; + + floatComplex in = FloatComplex ( LEADDIM, LEADDIM ) ; + + in = ceyes ( in ) ; + + + + assert ( (creals(in) - creals(result)) / fabs( creals(in)) < 1e-6 ) ; + assert ( cimags (in) == 0) ; +} + + + + + +static void zeyesTest ( void ) +{ + + doubleComplex result = DoubleComplex ( 1 , 0 ) ; + + doubleComplex in = DoubleComplex ( LEADDIM , LEADDIM ) ; + + in = zeyes ( in ) ; + + + assert ( (zreals(in) - zreals(result)) / fabs( zreals(in)) < 1e-16 ) ; + assert ( zimags (in) == 0) ; +} + + + +static void deyesTest ( void ) +{ + + + double result = 1 ; + + double in = LEADDIM ; + + in = deyes ( in ) ; + + + assert ( (in - result) / in < 1e-16 ) ; ; +} + + + +static void seyesTest ( void ) +{ + + + float result = 1.0f ; + + float in = 154.0f ; + + in = seyes ( in ) ; + + + assert ( (in - result) / in < 1e-8 ) ; + +} + + + +static int testEye(void) { + + printf("\n>>>> Matrix Eye Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + deyeaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + seyeaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + ceyeaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zeyeaTest(); + + + + + printf("\t>>>> Matrix Double Realt Tests\n"); + deyesTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + seyesTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + ceyesTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zeyesTest(); + + return 0; +} + + + +int main(void) { + assert(testEye() == 0); + return 0; +} + + diff --git a/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj b/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj new file mode 100644 index 0000000..de03d19 --- /dev/null +++ b/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4F99E000-AC7D-4C3B-80C5-5A5A64D5757F} + testMatrixEye + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters b/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters new file mode 100644 index 0000000..66c22dc --- /dev/null +++ b/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/eye/u16eyea.c b/src/c/matrixOperations/eye/u16eyea.c new file mode 100644 index 0000000..bb01198 --- /dev/null +++ b/src/c/matrixOperations/eye/u16eyea.c @@ -0,0 +1,23 @@ +/* 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 "eye.h" + +void u16eyea(uint16* in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?(uint16)1:(uint16)0 ; +} + diff --git a/src/c/matrixOperations/eye/u8eyea.c b/src/c/matrixOperations/eye/u8eyea.c new file mode 100644 index 0000000..018fc3c --- /dev/null +++ b/src/c/matrixOperations/eye/u8eyea.c @@ -0,0 +1,23 @@ +/* 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 "eye.h" + +void u8eyea(uint8* in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?(uint8)1:(uint8)0 ; +} + diff --git a/src/c/matrixOperations/eye/zeyea.c b/src/c/matrixOperations/eye/zeyea.c new file mode 100644 index 0000000..622cc48 --- /dev/null +++ b/src/c/matrixOperations/eye/zeyea.c @@ -0,0 +1,24 @@ +/* + * 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 "eye.h" + +void zeyea(doubleComplex *in, int _iRows, int _iCols) +{ + int i , j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = DoubleComplex ( (i == j)? 1:0 , 0) ; + +} + diff --git a/src/c/matrixOperations/fill/Makefile.am b/src/c/matrixOperations/fill/Makefile.am new file mode 100644 index 0000000..e7506e2 --- /dev/null +++ b/src/c/matrixOperations/fill/Makefile.am @@ -0,0 +1,55 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 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 +## +## + +libMatrixFill_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixFill.la + +HEAD = ../includes/fill.h + +libMatrixFill_la_SOURCES = $(HEAD) \ + sfilla.c \ + dfilla.c \ + cfilla.c \ + zfilla.c + + +############ +## CHECK +############ + + +check_PROGRAMS = testDoubleFill testFloatFill + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixFill.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleFill_SOURCES = testDoubleFill.c +testDoubleFill_LDADD = $(check_LDADD) +testDoubleFill_CFLAGS = $(check_INCLUDES) + +testFloatFill_SOURCES = testFloatFill.c +testFloatFill_LDADD = $(check_LDADD) +testFloatFill_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleFill testFloatFill + + + + diff --git a/src/c/matrixOperations/fill/Makefile.in b/src/c/matrixOperations/fill/Makefile.in new file mode 100644 index 0000000..a28b991 --- /dev/null +++ b/src/c/matrixOperations/fill/Makefile.in @@ -0,0 +1,739 @@ +# 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 = testDoubleFill$(EXEEXT) testFloatFill$(EXEEXT) +TESTS = testDoubleFill$(EXEEXT) testFloatFill$(EXEEXT) +subdir = src/c/matrixOperations/fill +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) +libMatrixFill_la_LIBADD = +am__objects_1 = +am_libMatrixFill_la_OBJECTS = $(am__objects_1) \ + libMatrixFill_la-sfilla.lo libMatrixFill_la-dfilla.lo \ + libMatrixFill_la-cfilla.lo libMatrixFill_la-zfilla.lo +libMatrixFill_la_OBJECTS = $(am_libMatrixFill_la_OBJECTS) +libMatrixFill_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixFill_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleFill_OBJECTS = testDoubleFill-testDoubleFill.$(OBJEXT) +testDoubleFill_OBJECTS = $(am_testDoubleFill_OBJECTS) +testDoubleFill_DEPENDENCIES = $(check_LDADD) +testDoubleFill_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleFill_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatFill_OBJECTS = testFloatFill-testFloatFill.$(OBJEXT) +testFloatFill_OBJECTS = $(am_testFloatFill_OBJECTS) +testFloatFill_DEPENDENCIES = $(check_LDADD) +testFloatFill_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatFill_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 = $(libMatrixFill_la_SOURCES) $(testDoubleFill_SOURCES) \ + $(testFloatFill_SOURCES) +DIST_SOURCES = $(libMatrixFill_la_SOURCES) $(testDoubleFill_SOURCES) \ + $(testFloatFill_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@ +libMatrixFill_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixFill.la +HEAD = ../includes/fill.h +libMatrixFill_la_SOURCES = $(HEAD) \ + sfilla.c \ + dfilla.c \ + cfilla.c \ + zfilla.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixFill.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleFill_SOURCES = testDoubleFill.c +testDoubleFill_LDADD = $(check_LDADD) +testDoubleFill_CFLAGS = $(check_INCLUDES) +testFloatFill_SOURCES = testFloatFill.c +testFloatFill_LDADD = $(check_LDADD) +testFloatFill_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/fill/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/fill/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 +libMatrixFill.la: $(libMatrixFill_la_OBJECTS) $(libMatrixFill_la_DEPENDENCIES) + $(libMatrixFill_la_LINK) -rpath $(pkglibdir) $(libMatrixFill_la_OBJECTS) $(libMatrixFill_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 +testDoubleFill$(EXEEXT): $(testDoubleFill_OBJECTS) $(testDoubleFill_DEPENDENCIES) + @rm -f testDoubleFill$(EXEEXT) + $(testDoubleFill_LINK) $(testDoubleFill_OBJECTS) $(testDoubleFill_LDADD) $(LIBS) +testFloatFill$(EXEEXT): $(testFloatFill_OBJECTS) $(testFloatFill_DEPENDENCIES) + @rm -f testFloatFill$(EXEEXT) + $(testFloatFill_LINK) $(testFloatFill_OBJECTS) $(testFloatFill_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-cfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-dfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-sfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-zfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleFill-testDoubleFill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatFill-testFloatFill.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 $@ $< + +libMatrixFill_la-sfilla.lo: sfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-sfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-sfilla.Tpo -c -o libMatrixFill_la-sfilla.lo `test -f 'sfilla.c' || echo '$(srcdir)/'`sfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-sfilla.Tpo $(DEPDIR)/libMatrixFill_la-sfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfilla.c' object='libMatrixFill_la-sfilla.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) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-sfilla.lo `test -f 'sfilla.c' || echo '$(srcdir)/'`sfilla.c + +libMatrixFill_la-dfilla.lo: dfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-dfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-dfilla.Tpo -c -o libMatrixFill_la-dfilla.lo `test -f 'dfilla.c' || echo '$(srcdir)/'`dfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-dfilla.Tpo $(DEPDIR)/libMatrixFill_la-dfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfilla.c' object='libMatrixFill_la-dfilla.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) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-dfilla.lo `test -f 'dfilla.c' || echo '$(srcdir)/'`dfilla.c + +libMatrixFill_la-cfilla.lo: cfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-cfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-cfilla.Tpo -c -o libMatrixFill_la-cfilla.lo `test -f 'cfilla.c' || echo '$(srcdir)/'`cfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-cfilla.Tpo $(DEPDIR)/libMatrixFill_la-cfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfilla.c' object='libMatrixFill_la-cfilla.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) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-cfilla.lo `test -f 'cfilla.c' || echo '$(srcdir)/'`cfilla.c + +libMatrixFill_la-zfilla.lo: zfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-zfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-zfilla.Tpo -c -o libMatrixFill_la-zfilla.lo `test -f 'zfilla.c' || echo '$(srcdir)/'`zfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-zfilla.Tpo $(DEPDIR)/libMatrixFill_la-zfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfilla.c' object='libMatrixFill_la-zfilla.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) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-zfilla.lo `test -f 'zfilla.c' || echo '$(srcdir)/'`zfilla.c + +testDoubleFill-testDoubleFill.o: testDoubleFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFill_CFLAGS) $(CFLAGS) -MT testDoubleFill-testDoubleFill.o -MD -MP -MF $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo -c -o testDoubleFill-testDoubleFill.o `test -f 'testDoubleFill.c' || echo '$(srcdir)/'`testDoubleFill.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo $(DEPDIR)/testDoubleFill-testDoubleFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFill.c' object='testDoubleFill-testDoubleFill.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) $(testDoubleFill_CFLAGS) $(CFLAGS) -c -o testDoubleFill-testDoubleFill.o `test -f 'testDoubleFill.c' || echo '$(srcdir)/'`testDoubleFill.c + +testDoubleFill-testDoubleFill.obj: testDoubleFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFill_CFLAGS) $(CFLAGS) -MT testDoubleFill-testDoubleFill.obj -MD -MP -MF $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo -c -o testDoubleFill-testDoubleFill.obj `if test -f 'testDoubleFill.c'; then $(CYGPATH_W) 'testDoubleFill.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFill.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo $(DEPDIR)/testDoubleFill-testDoubleFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFill.c' object='testDoubleFill-testDoubleFill.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) $(testDoubleFill_CFLAGS) $(CFLAGS) -c -o testDoubleFill-testDoubleFill.obj `if test -f 'testDoubleFill.c'; then $(CYGPATH_W) 'testDoubleFill.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFill.c'; fi` + +testFloatFill-testFloatFill.o: testFloatFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFill_CFLAGS) $(CFLAGS) -MT testFloatFill-testFloatFill.o -MD -MP -MF $(DEPDIR)/testFloatFill-testFloatFill.Tpo -c -o testFloatFill-testFloatFill.o `test -f 'testFloatFill.c' || echo '$(srcdir)/'`testFloatFill.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFill-testFloatFill.Tpo $(DEPDIR)/testFloatFill-testFloatFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFill.c' object='testFloatFill-testFloatFill.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) $(testFloatFill_CFLAGS) $(CFLAGS) -c -o testFloatFill-testFloatFill.o `test -f 'testFloatFill.c' || echo '$(srcdir)/'`testFloatFill.c + +testFloatFill-testFloatFill.obj: testFloatFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFill_CFLAGS) $(CFLAGS) -MT testFloatFill-testFloatFill.obj -MD -MP -MF $(DEPDIR)/testFloatFill-testFloatFill.Tpo -c -o testFloatFill-testFloatFill.obj `if test -f 'testFloatFill.c'; then $(CYGPATH_W) 'testFloatFill.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFill.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFill-testFloatFill.Tpo $(DEPDIR)/testFloatFill-testFloatFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFill.c' object='testFloatFill-testFloatFill.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) $(testFloatFill_CFLAGS) $(CFLAGS) -c -o testFloatFill-testFloatFill.obj `if test -f 'testFloatFill.c'; then $(CYGPATH_W) 'testFloatFill.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFill.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/fill/cfilla.c b/src/c/matrixOperations/fill/cfilla.c new file mode 100644 index 0000000..0c59104 --- /dev/null +++ b/src/c/matrixOperations/fill/cfilla.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "fill.h" + +void cfilla (floatComplex* in, int rows, int cols, floatComplex constant){ + int i; + + for (i=0;i +#include +#include "fill.h" + +static void dfillaTest(){ + double in[6]; + double constant=7; + int i; + dfilla(in, 2,3,constant); + for (i=0;i<6;i++) + printf("indice : %d -- valeur : %f\n",i,in[i]); + +} + +static void zfillaTest(){ + doubleComplex in[9]; + doubleComplex constant=DoubleComplex(1,1); + int i; + + zfilla(in, 3, 3, constant); + for (i=0;i<9;i++) + printf("indice : %d -- valeur : %f+%f *i\n",i,zreals(in[i]),zimags(in[i])); +} + + +static int fillTest(){ + dfillaTest(); + zfillaTest(); + return 0; +} + +int main(void){ + assert(fillTest()==0); + return 0; +} + + diff --git a/src/c/matrixOperations/fill/testFloatFill.c b/src/c/matrixOperations/fill/testFloatFill.c new file mode 100644 index 0000000..cfe1e61 --- /dev/null +++ b/src/c/matrixOperations/fill/testFloatFill.c @@ -0,0 +1,47 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include "fill.h" + +static void sfillaTest(){ + float in[8]; + float constant=2; + int i; + sfilla(in, 4, 2, constant); + for (i=0;i<8;i++) + printf("indice : %d -- valeur : %f\n",i,in[i]); +} + +static void cfillaTest(){ + floatComplex in[15]; + floatComplex constant=FloatComplex(4,0); + int i; + cfilla(in, 3, 5, constant); + for (i=0;i<15;i++) + printf("indice : %d -- valeur : %f+%f *i\n",i,creals(in[i]),cimags(in[i])); +} + + +static int fillTest(){ + sfillaTest(); + cfillaTest(); + return 0; +} + +int main(void){ + assert(fillTest()==0); + return 0; +} + + diff --git a/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj b/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj new file mode 100644 index 0000000..69daa27 --- /dev/null +++ b/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {903B0194-F1A9-4302-AC3D-7E88E0406E26} + testDoubleFill + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters b/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters new file mode 100644 index 0000000..6bf973f --- /dev/null +++ b/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj b/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj new file mode 100644 index 0000000..e5c4f79 --- /dev/null +++ b/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {054C79A1-A607-496B-96CE-6F0BB404F754} + testFloatFill + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters b/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters new file mode 100644 index 0000000..071148d --- /dev/null +++ b/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/fill/zfilla.c b/src/c/matrixOperations/fill/zfilla.c new file mode 100644 index 0000000..2936cc5 --- /dev/null +++ b/src/c/matrixOperations/fill/zfilla.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "fill.h" + + +void zfilla (doubleComplex* in, int rows, int cols, doubleComplex constant){ + int i; + + for (i=0;i +#include +#include +#include +#include "hilb.h" + +#define SIZE 6 + +static void shilbaTest ( void ){ + + int i = 0 ; + int j = 0 ; + + + float Result[] = + {36.0f,-630.0f,3360.0f,-7560.0f,7560.0f,-2772.0f, +-630.0f,14700.0f,-88200.0f,211680.0f,-220500.0f,83160.0f, +3360.0f,-88200.0f,564480.0f,-1411200.0f,1512000.0f,-582120.0f, +-7560.0f,211680.0f,-1411200.0f,3628800.0f,-3969000.0f,1552320.0f, +7560.0f,-220500.0f,1512000.0f,-3969000.0f,4410000.0f,-1746360.0f, +-2772.0f,83160.0f,-582120.0f,1552320.0f,-1746360.0f,698544.0f}; + + + + float out[SIZE*SIZE] ; + shilba ( out , SIZE ) ; + + for (i = 0 ; i < SIZE ; i++) + { + printf ("\n\t" ) ; + for ( j = 0 ; j < SIZE; j++) + printf ("%e\t" , out[i + j*SIZE] ); + + } + + for ( i = 0 ; i < SIZE*SIZE ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-06 ) ; + } + + printf ("\n\n" ) ; +} + +static void dhilbaTest ( void ){ + + int i = 0 ; + int j = 0 ; + + double Result[] = +{36,-630,3360,-7560,7560,-2772, +-630,14700,-88200,211680,-220500,83160, +3360,-88200,564480,-1411200,1512000,-582120, +-7560,211680,-1411200,3628800,-3969000,1552320, +7560,-220500,1512000,-3969000,4410000,-1746360, +-2772,83160,-582120,1552320,-1746360,698544} +; + + + double out[SIZE*SIZE] ; + + dhilba ( out , SIZE ) ; + + for (i = 0 ; i < SIZE ; i++) + { + printf ("\n\t" ) ; + for ( j = 0 ; j < SIZE; j++) + printf ("%e\t" , out[i + j*SIZE] ); + + } + + + for ( i = 0 ; i < SIZE*SIZE ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-16 ) ; + } + + printf ("\n\n" ) ; +} + + + +static int testHilbert(void) { + + printf("\n>>>>Hilbert's Matrix Tests\n"); + + printf("\n\t>>> Float Test\n"); + shilbaTest(); + + printf("\n\t>>> Double Test\n"); + dhilbaTest(); + + return 0; +} + + + +int main(void) { + assert(testHilbert() == 0); + return 0; +} diff --git a/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj b/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj new file mode 100644 index 0000000..53b805d --- /dev/null +++ b/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F7747E9B-A57F-43D2-8C1F-1F77C670B406} + testHilbert + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters b/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters new file mode 100644 index 0000000..0e5affa --- /dev/null +++ b/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/includes/cat.h b/src/c/matrixOperations/includes/cat.h new file mode 100644 index 0000000..dde6b9b --- /dev/null +++ b/src/c/matrixOperations/includes/cat.h @@ -0,0 +1,162 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __CAT_H__ +#define __CAT_H__ +#include "types.h" +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief concat 2 floats scalars +*/ +EXTERN_MATOPS void srowcats(float in1, float in2, float *out); +EXTERN_MATOPS void scolumncats(float in1, float in2, float *out); + +/* +** \brief concat 2 double scalars +*/ +EXTERN_MATOPS void drowcats(double in1, double in2, double *out); +EXTERN_MATOPS void dcolumncats(double in1, double in2, double *out); + +/* +** \brief concat 2 floats complex scalars +*/ +EXTERN_MATOPS void crowcats(floatComplex in1, floatComplex in2, floatComplex *out); +EXTERN_MATOPS void ccolumncats(floatComplex in1, floatComplex in2, floatComplex *out); + +/* +** \brief concat 2 double complex scalars +*/ +EXTERN_MATOPS void zrowcats(doubleComplex in1, doubleComplex in2, doubleComplex *out); +EXTERN_MATOPS void zcolumncats(doubleComplex in1, doubleComplex in2, doubleComplex *out); + +/* +** \brief Concat float arrays +** \param in1 the float array to process +** \param lines1 +** \param columns1 +** \param in2 the float array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void srowcata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out); +EXTERN_MATOPS void scolumncata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out); + +/* +** \brief Concat double arrays +** \param in1 the double array to process +** \param lines1 +** \param columns1 +** \param in2 the double array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void drowcata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out); +EXTERN_MATOPS void dcolumncata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out); + +/* +** \brief Concat Complex float arrays +** \param in1 the Complex float array to process +** \param lines1 +** \param columns1 +** \param in2 the Complex float array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void crowcata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out); +EXTERN_MATOPS void ccolumncata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out); + +/* +** \brief Concat Complex double arrays +** \param in1 the Complex double array to process +** \param lines1 +** \param columns1 +** \param in2 the Complex double array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void zrowcata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); +EXTERN_MATOPS void zcolumncata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); + +/* +** \brief Concat uint8 arrays +** \param in1 the uint8 array to process +** \param lines1 +** \param columns1 +** \param in2 the uint8 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void u8rowcata(uint8 *in1, int lines1, int columns1, uint8 *in2, int lines2, int columns2, uint8* out); +EXTERN_MATOPS void u8columncata(uint8 *in1, int lines1, int columns1, uint8 *in2, int lines2, int columns2, uint8* out); + +/* +** \brief Concat uint16 arrays +** \param in1 the uint16 array to process +** \param lines1 +** \param columns1 +** \param in2 the uint16 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void u16rowcata(uint16 *in1, int lines1, int columns1, uint16 *in2, int lines2, int columns2, uint16* out); +EXTERN_MATOPS void u16columncata(uint16 *in1, int lines1, int columns1, uint16 *in2, int lines2, int columns2, uint16* out); + + +/* +** \brief Concat int8 arrays +** \param in1 the int8 array to process +** \param lines1 +** \param columns1 +** \param in2 the int8 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void i8rowcata(int8 *in1, int lines1, int columns1, int8 *in2, int lines2, int columns2, int8* out); +EXTERN_MATOPS void i8columncata(int8 *in1, int lines1, int columns1, int8 *in2, int lines2, int columns2, int8* out); + +/* +** \brief Concat int16 arrays +** \param in1 the int16 array to process +** \param lines1 +** \param columns1 +** \param in2 the int16 array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ + +EXTERN_MATOPS void i16rowcata(int16 *in1, int lines1, int columns1, int16 *in2, int lines2, int columns2, int16* out); +EXTERN_MATOPS void i16columncata(int16 *in1, int lines1, int columns1, int16 *in2, int lines2, int columns2, int16* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__CAT_H__ */ diff --git a/src/c/matrixOperations/includes/chol.h b/src/c/matrixOperations/includes/chol.h new file mode 100644 index 0000000..0a17406 --- /dev/null +++ b/src/c/matrixOperations/includes/chol.h @@ -0,0 +1,43 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __CHOL_H__ +#define __CHOL_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double dchols(double in); +EXTERN_MATOPS void dchola(double *in, int size, double *out); + +EXTERN_MATOPS float schols(float in); +EXTERN_MATOPS void schola(float *in, int size, float *out); + +#define zchols(in) DoubleComplex(dchols(zreals(in)),0) + +EXTERN_MATOPS void zchola (doubleComplex *in, int size, doubleComplex *out); + +#define cchols(in) FloatComplex(schols(creals(in)),0) +EXTERN_MATOPS void cchola(floatComplex *in, int size, floatComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CHOL_H__ */ + diff --git a/src/c/matrixOperations/includes/cumprod.h b/src/c/matrixOperations/includes/cumprod.h new file mode 100644 index 0000000..f47fd77 --- /dev/null +++ b/src/c/matrixOperations/includes/cumprod.h @@ -0,0 +1,53 @@ +/* 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 +*/ + + +#ifndef __CUMPROD_H__ +#define __CUMPROD_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void dcumproda(double *in1, int row, int column, double *out); +void drowcumproda(double *in1, int row, int column, double *out); +void dcolumncumproda(double *in1, int row, int column, double *out); + +void scumproda(float *in1, int row, int column, float *out); +void srowcumproda(float *in1, int row, int column, float *out); +void scolumncumproda(float *in1, int row, int column, float *out); + +void u8cumproda(uint8 *in1, int row, int column, uint8 *out); +void u8rowcumproda(uint8 *in1, int row, int column, uint8 *out); +void u8columncumproda(uint8 *in1, int row, int column, uint8 *out); + +void i8cumproda(int8 *in1, int row, int column, int8 *out); +void i8rowcumproda(int8 *in1, int row, int column, int8 *out); +void i8columncumproda(int8 *in1, int row, int column, int8 *out); + +void u16cumproda(uint16 *in1, int row, int column, uint16 *out); +void u16rowcumproda(uint16 *in1, int row, int column, uint16 *out); +void u16columncumproda(uint16 *in1, int row, int column, uint16 *out); + +void i16cumproda(int16 *in1, int row, int column, int16 *out); +void i16rowcumproda(int16 *in1, int row, int column, int16 *out); +void i16columncumproda(int16 *in1, int row, int column, int16 *out); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__CUMPROD_H__*/ diff --git a/src/c/matrixOperations/includes/cumsum.h b/src/c/matrixOperations/includes/cumsum.h new file mode 100644 index 0000000..24d81bd --- /dev/null +++ b/src/c/matrixOperations/includes/cumsum.h @@ -0,0 +1,53 @@ +/* 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 +*/ + + +#ifndef __CUMSUM_H__ +#define __CUMSUM_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void dcumsuma(double *in1, int row, int column, double *out); +void drowcumsuma(double *in1, int row, int column, double *out); +void dcolumncumsuma(double *in1, int row, int column, double *out); + +void scumsuma(float *in1, int row, int column, float *out); +void srowcumsuma(float *in1, int row, int column, float *out); +void scolumncumsuma(float *in1, int row, int column, float *out); + +void u8cumsuma(uint8 *in1, int row, int column, uint8 *out); +void u8rowcumsuma(uint8 *in1, int row, int column, uint8 *out); +void u8columncumsuma(uint8 *in1, int row, int column, uint8 *out); + +void i8cumsuma(int8 *in1, int row, int column, int8 *out); +void i8rowcumsuma(int8 *in1, int row, int column, int8 *out); +void i8columncumsuma(int8 *in1, int row, int column, int8 *out); + +void u16cumsuma(uint16 *in1, int row, int column, uint16 *out); +void u16rowcumsuma(uint16 *in1, int row, int column, uint16 *out); +void u16columncumsuma(uint16 *in1, int row, int column, uint16 *out); + +void i16cumsuma(int16 *in1, int row, int column, int16 *out); +void i16rowcumsuma(int16 *in1, int row, int column, int16 *out); +void i16columncumsuma(int16 *in1, int row, int column, int16 *out); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__CUMSUM_H__*/ diff --git a/src/c/matrixOperations/includes/determ.h b/src/c/matrixOperations/includes/determ.h new file mode 100644 index 0000000..d915c31 --- /dev/null +++ b/src/c/matrixOperations/includes/determ.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __DETERM_H__ +#define __DETERM_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double ddeterma (double *in, int rows); + +EXTERN_MATOPS float sdeterma (float *in, int rows); + +EXTERN_MATOPS doubleComplex zdeterma (doubleComplex *in, int rows); + +EXTERN_MATOPS floatComplex cdeterma (floatComplex *in, int rows); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __DETERM_H__ */ + diff --git a/src/c/matrixOperations/includes/diag.h b/src/c/matrixOperations/includes/diag.h new file mode 100644 index 0000000..5f97923 --- /dev/null +++ b/src/c/matrixOperations/includes/diag.h @@ -0,0 +1,97 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __DIAG_H__ +#define __DIAG_H__ + +#include "dynlib_matrixoperations.h" +#include "types.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double ddiags(double in ); + +EXTERN_MATOPS void ddiaga(double in, int size,int insert_post,double *out); + +EXTERN_MATOPS void ddiagina(double *in, int _row,int _column,int insert_post,double *out); + +EXTERN_MATOPS void ddiagins(double* in, int size, double* out ); + +EXTERN_MATOPS void ddiagexa(double* in,int row,int column,int insert_pos,double* out); + +EXTERN_MATOPS double ddiagexs(double* in,int row,int column,int extract_pos); + +EXTERN_MATOPS uint8 u8diags(uint8 in ); + +EXTERN_MATOPS void u8diaga(uint8 in, int size,int insert_post,uint8 *out); + +EXTERN_MATOPS void u8diagina(uint8 *in, int _row,int _column,int insert_post,uint8 *out); + +EXTERN_MATOPS void u8diagins(uint8* in, int size, uint8* out ); + +EXTERN_MATOPS void u8diagexa(uint8* in,int row,int column,int insert_pos,uint8* out); + +EXTERN_MATOPS uint8 u8diagexs(uint8* in,int row,int column,int extract_pos); + +EXTERN_MATOPS uint16 u16diags(uint16 in ); + +EXTERN_MATOPS void u16diaga(uint16 in, int size,int insert_post,uint16 *out); + +EXTERN_MATOPS void u16diagina(uint16 *in, int _row,int _column,int insert_post,uint16 *out); + +EXTERN_MATOPS void u16diagins(uint16* in, int size, uint16* out ); + +EXTERN_MATOPS void u16diagexa(uint16* in,int row,int column,int insert_pos,uint16* out); + +EXTERN_MATOPS uint16 u16diagexs(uint16* in,int row,int column,int extract_pos); + +EXTERN_MATOPS int8 i8diags(int8 in ); + +EXTERN_MATOPS void i8diaga(int8 in, int size,int insert_post,int8 *out); + +EXTERN_MATOPS void i8diagina(int8 *in, int _row,int _column,int insert_post,int8 *out); + +EXTERN_MATOPS void i8diagins(int8* in, int size, int8* out ); + +EXTERN_MATOPS void i8diagexa(int8* in,int row,int column,int insert_pos,int8* out); + +EXTERN_MATOPS int8 i8diagexs(int8* in,int row,int column,int extract_pos); + +EXTERN_MATOPS int16 i16diags(int16 in ); + +EXTERN_MATOPS void i16diaga(int16 in, int size,int insert_post,int16 *out); + +EXTERN_MATOPS void i16diagina(int16 *in, int _row,int _column,int insert_post,int16 *out); + +EXTERN_MATOPS void i16diagins(int16* in, int size, int16* out ); + +EXTERN_MATOPS void i16diagexa(int16* in,int row,int column,int insert_pos,int16* out); + +EXTERN_MATOPS int16 i16diagexs(int16* in,int row,int column,int extract_pos); + + + + + + + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__DIAG_H__ */ + diff --git a/src/c/matrixOperations/includes/dist.h b/src/c/matrixOperations/includes/dist.h new file mode 100644 index 0000000..bf45a8d --- /dev/null +++ b/src/c/matrixOperations/includes/dist.h @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + + + +#ifndef __DIST_H__ +#define __DIST_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + /* Computes the euclidian distance + between 2 scalars/arrays. + We assume both arrays have the same + numbers of lines and columns.*/ + +EXTERN_MATOPS float sdists( float in1, float in2); +EXTERN_MATOPS float sdista( float* in1, float* in2, int lines, int columns); + +EXTERN_MATOPS double ddists( double in1, double in2); +EXTERN_MATOPS double ddista( double* in1, double* in2, int lines, int columns); + +EXTERN_MATOPS float cdists( floatComplex in1, floatComplex in2); +EXTERN_MATOPS float cdista( floatComplex* in1, floatComplex* in2, int lines, int columns); + +EXTERN_MATOPS double zdists( doubleComplex in1, doubleComplex in2); +EXTERN_MATOPS double zdista( doubleComplex* in1, doubleComplex* in2, int lines, int columns); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__DIST_H__*/ + diff --git a/src/c/matrixOperations/includes/dynlib_matrixoperations.h b/src/c/matrixOperations/includes/dynlib_matrixoperations.h new file mode 100644 index 0000000..a0597a5 --- /dev/null +++ b/src/c/matrixOperations/includes/dynlib_matrixoperations.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* 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 +* +*/ + +#ifndef __DYNLIB_MATRIXOPERATIONS_H__ +#define __DYNLIB_MATRIXOPERATIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if MATRIXOPERATIONS_EXPORTS + #define EXTERN_MATOPS __declspec (dllexport) + #else + #define EXTERN_MATOPS __declspec (dllimport) + #endif +#else + #define EXTERN_MATOPS +#endif + +#endif /* __DYNLIB_MATRIXOPERATIONS_H__ */ diff --git a/src/c/matrixOperations/includes/eye.h b/src/c/matrixOperations/includes/eye.h new file mode 100644 index 0000000..95bdd79 --- /dev/null +++ b/src/c/matrixOperations/includes/eye.h @@ -0,0 +1,110 @@ +/* + * 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 + * + */ + +#ifndef __EYE_H__ +#define __EYE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "ones.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float Eye value +*/ +#define seyes(in) 1.0f + +/* +** \brief create a Double Eye value +*/ +#define deyes(in) 1.0 + +/* +** \brief create a float complex Eye value +*/ +#define ceyes(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex Eye value +*/ +#define zeyes(in) DoubleComplex(1, 0) + +/* +** \brief create a Uint8 Eye value +*/ +#define u8eyes(in) (uint8)1 + +/* +** \brief create a int8 Eye value +*/ +#define i8eyes(in) (int8)1 + +/* +** \brief create a Uint16 Eye value +*/ +#define u16eyes(in) (uint16)1 + +/* +** \brief create a int16 Eye value +*/ +#define i16eyes(in) (int16)1 + +/* +** \brief create a float Eye matrix +*/ +EXTERN_MATOPS void seyea(float* in, int _iRows, int _iCols); + +/* +** \brief create a Double Eye matrix +*/ +EXTERN_MATOPS void deyea(double* in, int _iRows, int _iCols); + +/* +** \brief create a float complex Eye matrix +*/ +EXTERN_MATOPS void ceyea(floatComplex* in, int _iRows, int _iCols); + +/* +** \brief create a Double complex Eye matrix +*/ +EXTERN_MATOPS void zeyea(doubleComplex* in, int _iRows, int _iCols); + +/* +** \brief create a uint8 Eye matrix +*/ +EXTERN_MATOPS void u8eyea(uint8* in, int _iRows, int _iCols); + +/* +** \brief create a int8 Eye matrix +*/ +EXTERN_MATOPS void i8eyea(int8* in, int _iRows, int _iCols); + +/* +** \brief create a uint16 Eye matrix +*/ +EXTERN_MATOPS void u16eyea(uint16* in, int _iRows, int _iCols); + +/* +** \brief create a int16 Eye matrix +*/ +EXTERN_MATOPS void i16eyea(int16* in, int _iRows, int _iCols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__EYE_H__ */ + diff --git a/src/c/matrixOperations/includes/fill.h b/src/c/matrixOperations/includes/fill.h new file mode 100644 index 0000000..09b8d81 --- /dev/null +++ b/src/c/matrixOperations/includes/fill.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __FILL_H__ +#define __FILL_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/*filling of a array with constant*/ + +EXTERN_MATOPS void dfilla (double* in, int rows, int cols, double constant); + +EXTERN_MATOPS void sfilla (float* in, int rows, int cols, float constant); + +EXTERN_MATOPS void cfilla (floatComplex* in, int rows, int cols, floatComplex constant); + +EXTERN_MATOPS void zfilla (doubleComplex* in, int rows, int cols, doubleComplex constant); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __FILL_H__ */ + + diff --git a/src/c/matrixOperations/includes/flipdim.h b/src/c/matrixOperations/includes/flipdim.h new file mode 100644 index 0000000..bdf4a68 --- /dev/null +++ b/src/c/matrixOperations/includes/flipdim.h @@ -0,0 +1,40 @@ +/* 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 +*/ + + +#ifndef __FLIPDIM_H__ +#define __FLIPDIM_H__ + +#include "types.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +void dflipdima (double *in, int row, int col, int dim, int blk_size, double *out); + +void sflipdima (float *in, int row, int col, int dim, int blk_size, float *out); + +void u8flipdima (uint8 *in, int row, int col, int dim, int blk_size, uint8 *out); + +void i8flipdima (int8 *in, int row, int col, int dim, int blk_size, int8 *out); + +void u16flipdima (uint16 *in, int row, int col, int dim, int blk_size, uint16 *out); + +void i16flipdima (int16 *in, int row, int col, int dim, int blk_size, int16 *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__FLIPDIM_H__*/ diff --git a/src/c/matrixOperations/includes/hilb.h b/src/c/matrixOperations/includes/hilb.h new file mode 100644 index 0000000..65efd0e --- /dev/null +++ b/src/c/matrixOperations/includes/hilb.h @@ -0,0 +1,46 @@ +/* + * 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 + * + */ + +#ifndef __HILB_H__ +#define __HILB_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* +** generate an Hilbert's matrix +** param out : the hilbert's matrix in float precision +** param size: matrix's size +*/ + +EXTERN_MATOPS void shilba ( float* out, int size) ; + +/* +** generate an Hilbert's matrix +** param out : the hilbert's matrix in double precision +** param size: matrix's size +*/ + + +EXTERN_MATOPS void dhilba ( double* out, int size ) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__HILB_H__ */ + diff --git a/src/c/matrixOperations/includes/infiniteNorm.h b/src/c/matrixOperations/includes/infiniteNorm.h new file mode 100644 index 0000000..130cfea --- /dev/null +++ b/src/c/matrixOperations/includes/infiniteNorm.h @@ -0,0 +1,67 @@ +/* + * 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 + * + */ + +#ifndef __INFINITENORM_H__ +#define __INFINITENORM_H__ + +#include "dynlib_matrixoperations.h" +#include "sign.h" +#include "pythag.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Compute the infinite norm of a given floats matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS float sinfnorma(float* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given doubles matrix. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS double dinfnorma(double* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given complex floats matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS float cinfnorma(floatComplex* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given complex doubles matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS double zinfnorma(doubleComplex* in, int _iRows, int _iCols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__INFINITENORM_H__ */ + diff --git a/src/c/matrixOperations/includes/jmat.h b/src/c/matrixOperations/includes/jmat.h new file mode 100644 index 0000000..38a8b1e --- /dev/null +++ b/src/c/matrixOperations/includes/jmat.h @@ -0,0 +1,29 @@ +/* + * 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 + * + */ + +#ifndef __JMAT_H__ +#define __JMAT_H__ + +#include "dynlib_matrixoperations.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void sjmata(float in1, float in2, float* out); +EXTERN_MATOPS void djmata(double in1, double in2, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__JMAT_H__ */ diff --git a/src/c/matrixOperations/includes/kron.h b/src/c/matrixOperations/includes/kron.h new file mode 100644 index 0000000..e4cff2d --- /dev/null +++ b/src/c/matrixOperations/includes/kron.h @@ -0,0 +1,32 @@ +/* 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 +*/ + + +#ifndef __KRON_H__ +#define __KRON_H__ + +#include "kron.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void dkrona (double *in1, int row1, int col1, double *in2, int row2, \ + int col2, double *out); +void skrona (float *in1, int row1, int col1, float *in2, int row2, \ + int col2, float *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__KRON_H__*/ diff --git a/src/c/matrixOperations/includes/logm.h b/src/c/matrixOperations/includes/logm.h new file mode 100644 index 0000000..7eec569 --- /dev/null +++ b/src/c/matrixOperations/includes/logm.h @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __LOGM_H__ +#define __LOGM_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void slogma (float* in, int size, float* out); + +EXTERN_MATOPS void dlogma (double* in, int size, double* out); + +EXTERN_MATOPS void clogma (floatComplex* in, int size, floatComplex* out); + +EXTERN_MATOPS void zlogma (doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __LOGM_H__ */ diff --git a/src/c/matrixOperations/includes/matrixDivision.h b/src/c/matrixOperations/includes/matrixDivision.h new file mode 100644 index 0000000..7702313 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixDivision.h @@ -0,0 +1,102 @@ +/* + * 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 + * + */ + +#ifndef __MATRIXDIVISION_H__ +#define __MATRIXDIVISION_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "lapack.h" +#include "cat.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "min.h" +#include "max.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void srdivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ); + +EXTERN_MATOPS void sldivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ); + + +EXTERN_MATOPS void drdivma ( double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ); + + +EXTERN_MATOPS void dldivma ( double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ); + +EXTERN_MATOPS void zrdivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ); + +EXTERN_MATOPS void zldivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ); + +EXTERN_MATOPS void crdivma( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ); + +EXTERN_MATOPS void cldivma( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ); + +/*special case row vector /row vector => scalar */ +/* +** \brief Compute a division for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the right division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS double drdivv(double *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivzdv(doubleComplex *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivdzv(double *in1, doubleComplex *in2, int size2); + +/* +** \brief Compute a division for float. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS float srdivv(float *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size2); + +EXTERN_MATOPS floatComplex crdivcsv(floatComplex *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivscv(float *in1, floatComplex *in2, int size2); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXDIVISION_H__ */ diff --git a/src/c/matrixOperations/includes/matrixExponential.h b/src/c/matrixOperations/includes/matrixExponential.h new file mode 100644 index 0000000..4b3cd8a --- /dev/null +++ b/src/c/matrixOperations/includes/matrixExponential.h @@ -0,0 +1,51 @@ +/* + * 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 + * + */ + +#ifndef __MATRIXEXPONENTIAL_H__ +#define __MATRIXEXPONENTIAL_H__ + +#include +#include +#include "dynlib_matrixoperations.h" +#include "lapack.h" +#include "blas.h" +#include "abs.h" +#include "exp.h" +#include "max.h" +#include "pow.h" +#include "matrixDivision.h" +#include "matrixMultiplication.h" +#include "addition.h" +#include "subtraction.h" +#include "eye.h" +#include "infiniteNorm.h" +#include "frexp.h" +#include "division.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void sexpma (float* in, float* out, int _iLeadDim); + +EXTERN_MATOPS void dexpma (double* in, double* out, int _iLeadDim); + +EXTERN_MATOPS void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim); + +EXTERN_MATOPS void zexpma (doubleComplex * in, doubleComplex * out, int _iLeadDim); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXEXPONENTIAL_H__ */ + diff --git a/src/c/matrixOperations/includes/matrixInversion.h b/src/c/matrixOperations/includes/matrixInversion.h new file mode 100644 index 0000000..e547bb9 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixInversion.h @@ -0,0 +1,104 @@ +/* + * 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 + * + */ + + +#ifndef __MATRIXINVERSION_H__ +#define __MATRIXINVERSION_H__ + +#include "abs.h" +#include "dynlib_matrixoperations.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Compute the matrix inverse for floats. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void sinverma ( float* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for doubles. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void dinverma ( double* in, double* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for complex floats . +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for complex doubles. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for uint8. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void u8inverma ( uint8* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for int8. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void i8inverma ( int8* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for uint16. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void u16inverma ( uint16* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for int16. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void i16inverma ( int16* in, float* out, int leadDimIn ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXINVERSION_H__ */ diff --git a/src/c/matrixOperations/includes/matrixMagnitude.h b/src/c/matrixOperations/includes/matrixMagnitude.h new file mode 100644 index 0000000..a9f4e71 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixMagnitude.h @@ -0,0 +1,54 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + +#ifndef __MAGNITUDE_H__ +#define __MAGNITUDE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS float smagns(float in); +EXTERN_MATOPS float smagna(float* in, int rows, int cols); + +EXTERN_MATOPS double dmagns(double in); +EXTERN_MATOPS double dmagna(double* in, int rows, int cols); + +EXTERN_MATOPS float cmagns(floatComplex in); +EXTERN_MATOPS float cmagna(floatComplex* in, int rows, int cols); + +EXTERN_MATOPS double zmagns(doubleComplex in); +EXTERN_MATOPS double zmagna(doubleComplex* in, int rows, int cols); + +EXTERN_MATOPS uint8 u8magns(uint8 in); +EXTERN_MATOPS uint8 u8magna(uint8* in, int rows, int cols); + +EXTERN_MATOPS uint16 u16magns(uint16 in); +EXTERN_MATOPS uint16 u16magna(uint16* in, int rows, int cols); + +EXTERN_MATOPS int8 i8magns(int8 in); +EXTERN_MATOPS int8 i8magna(int8* in, int rows, int cols); + +EXTERN_MATOPS int16 i16magns(int16 in); +EXTERN_MATOPS int16 i16magna(int16* in, int rows, int cols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __MAGNITUDE_H__*/ diff --git a/src/c/matrixOperations/includes/matrixMultiplication.h b/src/c/matrixOperations/includes/matrixMultiplication.h new file mode 100644 index 0000000..c2235c8 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixMultiplication.h @@ -0,0 +1,150 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRIXMULTIPLICATION_H__ +#define __MATRIXMULTIPLICATION_H__ + +#include "dynlib_matrixoperations.h" +#include "multiplication.h" +#include "addition.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** columns1 = lines2; +** +*/ + +/* +** \brief Compute a multiplication for floats matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void smulma(float *in1, int lines1, int columns1, + float *in2, int lines2, int columns2, + float *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void dmulma(double *in1, int lines1, int columns1, + double *in2, int lines2, int columns2, + double *out); + +/* +** \brief Compute a multiplication for floats complex matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void cmulma(floatComplex *in1, int lines1, int columns1, + floatComplex *in2, int lines2, int columns2, + floatComplex *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void zmulma(doubleComplex *in1, int lines1, int columns1, + doubleComplex *in2, int lines2, int columns2, + doubleComplex *out); + +/* +** \brief Compute a multiplication for uint8 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void u8mulma(uint8 *in1, int lines1, int columns1, + uint8 *in2, int lines2, int columns2, + uint8 *out); + +/* +** \brief Compute a multiplication for uint16 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void u16mulma(uint16 *in1, int lines1, int columns1, + uint16 *in2, int lines2, int columns2, + uint16 *out); + +/* +** \brief Compute a multiplication for int8 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void i8mulma(int8 *in1, int lines1, int columns1, + int8 *in2, int lines2, int columns2, + int8 *out); + +/* +** \brief Compute a multiplication for int16 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void i16mulma(int16 *in1, int lines1, int columns1, + int16 *in2, int lines2, int columns2, + int16 *out); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXMULTIPLICATION_H__ */ diff --git a/src/c/matrixOperations/includes/matrixPow.h b/src/c/matrixOperations/includes/matrixPow.h new file mode 100644 index 0000000..d7ffab3 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixPow.h @@ -0,0 +1,43 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + +#ifndef __MATRIXPOW_H__ +#define __MATRIXPOW_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + powm is only working on square matrix + so the size is limited to rows +*/ +EXTERN_MATOPS void spowma(float* in, int rows, float expand, float* out); + +EXTERN_MATOPS void dpowma(double* in, int rows, double expand, double* out); + +EXTERN_MATOPS void cpowma(floatComplex* in, int rows, floatComplex expand, floatComplex* out); + +EXTERN_MATOPS void zpowma(doubleComplex* in, int rows, doubleComplex expand, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif/*__MATRIXPOW_H__*/ diff --git a/src/c/matrixOperations/includes/matrixSquaredMagnitude.h b/src/c/matrixOperations/includes/matrixSquaredMagnitude.h new file mode 100644 index 0000000..9ee64c3 --- /dev/null +++ b/src/c/matrixOperations/includes/matrixSquaredMagnitude.h @@ -0,0 +1,41 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + +#ifndef __SQUAREDMAGNITUDE_H__ +#define __SQUAREDMAGNITUDE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS float ssquMagns(float in); +EXTERN_MATOPS float ssquMagna(float* in, int rows, int cols); + +EXTERN_MATOPS double dsquMagns(double in); +EXTERN_MATOPS double dsquMagna(double* in, int rows, int cols); + +EXTERN_MATOPS float csquMagns(floatComplex in); +EXTERN_MATOPS float csquMagna(floatComplex* in, int rows, int cols); + +EXTERN_MATOPS double zsquMagns(doubleComplex in); +EXTERN_MATOPS double zsquMagna(doubleComplex* in, int rows, int cols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __SQUAREDMAGNITUDE_H__*/ diff --git a/src/c/matrixOperations/includes/matrixTrace.h b/src/c/matrixOperations/includes/matrixTrace.h new file mode 100644 index 0000000..80f895d --- /dev/null +++ b/src/c/matrixOperations/includes/matrixTrace.h @@ -0,0 +1,109 @@ +/* + * 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 + * + */ + +#ifndef __MATRICXTRACE_H__ +#define __MATRICXTRACE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE SQUARE +** +*/ + + +/* +** \brief Compute the trace of a float scalar matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : float scalar containing the trace. +*/ + +EXTERN_MATOPS float stracea ( float* in ,int lines ) ; + + +/* +** \brief Compute the trace of a double scalar matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : double scalar containing the trace. +*/ +EXTERN_MATOPS double dtracea ( double* in ,int lines ) ; + +/* +** \brief Compute the trace of a float complex matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : float complex containing the trace. +*/ +EXTERN_MATOPS floatComplex ctracea ( floatComplex* in ,int lines ) ; + + +/* +** \brief Compute the trace of a double complex matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : double complex containing the trace. +*/ +EXTERN_MATOPS doubleComplex ztracea ( doubleComplex* in ,int lines ) ; + + +/* +** \brief Compute the trace of a uint8 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : uint8 containing the trace. +*/ +EXTERN_MATOPS uint8 u8tracea ( uint8* in ,int lines ) ; + + +/* +** \brief Compute the trace of a uint16 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : uint16 containing the trace. +*/ +EXTERN_MATOPS uint16 u16tracea ( uint16* in ,int lines ) ; + + +/* +** \brief Compute the trace of a int8 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : int8 containing the trace. +*/ +EXTERN_MATOPS int8 i8tracea ( int8* in ,int lines ) ; + + +/* +** \brief Compute the trace of a int16 matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : int16 containing the trace. +*/ +EXTERN_MATOPS int16 i16tracea ( int16* in ,int lines ) ; + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRICXTRACE_H__ */ diff --git a/src/c/matrixOperations/includes/matrixTranspose.h b/src/c/matrixOperations/includes/matrixTranspose.h new file mode 100644 index 0000000..7e2acbf --- /dev/null +++ b/src/c/matrixOperations/includes/matrixTranspose.h @@ -0,0 +1,101 @@ +/* + * 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 + * + */ + +#ifndef __MATRIXTRANSPOSE_H__ +#define __MATRIXTRANSPOSE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "types.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Compute the transpose of a float matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed float matrix. +*/ +EXTERN_MATOPS void stransposea ( float* in , int lines1 , int column1, float* out ); +/* +** \brief Compute the transpose of a double matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed double matrix. +*/ +EXTERN_MATOPS void dtransposea ( double* in , int lines1 , int column1, double* out ); +/* +** \brief Compute the transpose of a float complex matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed float complex matrix. +*/ +EXTERN_MATOPS void ctransposea ( floatComplex* in , int lines1 , int column1, floatComplex* out ); +/* +** \brief Compute the transpose of a double complex matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed double complex matrix. +*/ +EXTERN_MATOPS void ztransposea ( doubleComplex* in , int lines1 , int column1, doubleComplex* out ); + + +/* +** \brief Compute the transpose of a uint8 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed uint8 matrix. +*/ +EXTERN_MATOPS void u8transposea ( uint8* in , int lines1 , int column1, uint8* out ); + +/* +** \brief Compute the transpose of a uint16 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed uint16 matrix. +*/ +EXTERN_MATOPS void u16transposea ( uint16* in , int lines1 , int column1, uint16* out ); + +/* +** \brief Compute the transpose of a int8 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed int8 matrix. +*/ +EXTERN_MATOPS void i8transposea ( int8* in , int lines1 , int column1, int8* out ); + +/* +** \brief Compute the transpose of a int16 matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed int16 matrix. +*/ +EXTERN_MATOPS void i16transposea ( int16* in , int lines1 , int column1, int16* out ); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXTRANSPOSE_H__ */ diff --git a/src/c/matrixOperations/includes/norm.h b/src/c/matrixOperations/includes/norm.h new file mode 100644 index 0000000..dc9d351 --- /dev/null +++ b/src/c/matrixOperations/includes/norm.h @@ -0,0 +1,32 @@ + /* 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 + */ +#ifndef __NORM_H__ +#define __NORM_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +double dnormv (double *in, int size, int norm); + +double dnorma (double *in, int row, int col, int norm); + +float snormv (float *in, int size, int norm); + +float snorma (float *in, int row, int col, int norm); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__NORM_H__*/ diff --git a/src/c/matrixOperations/includes/ones.h b/src/c/matrixOperations/includes/ones.h new file mode 100644 index 0000000..6734017 --- /dev/null +++ b/src/c/matrixOperations/includes/ones.h @@ -0,0 +1,112 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __ONES_H__ +#define __ONES_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "types.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float one value +*/ +#define soness(in) 1.0f + +/* +** \brief create a Double one value +*/ +#define doness(in) 1.0 + +/* +** \brief create a float complex one value +*/ +#define coness(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zoness(in) DoubleComplex(1, 0) + +/* +** \brief create a uint8 one value +*/ +#define u8oness(in) (uint8)1 + +/* +** \brief create a int8 one value +*/ +#define i8oness(in) (int8)1 + +/* +** \brief create a uint16 one value +*/ +#define u16oness(in) (uint16)1 + +/* +** \brief create a int16 one value +*/ +#define i16oness(in) (int16)1 + + +/* +** \brief create a float matrix full of one +*/ +EXTERN_MATOPS void sonesa ( float* in , int rows , int cols ); + +/* +** \brief create a float complex matrix full of one +*/ +EXTERN_MATOPS void conesa ( floatComplex* in , int rows ,int cols ); + +/* +** \brief create a double matrix full of one +*/ +EXTERN_MATOPS void donesa ( double* in , int rows ,int cols ); + +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void zonesa ( doubleComplex* in , int rows ,int cols ); + +/* +** \brief create a uint8 matrix full of one +*/ +EXTERN_MATOPS void u8onesa ( uint8* in , int rows , int cols ); + +/* +** \brief create a int8 matrix full of one +*/ +EXTERN_MATOPS void i8onesa ( int8* in , int rows , int cols ); + +/* +** \brief create a uint16 matrix full of one +*/ +EXTERN_MATOPS void u16onesa ( uint16* in , int rows , int cols ); + +/* +** \brief create a int16 matrix full of one +*/ +EXTERN_MATOPS void i16onesa ( int16* in , int rows , int cols ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ONES_H__ */ diff --git a/src/c/matrixOperations/includes/spec.h b/src/c/matrixOperations/includes/spec.h new file mode 100644 index 0000000..b7b7d35 --- /dev/null +++ b/src/c/matrixOperations/includes/spec.h @@ -0,0 +1,56 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __SPEC_H__ +#define __SPEC_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* spec gives only the eigenvalues + If you want the eigenvalues and the eigenvectors, use spec2 */ + +/* spec */ +#define sspecs(in) in +#define dspecs(in) in +#define cspecs(in) in +#define zspecs(in) in + +EXTERN_MATOPS void sspeca(float* in, int rows, float* out); +EXTERN_MATOPS void dspeca(double* in, int rows, double* out); +EXTERN_MATOPS void cspeca(floatComplex* in, int rows, floatComplex* out); +EXTERN_MATOPS void zspeca(doubleComplex* in, int rows,doubleComplex* out); + + + +/* spec2 */ +#define sspec2s(in,out) sspecs(1);*out=in; +#define dspec2s(in,out) dspecs(1);*out=in; +#define cspec2s(in,out) cspecs(FloatComplex(1,0));*out=FloatComplex(creals(in),cimags(in)); +#define zspec2s(in,out) zspecs(DoubleComplex(1,0));*out=DoubleComplex(zreals(in),zimags(in)); + +EXTERN_MATOPS void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors); +EXTERN_MATOPS void dspec2a(double* in, int rows, double* eigenvalues,double* eigenvectors); +EXTERN_MATOPS void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors); +EXTERN_MATOPS void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues,doubleComplex* eigenvectors); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __SPEC_H__ */ diff --git a/src/c/matrixOperations/includes/tril.h b/src/c/matrixOperations/includes/tril.h new file mode 100644 index 0000000..486e81f --- /dev/null +++ b/src/c/matrixOperations/includes/tril.h @@ -0,0 +1,34 @@ +/* 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 +*/ + + +#ifndef __TRIL_H__ +#define __TRIL_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void dtrila (double *in, int row, int column, double diag, double *out); +void strila (float *in, int row, int column, double diag, float *out); +void u8trila (uint8 *in, int row, int column, double diag, uint8 *out); +void u16trila (uint16 *in, int row, int column, double diag, uint16 *out); +void i8trila (int8 *in, int row, int column, double diag, int8 *out); +void i16trila (int16 *in, int row, int column, double diag, int16 *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__TRIL_H__*/ diff --git a/src/c/matrixOperations/includes/triu.h b/src/c/matrixOperations/includes/triu.h new file mode 100644 index 0000000..2b62e22 --- /dev/null +++ b/src/c/matrixOperations/includes/triu.h @@ -0,0 +1,34 @@ +/* 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 +*/ + + +#ifndef __TRIU_H__ +#define __TRIU_H__ + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void dtriua (double *in, int row, int column, double diag, double *out); +void striua (float *in, int row, int column, double diag, float *out); +void u8triua (uint8 *in, int row, int column, double diag, uint8 *out); +void u16triua (uint16 *in, int row, int column, double diag, uint16 *out); +void i8triua (int8 *in, int row, int column, double diag, int8 *out); +void i16triua (int16 *in, int row, int column, double diag, int16 *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__TRIU_H__*/ diff --git a/src/c/matrixOperations/includes/zeros.h b/src/c/matrixOperations/includes/zeros.h new file mode 100644 index 0000000..993940f --- /dev/null +++ b/src/c/matrixOperations/includes/zeros.h @@ -0,0 +1,114 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 + * + */ + + +#ifndef __ZEROS_H__ +#define __ZEROS_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float one value +*/ +#define szeross(in) 0.0f + +/* +** \brief create a Double one value +*/ +#define dzeross(in) 0 + +/* +** \brief create a float complex one value +*/ +#define czeross(in) FloatComplex(0.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zzeross(in) DoubleComplex(0, 0) + + +/* +** \brief create a single uint8 zero +*/ +#define u8zerosu8(in) (uint8)0 + +/* +** \brief create a single int8 zero +*/ +#define i8zerosi8(in) (int8)0 + +/* +** \brief create a single uint8 zero +*/ +#define u16zerosu16(in) (uint16)0 + +/* +** \brief create a single int8 zero +*/ +#define i16zerosi16(in) (int16)0 + +/* +** \brief create a float matrix full of one +*/ +EXTERN_MATOPS void szerosa ( float* in , int rows , int cols ); +/* +** \brief create a float complex matrix full of one +*/ +EXTERN_MATOPS void czerosa ( floatComplex* in , int rows ,int cols ); +/* +** \brief create a double matrix full of one +*/ +EXTERN_MATOPS void dzerosa ( double* in , int rows ,int cols ); +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void zzerosa ( doubleComplex* in , int rows ,int cols ); + +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void dzerosh ( double* in , int rows ,int cols , int levels); + +/* +** \brief create a uint8 matrix full of zero +*/ +EXTERN_MATOPS void u8zerosa ( uint8* in , int rows , int cols ); + +/* +** \brief create a int8 matrix full of zero +*/ +EXTERN_MATOPS void i8zerosa ( int8* in , int rows , int cols ); + +/* +** \brief create a uint16 matrix full of zero +*/ +EXTERN_MATOPS void u16zerosa ( uint16* in , int rows , int cols ); + +/* +** \brief create a int16 matrix full of zero +*/ +EXTERN_MATOPS void i16zerosa ( int16* in , int rows , int cols ); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ZEROS_H__ */ diff --git a/src/c/matrixOperations/infiniteNorm/Makefile.am b/src/c/matrixOperations/infiniteNorm/Makefile.am new file mode 100644 index 0000000..5cc3503 --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/Makefile.am @@ -0,0 +1,58 @@ +## +## 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 +## +## + +libMatrixInfiniteNorm_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixInfiniteNorm.la + +HEAD = ../includes/infiniteNorm.h + +libMatrixInfiniteNorm_la_SOURCES = $(HEAD) \ + sinfnorma.c \ + dinfnorma.c \ + cinfnorma.c \ + zinfnorma.c + +check_PROGRAMS = testMatrixInfiniteNorm + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInfiniteNorm.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMatrixInfiniteNorm_SOURCES = testMatrixInfiniteNorm.c +testMatrixInfiniteNorm_LDADD = $(check_LDADD) +testMatrixInfiniteNorm_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixInfiniteNorm diff --git a/src/c/matrixOperations/infiniteNorm/Makefile.in b/src/c/matrixOperations/infiniteNorm/Makefile.in new file mode 100644 index 0000000..7152f5c --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/Makefile.in @@ -0,0 +1,734 @@ +# 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 = testMatrixInfiniteNorm$(EXEEXT) +TESTS = testMatrixInfiniteNorm$(EXEEXT) +subdir = src/c/matrixOperations/infiniteNorm +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) +libMatrixInfiniteNorm_la_LIBADD = +am__objects_1 = +am_libMatrixInfiniteNorm_la_OBJECTS = $(am__objects_1) \ + libMatrixInfiniteNorm_la-sinfnorma.lo \ + libMatrixInfiniteNorm_la-dinfnorma.lo \ + libMatrixInfiniteNorm_la-cinfnorma.lo \ + libMatrixInfiniteNorm_la-zinfnorma.lo +libMatrixInfiniteNorm_la_OBJECTS = \ + $(am_libMatrixInfiniteNorm_la_OBJECTS) +libMatrixInfiniteNorm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixInfiniteNorm_OBJECTS = \ + testMatrixInfiniteNorm-testMatrixInfiniteNorm.$(OBJEXT) +testMatrixInfiniteNorm_OBJECTS = $(am_testMatrixInfiniteNorm_OBJECTS) +testMatrixInfiniteNorm_DEPENDENCIES = $(check_LDADD) +testMatrixInfiniteNorm_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixInfiniteNorm_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 = $(libMatrixInfiniteNorm_la_SOURCES) \ + $(testMatrixInfiniteNorm_SOURCES) +DIST_SOURCES = $(libMatrixInfiniteNorm_la_SOURCES) \ + $(testMatrixInfiniteNorm_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@ +libMatrixInfiniteNorm_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixInfiniteNorm.la +HEAD = ../includes/infiniteNorm.h +libMatrixInfiniteNorm_la_SOURCES = $(HEAD) \ + sinfnorma.c \ + dinfnorma.c \ + cinfnorma.c \ + zinfnorma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInfiniteNorm.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMatrixInfiniteNorm_SOURCES = testMatrixInfiniteNorm.c +testMatrixInfiniteNorm_LDADD = $(check_LDADD) +testMatrixInfiniteNorm_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/infiniteNorm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/infiniteNorm/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 +libMatrixInfiniteNorm.la: $(libMatrixInfiniteNorm_la_OBJECTS) $(libMatrixInfiniteNorm_la_DEPENDENCIES) + $(libMatrixInfiniteNorm_la_LINK) -rpath $(pkglibdir) $(libMatrixInfiniteNorm_la_OBJECTS) $(libMatrixInfiniteNorm_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 +testMatrixInfiniteNorm$(EXEEXT): $(testMatrixInfiniteNorm_OBJECTS) $(testMatrixInfiniteNorm_DEPENDENCIES) + @rm -f testMatrixInfiniteNorm$(EXEEXT) + $(testMatrixInfiniteNorm_LINK) $(testMatrixInfiniteNorm_OBJECTS) $(testMatrixInfiniteNorm_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.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 $@ $< + +libMatrixInfiniteNorm_la-sinfnorma.lo: sinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-sinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-sinfnorma.lo `test -f 'sinfnorma.c' || echo '$(srcdir)/'`sinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sinfnorma.c' object='libMatrixInfiniteNorm_la-sinfnorma.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) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-sinfnorma.lo `test -f 'sinfnorma.c' || echo '$(srcdir)/'`sinfnorma.c + +libMatrixInfiniteNorm_la-dinfnorma.lo: dinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-dinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-dinfnorma.lo `test -f 'dinfnorma.c' || echo '$(srcdir)/'`dinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dinfnorma.c' object='libMatrixInfiniteNorm_la-dinfnorma.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) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-dinfnorma.lo `test -f 'dinfnorma.c' || echo '$(srcdir)/'`dinfnorma.c + +libMatrixInfiniteNorm_la-cinfnorma.lo: cinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-cinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-cinfnorma.lo `test -f 'cinfnorma.c' || echo '$(srcdir)/'`cinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cinfnorma.c' object='libMatrixInfiniteNorm_la-cinfnorma.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) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-cinfnorma.lo `test -f 'cinfnorma.c' || echo '$(srcdir)/'`cinfnorma.c + +libMatrixInfiniteNorm_la-zinfnorma.lo: zinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-zinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-zinfnorma.lo `test -f 'zinfnorma.c' || echo '$(srcdir)/'`zinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zinfnorma.c' object='libMatrixInfiniteNorm_la-zinfnorma.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) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-zinfnorma.lo `test -f 'zinfnorma.c' || echo '$(srcdir)/'`zinfnorma.c + +testMatrixInfiniteNorm-testMatrixInfiniteNorm.o: testMatrixInfiniteNorm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -MT testMatrixInfiniteNorm-testMatrixInfiniteNorm.o -MD -MP -MF $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.o `test -f 'testMatrixInfiniteNorm.c' || echo '$(srcdir)/'`testMatrixInfiniteNorm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInfiniteNorm.c' object='testMatrixInfiniteNorm-testMatrixInfiniteNorm.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) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.o `test -f 'testMatrixInfiniteNorm.c' || echo '$(srcdir)/'`testMatrixInfiniteNorm.c + +testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj: testMatrixInfiniteNorm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -MT testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj -MD -MP -MF $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj `if test -f 'testMatrixInfiniteNorm.c'; then $(CYGPATH_W) 'testMatrixInfiniteNorm.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInfiniteNorm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInfiniteNorm.c' object='testMatrixInfiniteNorm-testMatrixInfiniteNorm.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) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj `if test -f 'testMatrixInfiniteNorm.c'; then $(CYGPATH_W) 'testMatrixInfiniteNorm.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInfiniteNorm.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/infiniteNorm/cinfnorma.c b/src/c/matrixOperations/infiniteNorm/cinfnorma.c new file mode 100644 index 0000000..5d67aca --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/cinfnorma.c @@ -0,0 +1,36 @@ +/* + * 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 "infiniteNorm.h" + +float cinfnorma(floatComplex* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + float fltTemp = 0; + float fltRef = 0; + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + fltTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + fltTemp += spythags( creals( in[iIndex1 + iIndex2 * _iRows]), + cimags( in[iIndex1 + iIndex2 * _iRows])); + } + if(fltTemp > fltRef) + fltRef = fltTemp; + } + + return fltRef; +} + + diff --git a/src/c/matrixOperations/infiniteNorm/dinfnorma.c b/src/c/matrixOperations/infiniteNorm/dinfnorma.c new file mode 100644 index 0000000..ba414bb --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/dinfnorma.c @@ -0,0 +1,35 @@ +/* + * 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 "infiniteNorm.h" + +double dinfnorma(double* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + double dblTemp = 0; + double dblRef = 0; + + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + dblTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + dblTemp += in[iIndex1 + iIndex2 * _iRows]; + } + if(dblTemp > dblRef) + dblRef = dblTemp; + } + + return dblRef; + +} diff --git a/src/c/matrixOperations/infiniteNorm/sinfnorma.c b/src/c/matrixOperations/infiniteNorm/sinfnorma.c new file mode 100644 index 0000000..3c614af --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/sinfnorma.c @@ -0,0 +1,37 @@ +/* + * 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 "infiniteNorm.h" + +float sinfnorma(float* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + float fltTemp = 0; + float fltRef = 0; + + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + fltTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + fltTemp += in[iIndex1 + iIndex2 * _iRows]; + } + if(fltTemp > fltRef) + fltRef = fltTemp; + } + + return fltRef; + + +} + diff --git a/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c b/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c new file mode 100644 index 0000000..8dc4c7f --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c @@ -0,0 +1,316 @@ +/* + * 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 +#include +#include "infiniteNorm.h" + + +#define LEADDIM 10 + +#define DMATRIX_IN {0.15869047446176410,0.80895681912079453,0.72621259605512023,0.18993748771026731,\ + 0.43964602379128337,0.37921421090140939,0.95195201179012656,0.59145097108557820,\ + 0.70597065938636661,0.62873698258772492,\ +0.62407150492072105,0.68317985069006681,0.70999773032963276,0.25839814636856318,\ + 0.65407369285821915,0.76687160786241293,0.71278580836951733,0.68067426700145006,\ + 0.70181696489453316,0.28785153012722731,\ +0.63760355720296502,0.03401931514963508,0.47457459988072515,0.09878737432882190,\ + 0.58781063789501786,0.60066213225945830,0.11923700617626309,0.07392961112782359,\ + 0.40879997471347451,0.3292048736475408,\ +0.42704886104911566,0.23805456422269344,0.9438692079856992,0.06199027225375175,\ + 0.60208318661898375,0.78567356057465076,0.50091631803661585,0.94336947053670883,\ + 0.06362213846296072,0.47192330472171307,\ +0.10716815060004592,0.94920115964487195,0.14596485672518611,0.04034968325868249,\ + 0.04535020282492042,0.73871155502274632,0.32900535268709064,0.12863306934013963,\ + 0.06573933875188231,0.33537696348503232,\ +0.23822965659201145,0.21827886346727610,0.07141010463237762,0.74001471605151892,\ + 0.20294443331658840,0.55442603398114443,0.48089468106627464,0.20190807711333036,\ + 0.53310041315853596,0.55530697200447321,\ +0.94629473658278584,0.61546878470107913,0.67337385797873139,0.61626600986346602,\ + 0.78442738251760602,0.99291495559737086,0.33036959776654840,0.19693034281954169,\ + 0.03315818728879094,0.11960808141157031,\ +0.45766852516680956,0.83135433867573738,0.65369247179478407,0.6583583448082209,\ + 0.26375361625105143,0.97574284672737122,0.63044753577560186,0.89286901615560055,\ + 0.31578356493264437,0.76139996573328972,\ +0.89644787041470408,0.77340125897899270,0.19968961318954825,0.25145971449092031,\ + 0.43832763982936740,0.37096222722902894,0.21171907847747207,0.46179189579561353,\ + 0.37858232436701655,0.47909884760156274,\ +0.44384705275297165,0.4244190966710448,0.60141251794993877,0.38433500844985247,\ + 0.86648589745163918,0.30322382133454084,0.44860231317579746,0.62512917164713144,\ + 0.46195234358310699,0.28169692959636450} + +#define DRESULT_OUT 6.46840295149013400 + +#define FMATRIX_IN {0.15869047446176410f,0.80895681912079453f,0.72621259605512023f,0.18993748771026731f,\ + 0.43964602379128337f,0.37921421090140939f,0.95195201179012656f,0.59145097108557820f,\ + 0.70597065938636661f,0.62873698258772492f,\ +0.62407150492072105f,0.68317985069006681f,0.70999773032963276f,0.25839814636856318f,\ + 0.65407369285821915f,0.76687160786241293f,0.71278580836951733f,0.68067426700145006f,\ + 0.70181696489453316f,0.28785153012722731f,\ +0.63760355720296502f,0.03401931514963508f,0.47457459988072515f,0.09878737432882190f,\ + 0.58781063789501786f,0.60066213225945830f,0.11923700617626309f,0.07392961112782359f,\ + 0.40879997471347451f,0.3292048736475408f,\ +0.42704886104911566f,0.23805456422269344f,0.9438692079856992f,0.06199027225375175f,\ + 0.60208318661898375f,0.78567356057465076f,0.50091631803661585f,0.94336947053670883f,\ + 0.06362213846296072f,0.47192330472171307f,\ +0.10716815060004592f,0.94920115964487195f,0.14596485672518611f,0.04034968325868249f,\ + 0.04535020282492042f,0.73871155502274632f,0.32900535268709064f,0.12863306934013963f,\ + 0.06573933875188231f,0.33537696348503232f,\ +0.23822965659201145f,0.21827886346727610f,0.07141010463237762f,0.74001471605151892f,\ + 0.20294443331658840f,0.55442603398114443f,0.48089468106627464f,0.20190807711333036f,\ + 0.53310041315853596f,0.55530697200447321f,\ +0.94629473658278584f,0.61546878470107913f,0.67337385797873139f,0.61626600986346602f,\ + 0.78442738251760602f,0.99291495559737086f,0.33036959776654840f,0.19693034281954169f,\ + 0.03315818728879094f,0.11960808141157031f,\ +0.45766852516680956f,0.83135433867573738f,0.65369247179478407f,0.6583583448082209f,\ + 0.26375361625105143f,0.97574284672737122f,0.63044753577560186f,0.89286901615560055f,\ + 0.31578356493264437f,0.76139996573328972f,\ +0.89644787041470408f,0.77340125897899270f,0.19968961318954825f,0.25145971449092031f,\ + 0.43832763982936740f,0.37096222722902894f,0.21171907847747207f,0.46179189579561353f,\ + 0.37858232436701655f,0.47909884760156274f,\ +0.44384705275297165f,0.4244190966710448f,0.60141251794993877f,0.38433500844985247f,\ + 0.86648589745163918f,0.30322382133454084f,0.44860231317579746f,0.62512917164713144f,\ + 0.46195234358310699f,0.28169692959636450f} + +#define FRESULT_OUT 6.46840295149013400f + + +#define ZRMATRIX_IN {0.21132486546412110,0.56084860628470778,0.30760907428339124,0.50153415976092219, \ + 0.28064980218186975,0.40948254754766822,0.38737787725403905,0.53762298030778766,\ + 0.58787201577797532,0.64885628735646605,\ +0.75604385416954756,0.66235693730413914,0.93296162132173777,0.43685875833034515,\ + 0.12800584640353918,0.87841258011758327,0.92228986788541079,0.11999255046248436,\ + 0.48291792999953032,0.99231909401714802,\ +0.00022113462910056,0.72635067673400044,0.21460078610107303,0.26931248093023896,\ + 0.77831285959109664,0.11383596854284406,0.94881842611357570,0.2256303490139544,\ + 0.22328650346025825,0.05004197778180242,\ +0.33032709173858166,0.19851438421756029,0.31264199689030647,0.63257448654621840,\ + 0.21190304495394230,0.19983377400785685,0.34353372454643250,0.62740930821746588,\ + 0.84008856676518917,0.74855065811425447,\ +0.66538110421970487,0.54425731627270579,0.36163610080257058,0.40519540151581168,\ + 0.11213546665385365,0.56186607433483005,0.37601187312975526,0.76084325974807143,\ + 0.12059959070757031,0.41040589986369014,\ +0.62839178834110498,0.23207478970289230,0.2922266637906432,0.91847078315913677,\ + 0.68568959552794695,0.58961773291230202,0.73409405630081892,0.04855662025511265,\ + 0.28553641680628061,0.60845263302326202,\ +0.84974523587152362,0.23122371966019273,0.56642488157376647,0.04373343335464597,\ + 0.15312166837975383,0.68539796629920602,0.26157614728435874,0.67239497276023030,\ + 0.86075146449729800,0.85442108893766999,\ +0.68573101982474327,0.21646326314657927,0.48264719732105732,0.48185089323669672,\ + 0.69708506017923355,0.89062247332185507,0.49934938363730907,0.20171726960688829,\ + 0.84941016510128975,0.06426467280834913,\ +0.87821648130193353,0.88338878145441413,0.33217189135029912,0.26395560009405017,\ + 0.84155184263363481,0.50422128057107329,0.26385784195736051,0.39115739194676280,\ + 0.52570608118548989,0.82790829380974174,\ +0.06837403681129217,0.65251349471509457,0.59350947011262178,0.41481037065386772,\ + 0.40620247554033995,0.34936154074966908,0.52535630855709314,0.83003165572881699,\ + 0.99312098976224661,0.92623437754809856} + +#define ZIMATRIX_IN {0.56672112690284848,0.73956565884873271,0.02587099233642220,0.70648676296696067,\ + 0.96770532103255391,0.42568723810836673,0.18711117887869477,0.21240556007251143,\ + 0.69127879338338971,0.13049928424879909,\ +0.57116389367729425,0.00371731072664261,0.51744682248681784,0.52114724926650524,\ + 0.50685344357043505,0.24615605548024178,0.01895748358219862,0.57950199581682682,\ + 0.76568587962538004,0.96820035576820374,\ +0.81601104838773608,0.59005728596821427,0.39168732380494475,0.28704008506610990,\ + 0.52329764096066356,0.92295324662700295,0.84335647663101554,0.26281475694850087,\ + 0.35726496530696750,0.6561381467618048,\ +0.05689279362559319,0.3096467358991504,0.24135384149849415,0.65027950797230005,\ + 0.5596947595477104,0.10007458087056875,0.07485948316752911,0.43609866220504045,\ + 0.76933998242020607,0.24455389659851789,\ +0.55959366867318749,0.25522057106718421,0.50644348980858922,0.08813347620889544,\ + 0.56173070007935166,0.46782181179150939,0.85328151332214475,0.91105451015755534,\ + 0.54776339093223214,0.52831235667690635,\ +0.12493403162807226,0.62518793903291225,0.42361020017415285,0.44987633451819420,\ + 0.46817600261420012,0.39504976756870747,0.01245901081711054,0.80826673656702042,\ + 0.09622887428849936,0.84689256362617016,\ +0.72792222863063216,0.11574173765257001,0.28937275288626552,0.72272530803456903,\ + 0.77945467224344611,0.03661171020939946,0.18675393564626575,0.81026530498638749,\ + 0.95611717319115996,0.78766220854595304,\ +0.26777664758265018,0.61170040909200907,0.08879321813583374,0.89767962601035833,\ + 0.79010718129575253,0.51753685344010592,0.49205840751528740,0.25904283951967955,\ + 0.22074085660278797,0.12620826158672571,\ +0.54653349192813039,0.67839562846347690,0.62128817522898316,0.24278218811377883,\ + 0.98085420625284314,0.83254515705630183,0.74896081397309899,0.41390872886404395,\ + 0.01432593585923314,0.78838609857484698,\ +0.98854076582938433,0.33200952783226967,0.34549844544380903,0.43377211131155491,\ + 0.81870661024004221,0.61048321425914764,0.94149570073932409,0.35999277792870998,\ + 0.81914897728711367,0.34530424699187279} + +#define ZRESULT_OUT 8.6410312306124072989633 + +#define CRMATRIX_IN {0.21132486546412110f,0.56084860628470778f,0.30760907428339124f,0.50153415976092219f, \ + 0.28064980218186975f,0.40948254754766822f,0.38737787725403905f,0.53762298030778766f,\ + 0.58787201577797532f,0.64885628735646605f,\ +0.75604385416954756f,0.66235693730413914f,0.93296162132173777f,0.43685875833034515f,\ + 0.12800584640353918f,0.87841258011758327f,0.92228986788541079f,0.11999255046248436f,\ + 0.48291792999953032f,0.99231909401714802f,\ +0.00022113462910056f,0.72635067673400044f,0.21460078610107303f,0.26931248093023896f,\ + 0.77831285959109664f,0.11383596854284406f,0.94881842611357570f,0.2256303490139544f,\ + 0.22328650346025825f,0.05004197778180242f,\ +0.33032709173858166f,0.19851438421756029f,0.31264199689030647f,0.63257448654621840f,\ + 0.21190304495394230f,0.19983377400785685f,0.34353372454643250f,0.62740930821746588f,\ + 0.84008856676518917f,0.74855065811425447f,\ +0.66538110421970487f,0.54425731627270579f,0.36163610080257058f,0.40519540151581168f,\ + 0.11213546665385365f,0.56186607433483005f,0.37601187312975526f,0.76084325974807143f,\ + 0.12059959070757031f,0.41040589986369014f,\ +0.62839178834110498f,0.23207478970289230f,0.2922266637906432f,0.91847078315913677f,\ + 0.68568959552794695f,0.58961773291230202f,0.73409405630081892f,0.04855662025511265f,\ + 0.28553641680628061f,0.60845263302326202f,\ +0.84974523587152362f,0.23122371966019273f,0.56642488157376647f,0.04373343335464597f,\ + 0.15312166837975383f,0.68539796629920602f,0.26157614728435874f,0.67239497276023030f,\ + 0.86075146449729800f,0.85442108893766999f,\ +0.68573101982474327f,0.21646326314657927f,0.48264719732105732f,0.48185089323669672f,\ + 0.69708506017923355f,0.89062247332185507f,0.49934938363730907f,0.20171726960688829f,\ + 0.84941016510128975f,0.06426467280834913f,\ +0.87821648130193353f,0.88338878145441413f,0.33217189135029912f,0.26395560009405017f,\ + 0.84155184263363481f,0.50422128057107329f,0.26385784195736051f,0.39115739194676280f,\ + 0.52570608118548989f,0.82790829380974174f,\ +0.06837403681129217f,0.65251349471509457f,0.59350947011262178f,0.41481037065386772f,\ + 0.40620247554033995f,0.34936154074966908f,0.52535630855709314f,0.83003165572881699f,\ + 0.99312098976224661f,0.92623437754809856f} + +#define CIMATRIX_IN {0.56672112690284848f,0.73956565884873271f,0.02587099233642220f,0.70648676296696067f,\ + 0.96770532103255391f,0.42568723810836673f,0.18711117887869477f,0.21240556007251143f,\ + 0.69127879338338971f,0.13049928424879909f,\ +0.57116389367729425f,0.00371731072664261f,0.51744682248681784f,0.52114724926650524f,\ + 0.50685344357043505f,0.24615605548024178f,0.01895748358219862f,0.57950199581682682f,\ + 0.76568587962538004f,0.96820035576820374f,\ +0.81601104838773608f,0.59005728596821427f,0.39168732380494475f,0.28704008506610990f,\ + 0.52329764096066356f,0.92295324662700295f,0.84335647663101554f,0.26281475694850087f,\ + 0.35726496530696750f,0.6561381467618048f,\ +0.05689279362559319f,0.3096467358991504f,0.24135384149849415f,0.65027950797230005f,\ + 0.5596947595477104f,0.10007458087056875f,0.07485948316752911f,0.43609866220504045f,\ + 0.76933998242020607f,0.24455389659851789f,\ +0.55959366867318749f,0.25522057106718421f,0.50644348980858922f,0.08813347620889544f,\ + 0.56173070007935166f,0.46782181179150939f,0.85328151332214475f,0.91105451015755534f,\ + 0.54776339093223214f,0.52831235667690635f,\ +0.12493403162807226f,0.62518793903291225f,0.42361020017415285f,0.44987633451819420f,\ + 0.46817600261420012f,0.39504976756870747f,0.01245901081711054f,0.80826673656702042f,\ + 0.09622887428849936f,0.84689256362617016f,\ +0.72792222863063216f,0.11574173765257001f,0.28937275288626552f,0.72272530803456903f,\ + 0.77945467224344611f,0.03661171020939946f,0.18675393564626575f,0.81026530498638749f,\ + 0.95611717319115996f,0.78766220854595304f,\ +0.26777664758265018f,0.61170040909200907f,0.08879321813583374f,0.89767962601035833f,\ + 0.79010718129575253f,0.51753685344010592f,0.49205840751528740f,0.25904283951967955f,\ + 0.22074085660278797f,0.12620826158672571f,\ +0.54653349192813039f,0.67839562846347690f,0.62128817522898316f,0.24278218811377883f,\ + 0.98085420625284314f,0.83254515705630183f,0.74896081397309899f,0.41390872886404395f,\ + 0.01432593585923314f,0.78838609857484698f,\ +0.98854076582938433f,0.33200952783226967f,0.34549844544380903f,0.43377211131155491f,\ + 0.81870661024004221f,0.61048321425914764f,0.94149570073932409f,0.35999277792870998f,\ + 0.81914897728711367f,0.34530424699187279f} + +#define CRESULT_OUT 8.6410312306124072989633f + +static void sinfnormaTest(void) { + + float in[] = FMATRIX_IN ; + + float out = 0; + + float result = FRESULT_OUT ; + + out = sinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %e\tresult : %e\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 1e-6 ) ; + + + +} + +static void dinfnormaTest(void) { + + double in[] = DMATRIX_IN ; + + double out = 0; + + double result = DRESULT_OUT ; + + out = dinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %.16f\tresult : %.16f\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 3e-16 ) ; + + + +} + +static void zinfnormaTest(void) { + + double Rin[] = ZRMATRIX_IN ; + double Iin[] = ZIMATRIX_IN ; + + doubleComplex* in = DoubleComplexMatrix ( Rin , Iin , LEADDIM*LEADDIM ) ; + + double out = 0; + + double result = ZRESULT_OUT ; + + out = zinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %.16f\tresult : %.16f\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 3e-16 ) ; + + + +} + +static void cinfnormaTest(void) { + + float Rin[] = CRMATRIX_IN ; + float Iin[] = CIMATRIX_IN ; + + floatComplex* in = FloatComplexMatrix ( Rin , Iin , LEADDIM*LEADDIM ) ; + + float out = 0; + + float result = CRESULT_OUT ; + + out = cinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %.16f\tresult : %.16f\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 3e-6 ) ; + + + +} + +static int testInfiniteNorm(void) { + + printf("\n>>>> Matrix Exponential Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dinfnormaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sinfnormaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cinfnormaTest();; + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zinfnormaTest(); + + return 0; +} + + + +int main(void) { + assert(testInfiniteNorm() == 0); + return 0; +} + + diff --git a/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj b/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj new file mode 100644 index 0000000..2b4cd27 --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {43BF5E9A-3456-45FE-9DEF-9E962B4D4E3D} + testMatrixInfiniteNorm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters b/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters new file mode 100644 index 0000000..4d00eb4 --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/infiniteNorm/zinfnorma.c b/src/c/matrixOperations/infiniteNorm/zinfnorma.c new file mode 100644 index 0000000..bc68390 --- /dev/null +++ b/src/c/matrixOperations/infiniteNorm/zinfnorma.c @@ -0,0 +1,34 @@ +/* + * 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 "infiniteNorm.h" + +double zinfnorma(doubleComplex* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + double dblTemp = 0; + double dblRef = 0; + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + dblTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + dblTemp += dpythags( zreals( in[iIndex1 + iIndex2 * _iRows]), + zimags( in[iIndex1 + iIndex2 * _iRows])); + } + if(dblTemp > dblRef) + dblRef = dblTemp; + } + + return dblRef; +} diff --git a/src/c/matrixOperations/interfaces/int_OpApex.h b/src/c/matrixOperations/interfaces/int_OpApex.h new file mode 100644 index 0000000..4915e20 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpApex.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPAPEX_H__ +#define __INT_OPAPEX_H__ + +#define s0OpApexs0(in) in + +#define d0OpApexd0(in) in + +#define c0OpApexc0(in) cconjs(in) + +#define z0OpApexz0(in) zconjs(in) + +#define s2OpApexs2(in,size,out) stransposea(in,size[0],size[1],out); + +#define d2OpApexd2(in,size,out) dtransposea(in,size[0],size[1],out); + +#define c2OpApexc2(in,size,out) ctransposea(in,size[0],size[1],out);cconja(out,size[0]*size[1],out); + +#define z2OpApexz2(in,size,out) ztransposea(in,size[0],size[1],out);zconja(out,size[0]*size[1],out); + +#endif /* !__INT_OPAPEX_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_OpBackSlash.h b/src/c/matrixOperations/interfaces/int_OpBackSlash.h new file mode 100644 index 0000000..898c37b --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpBackSlash.h @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPBACKSLASH_H__ +#define __INT_OPBACKSLASH_H__ + +/* Matrix \ Matrix */ + +#define s2s2OpBackSlashs2(in1,size1,in2,size2,out) sldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpBackSlashd2(in1,size1,in2,size2,out) dldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpBackSlashz2(in1,size1,in2,size2,out) zldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPBACKSLASH_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_OpCc.h b/src/c/matrixOperations/interfaces/int_OpCc.h new file mode 100644 index 0000000..2cd3d55 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpCc.h @@ -0,0 +1,134 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPCC_H__ +#define __INT_OPCC_H__ + +/* + /!\ + / ! \ We used rowcat because disp isn't right. In the real case, it must be columncat for Cc. + /__!_ \ + +*/ + + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0OpCcs2(in1,in2,out) srowcats(in1,in2,out) + +#define d0d0OpCcd2(in1,in2,out) drowcats(in1,in2,out) + +#define c0c0OpCcc2(in1,in2,out) crowcats(in1,in2,out) + +#define z0z0OpCcz2(in1,in2,out) zrowcats(in1,in2,out) + +#define s2s2OpCcs2(in1,size1,in2,size2,out) srowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define d2d2OpCcd2(in1,size1,in2,size2,out) drowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define c2c2OpCcc2(in1,size1,in2,size2,out) crowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define z2z2OpCcz2(in1,size1,in2,size2,out) zrowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +/* Differents input elements */ +#define s0c0OpCcc2(in1,in2,out) c0c0OpCcc2(FloatComplex(in1,0),in2,out) + +#define d0z0OpCcz2(in1,in2,out) z0z0OpCcz2(DoubleComplex(in1,0),in2,out) + +#define c0s0OpCcc2(in1,in2,out) c0c0OpCcc2(in1,FloatComplex(in2,0),out) + +#define z0d0OpCcz2(in1,in2,out) z0z0OpCcz2(in1,DoubleComplex(in2,0),out) + +#define s2c2OpCcc2(in1,size1,in2,size2,out) sfilla((float*)out,size1[0],size1[1],0); \ + c2c2OpCcc2(FloatComplexMatrix(in1,(float*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define d2z2OpCcz2(in1,size1,in2,size2,out) dfilla((double*)out,size1[0],size1[1],0); \ + z2z2OpCcz2(DoubleComplexMatrix(in1,(double*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define c2s2OpCcc2(in1,size1,in2,size2,out) sfilla((float*)out,size2[0],size2[1],0); \ + c2c2OpCcc2(in1, size1, FloatComplexMatrix(in2,(float*)out,size2[0]*size2[1]), size2, out) + +#define z2d2OpCcz2(in1,size1,in2,size2,out) dfilla((double*)out,size2[0],size2[1],0); \ + z2z2OpCcz2(in1, size1, DoubleComplexMatrix(in2,(double*)out,size2[0]*size2[1]), size2, out) + +/* Matrix-Scalar */ + +/* Same type */ + +#define s2s0OpCcs2(in1,size,in2,out) { float temp=in2; \ + srowcata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define d2d0OpCcd2(in1,size,in2,out) { double temp=in2; \ + drowcata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define c2c0OpCcc2(in1,size,in2,out) { floatComplex temp = in2; \ + crowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } + +#define z2z0OpCcz2(in1,size,in2,out) { doubleComplex temp =in2; \ + zrowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } + + +/* Different type */ +#define s2c0OpCcc2(in1,size,in2,out) sfilla((float *)out,size[0],size[1],0); \ + c2c0OpCcc2(FloatComplexMatrix(in1,(float*)out,size[0]*size[1]),size,in2,out) + +#define d2z0OpCcz2(in1,size,in2,out) dfilla((double *)out,size[0],size[1],0); \ + z2z0OpCcz2(DoubleComplexMatrix(in1,(double *)out,size[0]*size[1]),size,in2,out) + +#define c2s0OpCcc2(in1,size,in2,out) { floatComplex temp = FloatComplex(in2, 0); c2c0OpCcc2(in1, size, temp, out)} + +#define z2d0OpCcz2(in1,size,in2,out) { doubleComplex temp = DoubleComplex(in2, 0); z2z0OpCcz2(in1, size, temp, out)} + + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpCcs2(in1,in2,size,out) { \ + float __tmp1 = in1 ;\ + srowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define d0d2OpCcd2(in1,in2,size,out) { \ + double __tmp1 = in1 ;\ + drowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define c0c2OpCcc2(in1,in2,size,out) { \ + floatComplex __tmp1 = in1 ;\ + crowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define z0z2OpCcz2(in1,in2,size,out) { \ + doubleComplex __tmp1 = in1 ;\ + zrowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +/* Different type */ +#define s0c2OpCcc2(in1,in2,size,out) c0c2OpCcc2(FloatComplex(in1,0),in2,size,out) + +#define d0z2OpCcz2(in1,in2,size,out) z0z2OpCcz2(DoubleComplex(in1,0),in2,size,out) + +#define c0s2OpCcc2(in1,in2,size,out) sfilla((float*)out,size[0],size[1],0); \ + c0c2OpCcc2(in1,FloatComplexMatrix(in2,(float*)out,size[0]*size[1]),size,out) + +#define z0d2OpCcz2(in1,in2,size,out) dfilla((double*)out,size[0],size[1],0); \ + z0z2OpCcz2(in1,DoubleComplexMatrix(in2,(double*)out,size[0]*size[1]),size,out) + +#endif /* !__INT_OPCC_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_OpDotApex.h b/src/c/matrixOperations/interfaces/int_OpDotApex.h new file mode 100644 index 0000000..4978ca5 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpDotApex.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPDOTAPEX_H__ +#define __INT_OPDOTAPEX_H__ + +#define s0OpDotApexs0(in) in + +#define d0OpDotApexd0(in) in + +#define c0OpDotApexc0(in) in + +#define z0OpDotApexz0(in) in + +#define s2OpDotApexs2(in,size,out) stransposea(in,size[0],size[1],out); + +#define d2OpDotApexd2(in,size,out) dtransposea(in,size[0],size[1],out); + +#define c2OpDotApexc2(in,size,out) ctransposea(in,size[0],size[1],out); + +#define z2OpDotApexz2(in,size,out) ztransposea(in,size[0],size[1],out); + +#endif /* !__INT_OPDOTAPEX_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_OpRc.h b/src/c/matrixOperations/interfaces/int_OpRc.h new file mode 100644 index 0000000..1e8f1c9 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpRc.h @@ -0,0 +1,139 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPRC_H__ +#define __INT_OPRC_H__ + +/* + /!\ + / ! \ We used columncat because disp isn't right. In the real case, it must be rowcat for Rc. + /__!_ \ + +*/ + + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0OpRcs2(in1,in2,out) scolumncats(in1,in2,out) + +#define d0d0OpRcd2(in1,in2,out) dcolumncats(in1,in2,out) + +#define c0c0OpRcc2(in1,in2,out) ccolumncats(in1,in2,out) + +#define z0z0OpRcz2(in1,in2,out) zcolumncats(in1,in2,out) + +#define s2s2OpRcs2(in1,size1,in2,size2,out) scolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define d2d2OpRcd2(in1,size1,in2,size2,out) dcolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define c2c2OpRcc2(in1,size1,in2,size2,out) ccolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define z2z2OpRcz2(in1,size1,in2,size2,out) zcolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +/* Differents input elements */ +#define s0c0OpRcc2(in1,in2,out) c0c0OpRcc2(FloatComplex(in1,0),in2,out) + +#define d0z0OpRcz2(in1,in2,out) z0z0OpRcz2(DoubleComplex(in1,0),in2,out) + +#define c0s0OpRcc2(in1,in2,out) c0c0OpRcc2(in1,FloatComplex(in2,0),out) + +#define z0d0OpRcz2(in1,in2,out) z0z0OpRcz2(in1,DoubleComplex(in2,0),out) + +#define s2c2OpRcc2(in1,size1,in2,size2,out) sfilla((float*)out,size1[0],size1[1],0); \ + c2c2OpRcc2(FloatComplexMatrix(in1,(float*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define d2z2OpRcz2(in1,size1,in2,size2,out) dfilla((double*)out,size1[0],size1[1],0); \ + z2z2OpRcz2(DoubleComplexMatrix(in1,(double*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define c2s2OpRcc2(in1,size1,in2,size2,out) sfilla((float*)out,size2[0],size2[1],0); \ + c2c2OpRcc2(in1, size1, FloatComplexMatrix(in2,(float*)out,size2[0]*size2[1]), size2, out) + +#define z2d2OpRcz2(in1,size1,in2,size2,out) dfilla((double*)out,size2[0],size2[1],0); \ + z2z2OpRcz2(in1, size1, DoubleComplexMatrix(in2,(double*)out,size2[0]*size2[1]), size2, out) + +/* Matrix-Scalar */ + +/* Same type */ + +#define s2s0OpRcs2(in1,size,in2,out) { float temp=in2; \ + scolumncata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define d2d0OpRcd2(in1,size,in2,out) { double temp=in2; \ + dcolumncata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define c2c0OpRcc2(in1,size,in2,out) { floatComplex temp=in2; \ + ccolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define z2z0OpRcz2(in1,size,in2,out) { doubleComplex temp=in2; \ + zcolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +/* Different type */ +#define s2c0OpRcc2(in1,size,in2,out) { floatComplex temp=in2; \ + sfilla((float *)out,size[0],size[1],0); \ + scolumncata(FloatComplexMatrix(in1,(float*)out,size[0]*size[1]), size[0], size[1], &temp , 1, 1, out); \ + } + +#define d2z0OpRcz2(in1,size,in2,out) { doubleComplex temp=in2; \ + dfilla((double *)out,size[0],size[1],0); \ + zcolumncata(DoubleComplexMatrix(in1,(double *)out,size[0]*size[1]), size[0], size[1], &temp , 1, 1, out); \ + } + +#define c2s0OpRcc2(in1,size,in2,out) { floatComplex temp = FloatComplex(in2,0); \ + ccolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define z2d0OpRcz2(in1,size,in2,out) { doubleComplex temp = DoubleComplex(in2,0); \ + zcolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpRcs2(in1,in2,size,out) { \ + float __tmp1 = in1 ;\ + scolumncata(&__tmp1 , 1, 1, in2, size[0], size[1], out);\ +} +#define d0d2OpRcd2(in1,in2,size,out) {\ + double __tmp1 = in1 ;\ + dcolumncata(&__tmp1 , 1, 1, in2, size[0], size[1], out); \ +} + +#define c0c2OpRcc2(in1,in2,size,out) { \ + floatComplex __tmp1 = in1 ;\ + ccolumncata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define z0z2OpRcz2(in1,in2,size,out) { \ + doubleComplex __tmp1 = in1 ;\ + zcolumncata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +/* Different type */ +#define s0c2OpRcc2(in1,in2,size,out) c0c2OpRcc2(FloatComplex(in1,0),in2,size,out) + +#define d0z2OpRcz2(in1,in2,size,out) z0z2OpRcz2(DoubleComplex(in1,0),in2,size,out) + +#define c0s2OpRcc2(in1,in2,size,out) sfilla((float*)out,size[0],size[1],0); \ + c0c2OpRcc2(in1,FloatComplexMatrix(in2,(float*)out,size[0]*size[1]),size,out) + +#define z0d2OpRcz2(in1,in2,size,out) dfilla((double*)out,size[0],size[1],0); \ + z0z2OpRcz2(in1,DoubleComplexMatrix(in2,(double*)out,size[0]*size[1]),size,out) + +#endif /* !__INT_OPRC_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_OpSlash.h b/src/c/matrixOperations/interfaces/int_OpSlash.h new file mode 100644 index 0000000..20930a0 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpSlash.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPSLASH_H__ +#define __INT_OPSLASH_H__ + + +/* Matrix / Matrix */ + +#define s2s2OpSlashs2(in1,size1,in2,size2,out) srdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpSlashd2(in1,size1,in2,size2,out) drdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpSlashz2(in1,size1,in2,size2,out) zrdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpSlashc2(in1,size1,in2,size2,out) crdivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPSLASH_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_OpStar.h b/src/c/matrixOperations/interfaces/int_OpStar.h new file mode 100644 index 0000000..f922b31 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_OpStar.h @@ -0,0 +1,45 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPSTAR_H__ +#define __INT_OPSTAR_H__ + +/* Matrix * Matrix */ + +#define s2s2OpStars2(in1,size1,in2,size2,out) smulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpStard2(in1,size1,in2,size2,out) dmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define u82u82OpStaru82(in1,size1,in2,size2,out) u8mulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define u162u162OpStaru162(in1,size1,in2,size2,out) u16mulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define i82i82OpStari82(in1,size1,in2,size2,out) i8mulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define i162i162OpStari162(in1,size1,in2,size2,out) i16mulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpStarc2(in1,size1,in2,size2,out) cmulma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpStarz2(in1,size1,in2,size2,out) zmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0],size2[1]),size2[0],size2[1],out) + +#define d2z2OpStarc2(in1,size1,in2,size2,out) cmulma(DoubleComplexMatrix(in1,0,size1[0],size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPSTAR_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_cat.h b/src/c/matrixOperations/interfaces/int_cat.h new file mode 100644 index 0000000..db80bec --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_cat.h @@ -0,0 +1,359 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __INT_CAT_H +#define __INT_CAT_H + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0cats2(in1,in2,out) scolumncats(in1,in2,out) + +#define d0d0catd2(in1,in2,out) dcolumncats(in1,in2,out) + +#define c0c0catc2(in1,in2,out) ccolumncats(in1,in2,out) + +#define z0z0catz2(in1,in2,out) zcolumncats(in1,in2,out) + +#define u80u80catu82(in1,in2,out) u8columncats(in1,in2,out) + +#define u160u160catu162(in1,in2,out) u16columncats(in1,in2,out) + +#define i80i80cati82(in1,in2,out) i8columnscats(in1,in2,out) + +#define i160i160cati162(in1,in2,out) i16columnscats(in1,in2,out) + +#define s2s2cats2(in1,size1,in2,size2,out) scolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define d2d2catd2(in1,size1,in2,size2,out) dcolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +/* ROW COLUMN SUPPORT for cat, If First argument in cat command is 1 then it will concatenate the element ROW WISE else COLUMN WISE */ + +#define d0d2d2catd2(in1,in2,size2,in3,size3,out) (in1 == 1) ? drowcata(in2, size2[0], size2[1], in3, size3[0], size3[1], out) : dcolumncata(in2, size2[0],size2[1],in3,size3[0],size3[1],out) + +#define d0u82u82catu82(in1,in2,size2,in3,size3,out) (in1 == 1) ? u8rowcata(in2, size2[0], size2[1], in3, size3[0], size3[1], out) : u8columncata(in2, size2[0],size2[1],in3,size3[0],size3[1],out) + +#define d0u162u162catu162(in1,in2,size2,in3,size3,out) (in1 == 1) ? u16rowcata(in2, size2[0], size2[1], in3, size3[0], size3[1], out) : u16columncata(in2, size2[0],size2[1],in3,size3[0],size3[1],out) + + +#define d0i82i82cati82(in1,in2,size2,in3,size3,out) (in1 == 1) ? i8rowcata(in2, size2[0], size2[1], in3, size3[0], size3[1], out) : i8columncata(in2, size2[0],size2[1],in3,size3[0],size3[1],out) + +#define d0i162i162cati162(in1,in2,size2,in3,size3,out) (in1 == 1) ? i16rowcata(in2, size2[0], size2[1], in3, size3[0], size3[1], out) : i16columncata(in2, size2[0],size2[1],in3,size3[0],size3[1],out) + + +#define c2c2catc2(in1,size1,in2,size2,out) ccolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define z2z2catz2(in1,size1,in2,size2,out) zcolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define u82u82catu82(in1,size1,in2,size2,out) u8columncata(in1,size1[0], size1[1], in2, size2[0], size2[1], out) + +#define u162u162catu162(in1,size1,in2,size2,out) u16columncata(in1,size1[0], size1[1], in2, size2[0], size2[1], out) + +#define i82i82cati82(in1,size1,in2,size2,out) i8columncata(in1,size1[0], size1[1], in2, size2[0], size2[1], out) + +#define i162i162cati162(in1,size1,in2,size2,out) i16columncata(in1,size1[0], size1[1], in2, size2[0], size2[1], out) + + + +/* Differents input elements */ +#define s0c0catc2(in1,in2,out) c0c0OpRcc2(FloatComplex(in1,0),in2,out) + +#define d0z0catz2(in1,in2,out) z0z0OpRcz2(DoubleComplex(in1,0),in2,out) + +#define c0s0catc2(in1,in2,out) c0c0OpRcc2(in1,FloatComplex(in2,0),out) + +#define z0d0catz2(in1,in2,out) z0z0OpRcz2(in1,DoubleComplex(in2,0),out) + +#define s2c2catc2(in1,size1,in2,size2,out) sfilla((float*)out,size1[0],size1[1],0); \ + c2c2OpRcc2(FloatComplexMatrix(in1,(float*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define d2z2catz2(in1,size1,in2,size2,out) dfilla((double*)out,size1[0],size1[1],0); \ + z2z2OpRcz2(DoubleComplexMatrix(in1,(double*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define c2s2catc2(in1,size1,in2,size2,out) sfilla((float*)out,size2[0],size2[1],0); \ + c2c2OpRcc2(in1, size1, FloatComplexMatrix(in2,(float*)out,size2[0]*size2[1]), size2, out) + +#define z2d2catz2(in1,size1,in2,size2,out) dfilla((double*)out,size2[0],size2[1],0); \ + z2z2OpRcz2(in1, size1, DoubleComplexMatrix(in2,(double*)out,size2[0]*size2[1]), size2, out) + +/* Matrix-Scalar */ + +/* Same type */ + +#define s2s0cats2(in1,size,in2,out) { float temp=in2; \ + scolumncata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define d2d0catd2(in1,size,in2,out) { double temp=in2; \ + dcolumncata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define c2c0catc2(in1,size,in2,out) { floatComplex temp=in2; \ + ccolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define z2z0catz2(in1,size,in2,out) { doubleComplex temp=in2; \ + zcolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define u82u80catu82(in1,size,in2,out) { uint8 temp=in2; \ + u8columncata(in1,size[0],size[1],&temp,1,1,out); \ + } +#define u162u160catu162(in1,size,in2,out) { uint16 temp=in2; \ + u16columncata(in1,size[0],size[1],&temp,1,1,out); \ + } +#define i82i80cati82(in1,size,in2,out) { int8 temp=in2; \ + i8columncata(in1,size[0],size[1],&temp,1,1,out); \ + } +#define i162i160cati162(in1,size,in2,out) { int16 temp=in2; \ + i16columncata(in1,size[0],size[1],&temp,1,1,out); \ + } + + +/* Different type */ +#define s2c0catc2(in1,size,in2,out) { floatComplex temp=in2; \ + sfilla((float *)out,size[0],size[1],0); \ + scolumncata(FloatComplexMatrix(in1,(float*)out,size[0]*size[1]), size[0], size[1], &temp , 1, 1, out); \ + } + +#define d2z0catz2(in1,size,in2,out) { doubleComplex temp=in2; \ + dfilla((double *)out,size[0],size[1],0); \ + zcolumncata(DoubleComplexMatrix(in1,(double *)out,size[0]*size[1]), size[0], size[1], &temp , 1, 1, out); \ + } + +#define c2s0catc2(in1,size,in2,out) { floatComplex temp = FloatComplex(in2,0); \ + ccolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define z2d0catz2(in1,size,in2,out) { doubleComplex temp = DoubleComplex(in2,0); \ + zcolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2cats2(in1,in2,size,out) { \ + float __tmp1 = in1 ;\ + scolumncata(&__tmp1 , 1, 1, in2, size[0], size[1], out);\ +} +#define d0d2catd2(in1,in2,size,out) {\ + double __tmp1 = in1 ;\ + dcolumncata(&__tmp1 , 1, 1, in2, size[0], size[1], out); \ +} + +#define c0c2catc2(in1,in2,size,out) { \ + floatComplex __tmp1 = in1 ;\ + ccolumncata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define z0z2catz2(in1,in2,size,out) { \ + doubleComplex __tmp1 = in1 ;\ + zcolumncata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define u80u82catu82(in1,in2,size,out) {\ + uint8 __tmp1 = in1 ;\ + u8columncata(&__tmp1,1,1,in2,size[0],size[1],out);\ +} + +#define u160u162catu162(in1,in2,size,out) {\ + uint16 __tmp1 = in1 ;\ + u16columncata(&__tmp1,1,1,in2,size[0],size[1],out);\ +} + +#define i80i82cati82(in1,in2,size,out) {\ + int8 __tmp1 = in1 ;\ + i8columncata(&__tmp1,1,1,in2,size[0],size[1],out);\ +} + +#define i160i162cati162(in1,in2,size,out) {\ + int16 __tmp1 = in1 ;\ + i16columncata(&__tmp1,1,1,in2,size[0],size[1],out);\ +} + + +/* Different type */ +#define s0c2catc2(in1,in2,size,out) c0c2OpRcc2(FloatComplex(in1,0),in2,size,out) + +#define d0z2catz2(in1,in2,size,out) z0z2OpRcz2(DoubleComplex(in1,0),in2,size,out) + +#define c0s2catc2(in1,in2,size,out) sfilla((float*)out,size[0],size[1],0); \ + c0c2OpRcc2(in1,FloatComplexMatrix(in2,(float*)out,size[0]*size[1]),size,out) + +#define z0d2catz2(in1,in2,size,out) dfilla((double*)out,size[0],size[1],0); \ + z0z2OpRcz2(in1,DoubleComplexMatrix(in2,(double*)out,size[0]*size[1]),size,out) + + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0cats2(in1,in2,out) srowcats(in1,in2,out) + +#define d0d0catd2(in1,in2,out) drowcats(in1,in2,out) + +#define c0c0catc2(in1,in2,out) crowcats(in1,in2,out) + +#define z0z0catz2(in1,in2,out) zrowcats(in1,in2,out) + +#define u80u80catu82(in1,in2,out) u8rowcats(in1,in2,out) + +#define u160u160catu162(in1,in2,out) u16rowcats(in1,in2,out) + +#define i80i80cati82(in1,in2,out) i8rowcats(in1,in2,out) + +#define i160i160cati162(in1,in2,out) i16rowcats(in1,in2,out) + +#define s2s2cats2(in1,size1,in2,size2,out) srowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define d2d2catd2(in1,size1,in2,size2,out) drowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define c2c2catc2(in1,size1,in2,size2,out) crowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define z2z2catz2(in1,size1,in2,size2,out) zrowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define u82u82catu82(in1,size1,in2,size2,out) u8rowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define u162u162catu162(in1,size1,in2,size2,out) u16rowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define i82i82cati82(in1,size1,in2,size2,out) i8rowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define i162i162cati162(in1,size1,in2,size2,out) i16rowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +/* Differents input elements */ +#define s0c0catc2(in1,in2,out) c0c0OpCcc2(FloatComplex(in1,0),in2,out) + +#define d0z0catz2(in1,in2,out) z0z0OpCcz2(DoubleComplex(in1,0),in2,out) + +#define c0s0catc2(in1,in2,out) c0c0OpCcc2(in1,FloatComplex(in2,0),out) + +#define z0d0catz2(in1,in2,out) z0z0OpCcz2(in1,DoubleComplex(in2,0),out) + +#define s2c2catc2(in1,size1,in2,size2,out) sfilla((float*)out,size1[0],size1[1],0); \ + c2c2OpCcc2(FloatComplexMatrix(in1,(float*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define d2z2catz2(in1,size1,in2,size2,out) dfilla((double*)out,size1[0],size1[1],0); \ + z2z2OpCcz2(DoubleComplexMatrix(in1,(double*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define c2s2catc2(in1,size1,in2,size2,out) sfilla((float*)out,size2[0],size2[1],0); \ + c2c2OpCcc2(in1, size1, FloatComplexMatrix(in2,(float*)out,size2[0]*size2[1]), size2, out) + +#define z2d2catz2(in1,size1,in2,size2,out) dfilla((double*)out,size2[0],size2[1],0); \ + z2z2OpCcz2(in1, size1, DoubleComplexMatrix(in2,(double*)out,size2[0]*size2[1]), size2, out) + +/* Matrix-Scalar */ + +/* Same type */ + +#define s2s0cats2(in1,size,in2,out) { float temp=in2; \ + srowcata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define d2d0catd2(in1,size,in2,out) { double temp=in2; \ + drowcata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define c2c0catc2(in1,size,in2,out) { floatComplex temp = in2; \ + crowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } + +#define z2z0catz2(in1,size,in2,out) { doubleComplex temp =in2; \ + zrowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } + +#define u82u80catu82(in1,size,in2,out) { uint8 temp=in2; \ + u8rowcata(in1, size[0], size[1],&temp, 1,1,out);\ + } +#define u162u160catu162(in1,size,in2,out) { uint16 temp=in2; \ + u16rowcata(in1, size[0], size[1],&temp, 1,1,out);\ + } + +#define i82i80cati82(in1,size,in2,out) { int8 temp=in2; \ + i8rowcata(in1, size[0], size[1],&temp, 1,1,out);\ + } +#define i162i160cati162(in1,size,in2,out) { int16 temp=in2; \ + i16rowcata(in1, size[0], size[1],&temp, 1,1,out);\ + } + + + +/* Different type */ +#define s2c0catc2(in1,size,in2,out) sfilla((float *)out,size[0],size[1],0); \ + c2c0OpCcc2(FloatComplexMatrix(in1,(float*)out,size[0]*size[1]),size,in2,out) + +#define d2z0catz2(in1,size,in2,out) dfilla((double *)out,size[0],size[1],0); \ + z2z0OpCcz2(DoubleComplexMatrix(in1,(double *)out,size[0]*size[1]),size,in2,out) + +#define c2s0catc2(in1,size,in2,out) { floatComplex temp = FloatComplex(in2, 0); c2c0OpCcc2(in1, size, temp, out)} + +#define z2d0catz2(in1,size,in2,out) { doubleComplex temp = DoubleComplex(in2, 0); z2z0OpCcz2(in1, size, temp, out)} + + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2cats2(in1,in2,size,out) { \ + float __tmp1 = in1 ;\ + srowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define d0d2catd2(in1,in2,size,out) { \ + double __tmp1 = in1 ;\ + drowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define c0c2catc2(in1,in2,size,out) { \ + floatComplex __tmp1 = in1 ;\ + crowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define z0z2catz2(in1,in2,size,out) { \ + doubleComplex __tmp1 = in1 ;\ + zrowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define u80u82catu82(in1,in2,size,out) { \ + uint8 __tmp1 = in1;\ + u8rowcata(&__tmp1, 1,1, in2, size[0], size[1], out);\ +} + +#define u160u162catu162(in1,in2,size,out) { \ + uint16 __tmp1 = in1;\ + u16rowcata(&__tmp1, 1,1, in2, size[0], size[1], out);\ +} + +#define i80i82cati82(in1,in2,size,out) { \ + int8 __tmp1 = in1;\ + i8rowcata(&__tmp1, 1,1, in2, size[0], size[1], out);\ +} + +#define i160i162cati162(in1,in2,size,out) { \ + int16 __tmp1 = in1;\ + i16rowcata(&__tmp1, 1,1, in2, size[0], size[1], out);\ +} + + +/* Different type */ +#define s0c2catc2(in1,in2,size,out) c0c2OpCcc2(FloatComplex(in1,0),in2,size,out) + +#define d0z2catz2(in1,in2,size,out) z0z2OpCcz2(DoubleComplex(in1,0),in2,size,out) + +#define c0s2catc2(in1,in2,size,out) sfilla((float*)out,size[0],size[1],0); \ + c0c2OpCcc2(in1,FloatComplexMatrix(in2,(float*)out,size[0]*size[1]),size,out) + +#define z0d2catz2(in1,in2,size,out) dfilla((double*)out,size[0],size[1],0); \ + z0z2OpCcz2(in1,DoubleComplexMatrix(in2,(double*)out,size[0]*size[1]),size,out) + + +#endif /* !__INT_CAT__H */ + diff --git a/src/c/matrixOperations/interfaces/int_chol.h b/src/c/matrixOperations/interfaces/int_chol.h new file mode 100644 index 0000000..861ad4d --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_chol.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CHOL_H__ +#define __INT_CHOL_H__ + +#define s0chols0(in) schols(in) + +#define d0chold0(in) dchols(in) + +#define c0cholc0(in) cchols(in) + +#define z0cholz0(in) zchols(in) + +#define s2chols2(in,size,out) schola(in, size[0], out) + +#define d2chold2(in,size,out) dchola(in, size[0], out) + +#define c2cholc2(in,size,out) cchola(in, size[0], out) + +#define z2cholz2(in,size,out) zchola(in, size[0], out) + +#endif /* !__INT_CHOL_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_cumprod.h b/src/c/matrixOperations/interfaces/int_cumprod.h new file mode 100644 index 0000000..5ba3cc7 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_cumprod.h @@ -0,0 +1,54 @@ +/* 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 +*/ + +#ifndef __INT_CUMPROD_H__ +#define __INT_CUMPROD_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0cumprodd0(in) in +#define s0cumprods0(in) in +#define u80cumprodu80(in) in +#define u160cumprodu160(in) in +#define i80cumprodi80(in) in +#define i160cumprodi160(in) in + +#define d2cumprodd2(in1, size1, out) dcumproda(in1, size1[0], size1[1], out) +#define s2cumprods2(in1, size1, out) scumproda(in1, size1[0], size1[1], out) +#define u82cumprodu82(in1, size1, out) u8cumproda(in1, size1[0], size1[1], out) +#define u162cumprodu162(in1, size1, out) u16cumproda(in1, size1[0], size1[1], out) +#define i82cumprodi82(in1, size1, out) i8cumproda(in1, size1[0], size1[1], out) +#define i162cumprodi162(in1, size1, out) i16cumproda(in1, size1[0], size1[1], out) + +#define d2g2cumprodd2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + drowcumproda(in1,size1[0],size1[1],out) : dcolumncumproda(in1,size1[0],size1[1],out) +#define s2g2cumprods2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + srowcumproda(in1,size1[0],size1[1],out) : scolumncumproda(in1,size1[0],size1[1],out) +#define u82g2cumprodu82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u8rowcumproda(in1,size1[0],size1[1],out) : u8columncumproda(in1,size1[0],size1[1],out) +#define i82g2cumprodi82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i8rowcumproda(in1,size1[0],size1[1],out) : i8columncumproda(in1,size1[0],size1[1],out) +#define u162g2cumprodu162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u16rowcumproda(in1,size1[0],size1[1],out) : u16columncumproda(in1,size1[0],size1[1],out) +#define i162g2cumprodi162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i16rowcumproda(in1,size1[0],size1[1],out) : i16columncumproda(in1,size1[0],size1[1],out) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_CUMPROD_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_cumsum.h b/src/c/matrixOperations/interfaces/int_cumsum.h new file mode 100644 index 0000000..0eda0ac --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_cumsum.h @@ -0,0 +1,54 @@ +/* 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 +*/ + +#ifndef __INT_CUMSUM_H__ +#define __INT_CUMSUM_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0cumsumd0(in) in +#define s0cumsums0(in) in +#define u80cumsumu80(in) in +#define u160cumsumu160(in) in +#define i80cumsumi80(in) in +#define i160cumsumi160(in) in + +#define d2cumsumd2(in1, size1, out) dcumsuma(in1, size1[0], size1[1], out) +#define s2cumsums2(in1, size1, out) scumsuma(in1, size1[0], size1[1], out) +#define u82cumsumu82(in1, size1, out) u8cumsuma(in1, size1[0], size1[1], out) +#define u162cumsumu162(in1, size1, out) u16cumsuma(in1, size1[0], size1[1], out) +#define i82cumsumi82(in1, size1, out) i8cumsuma(in1, size1[0], size1[1], out) +#define i162cumsumi162(in1, size1, out) i16cumsuma(in1, size1[0], size1[1], out) + +#define d2g2cumsumd2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + drowcumsuma(in1,size1[0],size1[1],out) : dcolumncumsuma(in1,size1[0],size1[1],out) +#define s2g2cumsums2(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + srowcumsuma(in1,size1[0],size1[1],out) : scolumncumsuma(in1,size1[0],size1[1],out) +#define u82g2cumsumu82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u8rowcumsuma(in1,size1[0],size1[1],out) : u8columncumsuma(in1,size1[0],size1[1],out) +#define i82g2cumsumi82(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i8rowcumsuma(in1,size1[0],size1[1],out) : i8columncumsuma(in1,size1[0],size1[1],out) +#define u162g2cumsumu162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + u16rowcumsuma(in1,size1[0],size1[1],out) : u16columncumsuma(in1,size1[0],size1[1],out) +#define i162g2cumsumi162(in1, size1, in2, size2, out) (in2[0]=='r') ? \ + i16rowcumsuma(in1,size1[0],size1[1],out) : i16columncumsuma(in1,size1[0],size1[1],out) + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_CUMSUM_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_det.h b/src/c/matrixOperations/interfaces/int_det.h new file mode 100644 index 0000000..f7760b1 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_det.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_DETERM_H__ +#define __INT_DETERM_H__ + +#define s0dets0(in) in + +#define d0detd0(in) in + +#define c0detc0(in) in + +#define z0detz0(in) in + +#define s2dets0(in,size) sdeterma(in, size[0]) + +#define d2detd0(in,size) ddeterma(in, size[0]) + +#define c2detc0(in,size) cdeterma(in, size[0]) + +#define z2detz0(in,size) zdeterma(in, size[0]) + +#endif /* !__INT_DETERM_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_diag.h b/src/c/matrixOperations/interfaces/int_diag.h new file mode 100644 index 0000000..339831b --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_diag.h @@ -0,0 +1,85 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifndef __INT_DIAG_H__ +#define __INT_DIAG_H__ + + + +#define d0diagd0(in1) ddiags(in1) + +#define d0d0diagd0(in1,in2) ddiags(in1) + +#define d0d0diagd2(in1,in2,out) ddiaga(in1,1,in2,out) + +#define d2diagd2(in1,size,out) if(size[0] != size[1]) { (size[0]==1) ? ddiagins(in1,size[1],out) : ddiagins(in1,size[0],out); } else {ddiagexa(in1,size[0],size[1],0,out) ;} + +#define d2d0diagd2(in1,size,in2,out) if((size[0] != 1) && (size[1] != 1) ) { ddiagexa(in1,size[0],size[1],in2,out); } else { if(in2 != 0) {ddiagina(in1,size[0],size[1],in2,out);} else { (size[0] == 1) ? ddiagins(in1,size[1],out) : ddiagins(in1,size[0],out); };} + +#define d2d0diagd0(in1,size,in2) ddiagexs(in1,size[0],size[1],in2) + + + +#define u80diagu80(in1) u8diags(in1) + +#define u80d0diagu80(in1,in2) u8diags(in1) + +#define u80d0diagu82(in1,in2,out) u8diaga(in1,1,in2,out) + +#define u82diagu82(in1,size,out) if(size[0] != size[1]) { (size[0]==1) ? u8diagins(in1,size[1],out) : u8diagins(in1,size[0],out); } else {u8diagexa(in1,size[0],size[1],0,out) ;} + +#define u82d0diagu82(in1,size,in2,out) if((size[0] != 1) && (size[1] != 1) ) { u8diagexa(in1,size[0],size[1],in2,out); } else { if(in2 != 0) {u8diagina(in1,size[0],size[1],in2,out);} else { (size[0] == 1) ? u8diagins(in1,size[1],out) : u8diagins(in1,size[0],out); };} + +#define u82d0diagu80(in1,size,in2) u8diagexs(in1,size[0],size[1],in2) + +#define u160diagu160(in1) u16diags(in1) + +#define u160d0diagu160(in1,in2) u16diags(in1) + +#define u160d0diagu162(in1,in2,out) u16diaga(in1,1,in2,out) + +#define u162diagu162(in1,size,out) if(size[0] != size[1]) { (size[0]==1) ? u16diagins(in1,size[1],out) : u16diagins(in1,size[0],out); } else {u16diagexa(in1,size[0],size[1],0,out) ;} + +#define u162d0diagu162(in1,size,in2,out) if((size[0] != 1) && (size[1] != 1) ) { u16diagexa(in1,size[0],size[1],in2,out); } else { if(in2 != 0) {u16diagina(in1,size[0],size[1],in2,out);} else { (size[0] == 1) ? u16diagins(in1,size[1],out) : u16diagins(in1,size[0],out); };} + +#define u162d0diagu160(in1,size,in2) u16diagexs(in1,size[0],size[1],in2) + + + +#define i80diagi80(in1) i8diags(in1) + +#define i80d0diagi80(in1,in2) i8diags(in1) + +#define i80d0diagi82(in1,in2,out) i8diaga(in1,1,in2,out) + +#define i82diagi82(in1,size,out) if(size[0] != size[1]) { (size[0]==1) ? i8diagins(in1,size[1],out) : i8diagins(in1,size[0],out); } else {i8diagexa(in1,size[0],size[1],0,out) ;} + +#define i82d0diagi82(in1,size,in2,out) if((size[0] != 1) && (size[1] != 1) ) { i8diagexa(in1,size[0],size[1],in2,out); } else { if(in2 != 0) {i8diagina(in1,size[0],size[1],in2,out);} else { (size[0] == 1) ? i8diagins(in1,size[1],out) : i8diagins(in1,size[0],out); };} + +#define i82d0diagi80(in1,size,in2) i8diagexs(in1,size[0],size[1],in2) + +#define i160diagi160(in1) i16diags(in1) + +#define i160d0diagi160(in1,in2) i16diags(in1) + +#define i160d0diagi162(in1,in2,out) i16diaga(in1,1,in2,out) + + +#define i162diagi162(in1,size,out) if(size[0] != size[1]) { (size[0]==1) ? i16diagins(in1,size[1],out) : i16diagins(in1,size[0],out); } else {i16diagexa(in1,size[0],size[1],0,out) ;} + +#define i162d0diagi162(in1,size,in2,out) if((size[0] != 1) && (size[1] != 1) ) { i16diagexa(in1,size[0],size[1],in2,out); } else { if(in2 != 0) {i16diagina(in1,size[0],size[1],in2,out);} else { (size[0] == 1) ? i16diagins(in1,size[1],out) : i16diagins(in1,size[0],out); };} + +#define i162d0diagi160(in1,size,in2) i16diagexs(in1,size[0],size[1],in2) + + + +#endif /* !__INT_DIAG_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_dist.h b/src/c/matrixOperations/interfaces/int_dist.h new file mode 100644 index 0000000..36809c7 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_dist.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_DIST_H__ +#define __INT_DIST_H__ + +#define s0s0dists0(in1,in2) sdists(in1,in2) + +#define d0d0distd0(in1,in2) ddists(in1,in2) + +#define c0c0dists0(in1,in2) cdists(in1,in2) + +#define z0z0distd0(in1,in2) zdists(in1,in2) + +#define s2s2dists0(in1,size1,in2,size2) sdista(in1, in2, size1[0], size2[1]) + +#define d2d2distd0(in1,size1,in2,size2) ddista(in1, in2, size1[0], size2[1]) + +#define c2c2dists0(in1,size1,in2,size2) cdista(in1, in2, size1[0], size2[1]) + +#define z2z2distd0(in1,size1,in2,size2) zdista(in1, in2, size1[0], size2[1]) + +#endif /* !__INT_DIST_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_expm.h b/src/c/matrixOperations/interfaces/int_expm.h new file mode 100644 index 0000000..6e54fb3 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_expm.h @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_EXPM_H__ +#define __INT_EXPM_H__ + +#define s2expms2(in,size,out) sexpma(in, out, size[0]) + +#define d2expmd2(in,size,out) dexpma(in, out, size[0]) + +#define c2expmc2(in,size,out) cexpma(in, out, size[0]) + +#define z2expmz2(in,size,out) zexpma(in, out, size[0]) + +#endif /* !__INT_EXPM_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_eye.h b/src/c/matrixOperations/interfaces/int_eye.h new file mode 100644 index 0000000..1e10eb8 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_eye.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_EYE_H__ +#define __INT_EYE_H__ + + +#define eyes0() 1.0f + +#define eyed0() 1 + +#define eyeu80() (uint8)1 + +#define eyei80() (int8)1 + +#define eyeu160() (uint16)1 + +#define eyei160() (int16)1 + +#define s0eyes0(in) seyes(in) + +#define d0eyed0(in) deyes(in) + +#define c0eyec0(in) ceyes(in) + +#define z0eyez0(in) zeyes(in) + +#define u80eyeu80(in) u8eyes(in) + +#define i80eyei80(in) i8eyes(in) + +#define u160eyeu160(in) u16eyes(in) + +#define i160eyei160(in) i16eyes(in) + +#define s0s0eyes0(in1,in2) 1.0f + +#define d0d0eyed0(in,in2) 1 + +#define u80u80eyeu80(in1,in2) (uint8)1 + +#define i80i80eyei80(in1,in2) (int8)1 + +#define u160u160eyeu160(in1,in2) (uint16)1 + +#define i160i160eyei160(in1,in2) (int16)1 + +#define s0s0eyes2(in1,in2,out) seyea(out, in1, in2) + +#define d0d0eyed2(in1,in2,out) deyea(out, in1, in2) + +#define u80u80eyeu82(in1,in2,out) u8eyea(out, in1, in2) + +#define i80i80eyei82(in1,in2,out) i8eyea(out, in1, in2) + +#define u160u160eyeu162(in1,in2,out) u16eyea(out, in1, in2) + +#define i160i160eyei162(in1,in2,out) i16eyea(out, in1, in2) + +#define s2eyes2(in,size,out) seyea(out, size[0], size[1]) + +#define d2eyed2(in,size,out) deyea(out, size[0], size[1]) + +#define c2eyec2(in,size,out) ceyea(out, size[0], size[1]) + +#define z2eyez2(in,size,out) zeyea(out, size[0], size[1]) + +#define u82eyeu82(in,size,out) u8eyea(out, size[0], size[1]) + +#define i82eyei82(in,size,out) i8eyea(out, size[0], size[1]) + +#define u162eyeu162(in,size,out) u16eyea(out, size[0], size[1]) + +#define i162eyei162(in,size,out) i16eyea(out, size[0], size[1]) + + +#endif /* !__INT_EYE_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_fill.h b/src/c/matrixOperations/interfaces/int_fill.h new file mode 100644 index 0000000..5614cb1 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_fill.h @@ -0,0 +1,51 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_FILL_H__ +#define __INT_FILL_H__ + + +#define fills0(in) in; + +#define filld0(in) in; + +#define fillc0(in) in; + +#define fillz0(in) in; + +#define s0fills0(in,out) out=in; + +#define d0filld0(in,out) out=in; + +#define c0fillc0(in,out) out=in; + +#define z0fillz0(in,out) out=in; + +#define s2s0fills2(in1,size,in2,out) sfilla(out,size[0],size[1],in2); + +#define d2d0filld2(in1,size,in2,out) dfilla(out,size[0],size[1],in2); + +#define c2c0fillc2(in1,size,in2,out) cfilla(out,size[0],size[1],in2); + +#define z2z0fillz2(in1,size,in2,out) zfilla(out,size[0],size[1],in2); + +#define s0s0s0fills2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#define d0d0d0filld2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#define s0s0c0fillc2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#define d0d0z0fillz2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#endif /* !__INT_FILL_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_flipdim.h b/src/c/matrixOperations/interfaces/int_flipdim.h new file mode 100644 index 0000000..0c27181 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_flipdim.h @@ -0,0 +1,109 @@ +/* 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 +*/ + +#ifndef __INT_FLIPDIM_H__ +#define __INT_FLIPDIM_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0flipdimd0(in1, in2) in1 +#define s0s0flipdims0(in1, in2) in1 +#define u80u80flipdimu80(in1, in2) in1 +#define i80i80flipdimi80(in1, in2) in1 +#define u160u160flipdimu160(in1, in2) in1 +#define i160i160flipdimi160(in1, in2) in1 +#define u80d0flipdimu80(in1, in2) in1 +#define i80d0flipdimi80(in1, in2) in1 +#define u160d0flipdimu160(in1, in2) in1 +#define i160d0flipdimi160(in1, in2) in1 + +#define d0d0d0flipdimd0(in1, in2, in3) in1 +#define s0s0s0flipdims0(in1, in2, in3) in1 +#define u80u80u80flipdimu80(in1, in2, in3) in1 +#define i80i80i80flipdimi80(in1, in2, in3) in1 +#define u160u160u160flipdimu160(in1, in2, in3) in1 +#define i160i160i160flipdimi160(in1, in2, in3) in1 +#define u80d0d0flipdimu80(in1, in2, in3) in1 +#define i80d0d0flipdimi80(in1, in2, in3) in1 +#define u160d0d0flipdimu160(in1, in2, in3) in1 +#define i160d0d0flipdimi160(in1, in2, in3) in1 + + +#define d2d0flipdimd2(in1, size1, in2, out) dflipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define s2s0flipdims2(in1, size1, in2, out) sflipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u82u80flipdimu82(in1, size1, in2, out) u8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i82i80flipdimi82(in1, size1, in2, out) i8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u162u160flipdimu162(in1, size1, in2, out) u16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i162i160flipdimi162(in1, size1, in2, out) i16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u82d0flipdimu82(in1, size1, in2, out) u8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i82d0flipdimi82(in1, size1, in2, out) i8flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define u162d0flipdimu162(in1, size1, in2, out) u16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define i162d0flipdimi162(in1, size1, in2, out) i16flipdima (in1, size1[0], size1[1], \ + in2, 1, out); + +#define d2d0d0flipdimd2(in1, size1, in2, in3, out) dflipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define s2s0s0flipdims2(in1, size1, in2, in3, out) sflipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u82u80u80flipdimu82(in1, size1, in2, in3, out) u8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i82i80i80flipdimi82(in1, size1, in2, in3, out) i8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u162u160u160flipdimu162(in1, size1, in2, in3, out) u16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i162i160i160flipdimi162(in1, size1, in2, in3, out) i16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u82d0d0flipdimu82(in1, size1, in2, in3, out) u8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i82d0d0flipdimi82(in1, size1, in2, in3, out) i8flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define u162d0d0flipdimu162(in1, size1, in2, in3, out) u16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + +#define i162d0d0flipdimi162(in1, size1, in2, in3, out) i16flipdima(in1, size1[0], size1[1], \ + in2, in3, out); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_FLIPDIM_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_invert.h b/src/c/matrixOperations/interfaces/int_invert.h new file mode 100644 index 0000000..285a0f4 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_invert.h @@ -0,0 +1,50 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_INV_H__ +#define __INT_INV_H__ + +#define s0invs0(in) 1.0f/in + +#define d0invd0(in) 1.0/in + +#define c0invc0(in) crdivs(FloatComplex(1,0),in) + +#define z0invz0(in) zrdivs(DoubleComplex(1,0),in) + +#define u80invs0(in) 1.0f/(float)in + +#define i80invs0(in) 1.0f/(float)in + +#define u160invs0(in) 1.0f/(float)in + +#define i160invs0(in) 1.0f/(float)in + +#define s2invs2(in,size,out) sinverma(in, out, size[0]) + +#define d2invd2(in,size,out) dinverma(in, out, size[0]) + +#define c2invc2(in,size,out) cinverma(in, out, size[0]) + +#define z2invz2(in,size,out) zinverma(in, out, size[0]) + +#define u82invs2(in,size,out) u8inverma(in, out, size[0]) + +#define i82invs2(in,size,out) i8inverma(in, out, size[0]) + +#define u162invs2(in,size,out) u16inverma(in, out, size[0]) + +#define i162invs2(in,size,out) i16inverma(in, out, size[0]) + +#endif /* !__INT_INV_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_kron.h b/src/c/matrixOperations/interfaces/int_kron.h new file mode 100644 index 0000000..a6fbaab --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_kron.h @@ -0,0 +1,43 @@ +/* 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 +*/ + +#ifndef __INT_KRON_H__ +#define __INT_KRON_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0d0krond0(in1, in2) in1*in2 +#define s0s0krons0(in1, in2) in1*in2 + +#define d0d2krond2(in1, in2, size2, out) {int i; \ + for(i=0;i < size2[0]*size2[1];i++) out[i] = in2[i]*in1;} +#define s0s2krons2(in1, in2, size2, out) {int i; \ + for(i=0;i < size2[0]*size2[1];i++) out[i] = in2[i]*in1;} + +#define d2d0krond2(in1, size1, in2, out) {int i; \ + for(i=0;i < size1[0]*size1[1];i++) out[i] = in1[i]*in2;} +#define s2s0krons2(in1, in2, size2, out) {int i; \ + for(i=0;i < size2[0]*size2[1];i++) out[i] = in2[i]*in1;} + +#define d2d2krond2(in1, size1, in2, size2, out) dkrona(in1, size1[0], size1[1], \ + in2, size2[0], size2[1], out); +#define s2s2krons2(in1, size1, in2, size2, out) skrona(in1, size1[0], size1[1], \ + in2, size2[0], size2[1], out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_KRON_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_norm.h b/src/c/matrixOperations/interfaces/int_norm.h new file mode 100644 index 0000000..a42a675 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_norm.h @@ -0,0 +1,53 @@ + /* 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 + */ + +#ifndef __INT_NORM_H__ +#define __INT_NORM_H__ + +#include "statMax.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0normd0(in) in +#define s0norms0(in) in + +#define d2normd0(in,size,out) ((size[0] == 1) || (size[1]==1))? \ + dnormv(in, size[0]*size[1], 2): \ + dnorma(in, size[0], size[1], 2) + +#define s2norms0(in,size,out) ((size[0] == 1) || (size[1]==1))? \ + snormv(in, size[0]*size[1], 2): \ + snorma(in, size[0], size[1], 2) + +#define d2d0normd0(in,size,norm) ((size[0] == 1) || (size[1]==1))? \ + dnormv(in,size[0]*size[1],norm) : \ + dnorma(in,size[0],size[1],norm) + +#define s2s0norms0(in,size,norm) ((size[0] == 1) || (size[1]==1))? \ + snormv(in,size[0]*size[1],norm) : \ + snorma(in,size[0],size[1],norm) + +#define d2g2normd0(in,size,norm,normsize) ((size[0] == 1) || (size[1]==1))? \ + (norm[0]=='i') ? dmaxa(in,size[0]*size[1]) : dnormv(in,size[0]*size[1],2) : \ + (norm[0]=='i') ? dnorma(in,size[0],size[1],3) : dnorma(in,size[0],size[1],4) + +#define s2g2norms0(in,size,norm,normsize) ((size[0] == 1) || (size[1]==1))? \ + (norm[0]=='i') ? smaxa(in,size[0]*size[1]) : snormv(in,size[0]*size[1],2) : \ + (norm[0]=='i') ? snorma(in,size[0],size[1],3) : snorma(in,size[0],size[1],4) + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_NORM_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_ones.h b/src/c/matrixOperations/interfaces/int_ones.h new file mode 100644 index 0000000..e266ee5 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_ones.h @@ -0,0 +1,87 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_ONES_H__ +#define __INT_ONES_H__ + + +#define oness0() 1.0f + +#define onesd0() 1 + +#define onesu80() (uint8)1 + +#define onesi80() (int8)1 + +#define onesu160() (uint16)1 + +#define onesi160() (int16)1 + +#define s0oness0(in) soness(in) + +#define d0onesd0(in) doness(in) + +#define c0onesc0(in) coness(in) + +#define z0onesz0(in) zoness(in) + +#define u80onesu80(in) u8oness(in) + +#define i80onesi80(in) i8oness(in) + +#define u160onesu160(in) u16oness(in) + +#define i160onesi160(in) i16oness(in) + +#define s0s0oness0(in1,in2) 1.0f + +#define d0d0onesd0(in,in2) 1 + +#define u80u80onesu80(in1,in2) (uint8)1 + +#define i80i80onesi80(in1,in2) (int8)1 + +#define u160u160onesu160(in1,in2) (uint16)1 + +#define i160i160onesi160(in1,in2) (int16)1 + +#define s0s0oness2(in1,in2,out) sonesa(out, in1, in2) + +#define d0d0onesd2(in1,in2,out) donesa(out, in1, in2) + +#define u80u80onesu82(in1,in2,out) u8onesa(out, in1, in2) + +#define i80i80onesi82(in1,in2,out) i8onesa(out, in1, in2) + +#define u160u160onesu162(in1,in2,out) u16onesa(out, in1, in2) + +#define i160i160onesi162(in1,in2,out) i16onesa(out, in1, in2) + +#define s2oness2(in,size,out) sonesa(out, size[0], size[1]) + +#define d2onesd2(in,size,out) donesa(out, size[0], size[1]) + +#define c2onesc2(in,size,out) conesa(out, size[0], size[1]) + +#define z2onesz2(in,size,out) zonesa(out, size[0], size[1]) + +#define u82onesu82(in,size,out) u8onesa(out, size[0], size[1]) + +#define i82onesi82(in,size,out) i8onesa(out, size[0], size[1]) + +#define u162onesu162(in,size,out) u16onesa(out, size[0], size[1]) + +#define i162onesi162(in,size,out) i16onesa(out, size[0], size[1]) + +#endif /* !__INT_ONES_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_permute.h b/src/c/matrixOperations/interfaces/int_permute.h new file mode 100644 index 0000000..66049ac --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_permute.h @@ -0,0 +1,28 @@ +/* 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 +*/ + +#ifndef __INT_PERMUTE_H__ +#define __INT_PERMUTE_H__ + + +#ifdef __cplusplus +#extern "C" { +#endif + +#define d2d2permuted2(in1, size1, in2, size2, out) (if(in2[0]==1)?in1: \ + dtransposea(in1, size1[0],size1[1],out)) + +#ifdef __cplusplus +#} /* extern "C" */ +#endif + +#endif /*__INT_FLIPDIM_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_spec.h b/src/c/matrixOperations/interfaces/int_spec.h new file mode 100644 index 0000000..77ab55e --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_spec.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_SPEC_H__ +#define __INT_SPEC_H__ + +/* Only eigenvalues */ + +#define s0specc0(in) FloatComplex (sspecs(in) , 0) + +#define d0specz0(in) DoubleComplex ( dspecs(in) , 0) + +#define c0specc0(in) cspecs(in) + +#define z0specz0(in) zspecs(in) + +#define s2specc2(in,size,out) {float* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(float)));\ + szerosa(ZEROS,size[0],size[0]);\ + cspeca(FloatComplexMatrix(in,ZEROS,size[0]*size[0]), size[0], out);\ + } + +#define d2specz2(in,size,out) {double* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(double)));\ + dzerosa(ZEROS,size[0],size[0]);\ + zspeca(DoubleComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out);\ + } + +#define c2specc2(in,size,out) cspeca(in, size[0], out) + +#define z2specz2(in,size,out) zspeca(in, size[0], out) + +/* Eigenvalues and eigenvectors */ + +#define s0specc0c0(in,out) cspec2s(FloatComplex( in,0) ,out) + +#define d0specz0z0(in,out) zspec2s(DoubleComplex(in,0) ,out) + +#define c0specc0c0(in,out) cspec2s(in,out) + +#define z0specz0z0(in,out) zspec2s(in,out) + +#define s2specc2c2(in,size,out1,out2) {float* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(float)));\ + szerosa(ZEROS,size[0],size[0]);\ + cspec2a(FloatComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out1 , out2 );\ + } + +#define d2specz2z2(in,size,out1,out2) {double* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(double)));\ + dzerosa(ZEROS,size[0],size[0]);\ + zspec2a(DoubleComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out1 , out2 );\ + } + + +#define c2specc2c2(in,size,out1,out2) cspec2a(in, size[0], out2, out1) + +#define z2specz2z2(in,size,out1,out2) zspec2a(in, size[0], out2, out1) + +#endif /* !__INT_SPEC_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_trace.h b/src/c/matrixOperations/interfaces/int_trace.h new file mode 100644 index 0000000..58c4299 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_trace.h @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TRACE_H__ +#define __INT_TRACE_H__ + +#define s0traces0(in) in + +#define d0traced0(in) in + +#define c0tracec0(in) in + +#define u80traceu80(in) (uint8)in + +#define u160traceu160(in) (uint16)in + +#define i80tracei80(in) (int8)in + +#define i160tracei160(in) (int16)in + +#define s2traces0(in,size) stracea(in, size[0]) + +#define d2traced0(in,size) dtracea(in, size[0]) + +#define c2tracec0(in,size) ctracea(in, size[0]) + +#define z2tracez0(in,size) ztracea(in, size[0]) + +#define u82traceu80(in,size) u8tracea(in, size[0]) + +#define u162traceu160(in,size) u16tracea(in, size[0]) + +#define i82tracei80(in,size) i8tracea(in, size[0]) + +#define i162tracei160(in,size) i16trace(in,size[0]) + +#endif /* !__INT_TRACE_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_transpose.h b/src/c/matrixOperations/interfaces/int_transpose.h new file mode 100644 index 0000000..3fd328f --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_transpose.h @@ -0,0 +1,51 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TRANSPOSE_H__ +#define __INT_TRANSPOSE_H__ + +#define s0transposes0(in) in + +#define d0transposed0(in) in + +#define c0transposec0(in) in + +#define z0transposez0(in) in + +#define u80transposeu80(in) (uint8)in + +#define u160transposeu160(in) (uint16)in + +#define i80transposei80(in) (int8)in + +#define i160transposei160(in) (int16)in + +#define s2transposes2(in,size,out) stransposea(in, size[0], size[1], out) + +#define d2transposed2(in,size,out) dtransposea(in, size[0], size[1], out) + +#define c2transposec2(in,size,out) ctransposea(in, size[0], size[1], out) + +#define z2transposez2(in,size,out) ztransposea(in, size[0], size[1], out) + + +#define u82transposeu82(in,size,out) u8transposea(in, size[0], size[1], out) + +#define u162transposeu162(in,size,out) u16transposea(in, size[0], size[1], out) + +#define i82transposei82(in,size,out) i8transposea(in, size[0], size[1], out) + +#define i162transposei162(in,size,out) i16transposea(in, size[0], size[1], out) + +#endif /* !__INT_TRANSPOSE_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_tril.h b/src/c/matrixOperations/interfaces/int_tril.h new file mode 100644 index 0000000..6d69451 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_tril.h @@ -0,0 +1,62 @@ +/* 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 +*/ + +#ifndef __INT_TRIL_H__ +#define __INT_TRIL_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0trild0(in) in +#define s0trils0(in) in +#define u80trilu80(in) in +#define u160trilu160(in) in +#define i80trili80(in) in +#define i160trili160(in) in + +#define d0d0trild0(in1, in2) (in2 == 0 ? in1 : 0) +#define s0s0trils0(in1, in2) (in2 == 0 ? in1 : 0) +#define u80u80trilu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80i80trili80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160u160trilu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160i160trili160(in1, in2) (in2 == 0 ? in1 : 0) +#define u80d0trilu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80d0trili80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160d0trilu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160d0trili160(in1, in2) (in2 == 0 ? in1 : 0) + +#define d2trild2(in, size, out) dtrila(in, size[0], size[1], 0, out); +#define s2trils2(in, size, out) strila(in, size[0], size[1], 0, out); +#define u82trilu82(in, size, out) u8trila(in, size[0], size[1], 0, out); +#define u162trilu162(in, size, out) u16trila(in, size[0], size[1], 0, out); +#define i82trili82(in, size, out) i8trila(in, size[0], size[1], 0, out); +#define i162trili162(in, size, out) i16trila(in, size[0], size[1], 0, out); + +#define d2d0trild2(in1, size1, in2, out) dtrila(in1, size1[0], size1[1], in2, out); +#define s2s0trils2(in1, size1, in2, out) strila(in1, size1[0], size1[1], in2, out); +#define u82u80trilu82(in1, size1, in2, out) u8trila(in1, size1[0], size1[1], (double)in2, out); +#define i82i80trili82(in1, size1, in2, out) i8trila(in1, size1[0], size1[1], (double)in2, out); +#define u162u160trilu162(in1, size1, in2, out) u16trila(in1, size1[0], size1[1], (double)in2, out); +#define i162i160trili162(in1, size1, in2, out) i16trila(in1, size1[0], size1[1], (double)in2, out); +#define u82d0trilu82(in1, size1, in2, out) u8trila(in1, size1[0], size1[1], in2, out); +#define i82d0trili82(in1, size1, in2, out) i8trila(in1, size1[0], size1[1], in2, out); +#define u162d0trilu162(in1, size1, in2, out) u16trila(in1, size1[0], size1[1], in2, out); +#define i162d0trili162(in1, size1, in2, out) i16trila(in1, size1[0], size1[1], in2, out); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_TRIL_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_triu.h b/src/c/matrixOperations/interfaces/int_triu.h new file mode 100644 index 0000000..1aef311 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_triu.h @@ -0,0 +1,62 @@ +/* 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 +*/ + +#ifndef __INT_TRIU_H__ +#define __INT_TRIU_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +#define d0triud0(in) in +#define s0trius0(in) in +#define u80triuu80(in) in +#define u160triuu160(in) in +#define i80triui80(in) in +#define i160triui160(in) in + +#define d0d0triud0(in1, in2) (in2 == 0 ? in1 : 0) +#define s0s0trius0(in1, in2) (in2 == 0 ? in1 : 0) +#define u80u80triuu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80i80triui80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160u160triuu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160i160triui160(in1, in2) (in2 == 0 ? in1 : 0) +#define u80d0triuu80(in1, in2) (in2 == 0 ? in1 : 0) +#define i80d0triui80(in1, in2) (in2 == 0 ? in1 : 0) +#define u160d0triuu160(in1, in2) (in2 == 0 ? in1 : 0) +#define i160d0triui160(in1, in2) (in2 == 0 ? in1 : 0) + +#define d2triud2(in, size, out) dtriua(in, size[0], size[1], 0, out); +#define s2trius2(in, size, out) striua(in, size[0], size[1], 0, out); +#define u82triuu82(in, size, out) u8triua(in, size[0], size[1], 0, out); +#define u162triuu162(in, size, out) u16triua(in, size[0], size[1], 0, out); +#define i82triui82(in, size, out) i8triua(in, size[0], size[1], 0, out); +#define i162triui162(in, size, out) i16triua(in, size[0], size[1], 0, out); + +#define d2d0triud2(in1, size1, in2, out) dtriua(in1, size1[0], size1[1], in2, out); +#define s2s0trius2(in1, size1, in2, out) striua(in1, size1[0], size1[1], in2, out); +#define u82u80triuu82(in1, size1, in2, out) u8triua(in1, size1[0], size1[1], (double)in2, out); +#define i82i80triui82(in1, size1, in2, out) i8triua(in1, size1[0], size1[1], (double)in2, out); +#define u162u160triuu162(in1, size1, in2, out) u16triua(in1, size1[0], size1[1], (double)in2, out); +#define i162i160triui162(in1, size1, in2, out) i16triua(in1, size1[0], size1[1], (double)in2, out); +#define u82d0triuu82(in1, size1, in2, out) u8triua(in1, size1[0], size1[1], in2, out); +#define i82d0triui82(in1, size1, in2, out) i8triua(in1, size1[0], size1[1], in2, out); +#define u162d0triuu162(in1, size1, in2, out) u16triua(in1, size1[0], size1[1], in2, out); +#define i162d0triui162(in1, size1, in2, out) i16triua(in1, size1[0], size1[1], in2, out); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__INT_TRIU_H__*/ diff --git a/src/c/matrixOperations/interfaces/int_v2magn.h b/src/c/matrixOperations/interfaces/int_v2magn.h new file mode 100644 index 0000000..759cecf --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_v2magn.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_V2MAGN_H__ +#define __INT_V2MAGN_H__ + +#define s0v2magns0(in) ssquMagns(in) + +#define d0v2magnd0(in) dsquMagns(in) + +#define c0v2magnc0(in) csquMagns(in) + +#define z0v2magnz0(in) zsquMagns(in) + +#define s2v2magns2(in,size) ssquMagna(in, size[0], size[1]) + +#define d2v2magnd2(in,size) dsquMagna(in, size[0], size[1]) + +#define c2v2magnc2(in,size) csquMagna(in, size[0], size[1]) + +#define z2v2magnz2(in,size) zsquMagna(in, size[0], size[1]) + +#endif /* !__INT_V2MAGN_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_vmagn.h b/src/c/matrixOperations/interfaces/int_vmagn.h new file mode 100644 index 0000000..a8647aa --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_vmagn.h @@ -0,0 +1,51 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_VMAGN_H__ +#define __INT_VMAGN_H__ + + +#define s0vmagns0(in) smagns(in) + +#define d0vmagnd0(in) dmagns(in) + +#define c0vmagnc0(in) cmagns(in) + +#define z0vmagnz0(in) zmagns(in) + +#define u80vmagnu80(in) u8magns(in) + +#define u160vmagnu160(in) u16magns(in) + +#define i80vmagni80(in) i8magns(in) + +#define i160vmagni160(in) i16magns(in) + +#define s2vmagns2(in,size) smagna(in, size[0], size[1]) + +#define d2vmagnd2(in,size) dmagna(in, size[0], size[1]) + +#define c2vmagnc2(in,size) cmagna(in, size[0], size[1]) + +#define z2vmagnz2(in,size) zmagna(in, size[0], size[1]) + +#define u82vmagnu82(in,size) u8magna(in, size[0], size[1]) + +#define u162vmagnu162(in,size) u16magna(in, size[0], size[1]) + +#define i82vmagni82(in,size) i8magna(in, size[0], size[1]) + +#define i162vmagni162(in,size) i16magna(in, size[0], size[1]) + +#endif /* !__INT_VMAGN_H__ */ diff --git a/src/c/matrixOperations/interfaces/int_zeros.h b/src/c/matrixOperations/interfaces/int_zeros.h new file mode 100644 index 0000000..ac7e020 --- /dev/null +++ b/src/c/matrixOperations/interfaces/int_zeros.h @@ -0,0 +1,89 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_ZEROS_H__ +#define __INT_ZEROS_H__ + + +#define zeross0() 0.0f + +#define zerosd0() 0 + +#define zerosu80() (uint8)0 + +#define zerosi80() (int8)0 + +#define zerosu160() (uint16)0 + +#define zerosi160() (int16)0 + +#define s0zeross0(in) szeross(in) + +#define d0zerosd0(in) dzeross(in) + +#define c0zerosc0(in) czeross(in) + +#define z0zerosz0(in) zzeross(in) + +#define u80zerosu80(in) u8zeross(in) + +#define i80zerosi80(in) i8zeross(in) + +#define u160zerosu160(in) u16zeross(in) + +#define i160zerosi160(in) i16zeross(in) + +#define s0s0zeross0(in1,in2) 0.0f + +#define d0d0zerosd0(in1,in2) 0 + +#define u80u80zerosu80(in1,in2) (uint8)0 + +#define i80i80zerosi80(in1,in2) (int8)0 + +#define u160u160zerosu160(in1,in2) (uint16)0 + +#define i160i160zerosi160(in1,in2) (int16)0 + +#define s0s0zeross2(in1,in2,out) szerosa(out, in1, in2) + +#define d0d0zerosd2(in1,in2,out) dzerosa(out, in1, in2) + +#define u80u80zerosu82(in1,in2,out) u8zerosa(out, in1, in2) + +#define i80i80zerosi82(in1,in2,out) i8zerosa(out, in1, in2) + +#define u160u160zerosu162(in1,in2,out) u16zerosa(out, in1, in2) + +#define i160i160zerosi162(in1,in2,out) i16zerosa(out, in1, in2) + +#define s2zeross2(in,size,out) szerosa(out, size[0], size[1]) + +#define d2zerosd2(in,size,out) dzerosa(out, size[0], size[1]) + +#define c2zerosc2(in,size,out) czerosa(out, size[0], size[1]) + +#define z2zerosz2(in,size,out) zzerosa(out, size[0], size[1]) + +#define u82zerosu82(in,size,out) u8zerosa(out, size[0], size[1]) + +#define i82zerosi82(in,size,out) i8zerosa(out, size[0], size[1]) + +#define u162zerosu162(in,size,out) u16zerosa(out, size[0], size[1]) + +#define i162zerosi162(in,size,out) i16zerosa(out, size[0], size[1]) + +#define d0d0d0zerosd3(in1, in2, in3, out) dzerosh(out, in1, in2, in3); +#endif /* !__INT_ZEROS_H__ */ diff --git a/src/c/matrixOperations/interfaces/interface.sh b/src/c/matrixOperations/interfaces/interface.sh new file mode 100644 index 0000000..8c7f073 --- /dev/null +++ b/src/c/matrixOperations/interfaces/interface.sh @@ -0,0 +1,6 @@ +for i in $@; do + +./generateInterfaces.pl --function-name $i --header-file int_$i.h + +done + diff --git a/src/c/matrixOperations/inversion/Makefile.am b/src/c/matrixOperations/inversion/Makefile.am new file mode 100644 index 0000000..aa5890e --- /dev/null +++ b/src/c/matrixOperations/inversion/Makefile.am @@ -0,0 +1,56 @@ +## +## 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 +## +## + +libMatrixInversion_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixInversion.la + +HEAD = ../includes/matrixInversion.h + +libMatrixInversion_la_SOURCES = $(HEAD) \ + sinverma.c \ + dinverma.c \ + cinverma.c \ + zinverma.c + +check_PROGRAMS = testMatrixInversion + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInversion.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testMatrixInversion_SOURCES = testMatrixInversion.c +testMatrixInversion_LDADD = $(check_LDADD) +testMatrixInversion_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixInversion diff --git a/src/c/matrixOperations/inversion/Makefile.in b/src/c/matrixOperations/inversion/Makefile.in new file mode 100644 index 0000000..5ce88ab --- /dev/null +++ b/src/c/matrixOperations/inversion/Makefile.in @@ -0,0 +1,731 @@ +# 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 = testMatrixInversion$(EXEEXT) +TESTS = testMatrixInversion$(EXEEXT) +subdir = src/c/matrixOperations/inversion +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) +libMatrixInversion_la_LIBADD = +am__objects_1 = +am_libMatrixInversion_la_OBJECTS = $(am__objects_1) \ + libMatrixInversion_la-sinverma.lo \ + libMatrixInversion_la-dinverma.lo \ + libMatrixInversion_la-cinverma.lo \ + libMatrixInversion_la-zinverma.lo +libMatrixInversion_la_OBJECTS = $(am_libMatrixInversion_la_OBJECTS) +libMatrixInversion_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixInversion_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixInversion_OBJECTS = \ + testMatrixInversion-testMatrixInversion.$(OBJEXT) +testMatrixInversion_OBJECTS = $(am_testMatrixInversion_OBJECTS) +testMatrixInversion_DEPENDENCIES = $(check_LDADD) +testMatrixInversion_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixInversion_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 = $(libMatrixInversion_la_SOURCES) \ + $(testMatrixInversion_SOURCES) +DIST_SOURCES = $(libMatrixInversion_la_SOURCES) \ + $(testMatrixInversion_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@ +libMatrixInversion_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixInversion.la +HEAD = ../includes/matrixInversion.h +libMatrixInversion_la_SOURCES = $(HEAD) \ + sinverma.c \ + dinverma.c \ + cinverma.c \ + zinverma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInversion.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testMatrixInversion_SOURCES = testMatrixInversion.c +testMatrixInversion_LDADD = $(check_LDADD) +testMatrixInversion_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/inversion/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/inversion/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 +libMatrixInversion.la: $(libMatrixInversion_la_OBJECTS) $(libMatrixInversion_la_DEPENDENCIES) + $(libMatrixInversion_la_LINK) -rpath $(pkglibdir) $(libMatrixInversion_la_OBJECTS) $(libMatrixInversion_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 +testMatrixInversion$(EXEEXT): $(testMatrixInversion_OBJECTS) $(testMatrixInversion_DEPENDENCIES) + @rm -f testMatrixInversion$(EXEEXT) + $(testMatrixInversion_LINK) $(testMatrixInversion_OBJECTS) $(testMatrixInversion_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-cinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-dinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-sinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-zinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixInversion-testMatrixInversion.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 $@ $< + +libMatrixInversion_la-sinverma.lo: sinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-sinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-sinverma.Tpo -c -o libMatrixInversion_la-sinverma.lo `test -f 'sinverma.c' || echo '$(srcdir)/'`sinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-sinverma.Tpo $(DEPDIR)/libMatrixInversion_la-sinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sinverma.c' object='libMatrixInversion_la-sinverma.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) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-sinverma.lo `test -f 'sinverma.c' || echo '$(srcdir)/'`sinverma.c + +libMatrixInversion_la-dinverma.lo: dinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-dinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-dinverma.Tpo -c -o libMatrixInversion_la-dinverma.lo `test -f 'dinverma.c' || echo '$(srcdir)/'`dinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-dinverma.Tpo $(DEPDIR)/libMatrixInversion_la-dinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dinverma.c' object='libMatrixInversion_la-dinverma.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) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-dinverma.lo `test -f 'dinverma.c' || echo '$(srcdir)/'`dinverma.c + +libMatrixInversion_la-cinverma.lo: cinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-cinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-cinverma.Tpo -c -o libMatrixInversion_la-cinverma.lo `test -f 'cinverma.c' || echo '$(srcdir)/'`cinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-cinverma.Tpo $(DEPDIR)/libMatrixInversion_la-cinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cinverma.c' object='libMatrixInversion_la-cinverma.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) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-cinverma.lo `test -f 'cinverma.c' || echo '$(srcdir)/'`cinverma.c + +libMatrixInversion_la-zinverma.lo: zinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-zinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-zinverma.Tpo -c -o libMatrixInversion_la-zinverma.lo `test -f 'zinverma.c' || echo '$(srcdir)/'`zinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-zinverma.Tpo $(DEPDIR)/libMatrixInversion_la-zinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zinverma.c' object='libMatrixInversion_la-zinverma.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) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-zinverma.lo `test -f 'zinverma.c' || echo '$(srcdir)/'`zinverma.c + +testMatrixInversion-testMatrixInversion.o: testMatrixInversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -MT testMatrixInversion-testMatrixInversion.o -MD -MP -MF $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo -c -o testMatrixInversion-testMatrixInversion.o `test -f 'testMatrixInversion.c' || echo '$(srcdir)/'`testMatrixInversion.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo $(DEPDIR)/testMatrixInversion-testMatrixInversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInversion.c' object='testMatrixInversion-testMatrixInversion.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) $(testMatrixInversion_CFLAGS) $(CFLAGS) -c -o testMatrixInversion-testMatrixInversion.o `test -f 'testMatrixInversion.c' || echo '$(srcdir)/'`testMatrixInversion.c + +testMatrixInversion-testMatrixInversion.obj: testMatrixInversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -MT testMatrixInversion-testMatrixInversion.obj -MD -MP -MF $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo -c -o testMatrixInversion-testMatrixInversion.obj `if test -f 'testMatrixInversion.c'; then $(CYGPATH_W) 'testMatrixInversion.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInversion.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo $(DEPDIR)/testMatrixInversion-testMatrixInversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInversion.c' object='testMatrixInversion-testMatrixInversion.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) $(testMatrixInversion_CFLAGS) $(CFLAGS) -c -o testMatrixInversion-testMatrixInversion.obj `if test -f 'testMatrixInversion.c'; then $(CYGPATH_W) 'testMatrixInversion.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInversion.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/inversion/cinverma.c b/src/c/matrixOperations/inversion/cinverma.c new file mode 100644 index 0000000..069fb39 --- /dev/null +++ b/src/c/matrixOperations/inversion/cinverma.c @@ -0,0 +1,53 @@ +/* + * 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 +#include "matrixInversion.h" +#include "lapack.h" + +void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = DoubleComplex ( (double) creals( in[i]) , (double) cimags ( in[i])) ; + } + + zinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/src/c/matrixOperations/inversion/dinverma.c b/src/c/matrixOperations/inversion/dinverma.c new file mode 100644 index 0000000..91130f3 --- /dev/null +++ b/src/c/matrixOperations/inversion/dinverma.c @@ -0,0 +1,38 @@ +/* + * 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 +#include "matrixInversion.h" +#include "lapack.h" + +void dinverma ( double* in, double* out, int leadDimIn ) +{ + int info = 0 ; + int* vectPivot = (int*) malloc ( sizeof(int) * (unsigned int)( leadDimIn*leadDimIn) ); + double* work = (double*) malloc ( sizeof(double) * (unsigned int) (leadDimIn*leadDimIn) ); + + int i = 0 ; + + for ( i = 0 ; i < leadDimIn*leadDimIn ; i ++) + { + out[i] = in[i] ; + } + + dgetrf_ ( &leadDimIn, &leadDimIn, out, &leadDimIn, vectPivot, &info ); + dgetri_ ( &leadDimIn, out, &leadDimIn , vectPivot, work , &leadDimIn , &info ); + + free(vectPivot); + free(work); + + +} + diff --git a/src/c/matrixOperations/inversion/i16inverma.c b/src/c/matrixOperations/inversion/i16inverma.c new file mode 100644 index 0000000..0dd1850 --- /dev/null +++ b/src/c/matrixOperations/inversion/i16inverma.c @@ -0,0 +1,55 @@ +/* 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 +#include +#include "matrixInversion.h" +#include "lapack.h" + +void i16inverma ( int16* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/src/c/matrixOperations/inversion/i8inverma.c b/src/c/matrixOperations/inversion/i8inverma.c new file mode 100644 index 0000000..66c66e2 --- /dev/null +++ b/src/c/matrixOperations/inversion/i8inverma.c @@ -0,0 +1,55 @@ +/* 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 +#include +#include "matrixInversion.h" +#include "lapack.h" + +void i8inverma ( int8* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/src/c/matrixOperations/inversion/sinverma.c b/src/c/matrixOperations/inversion/sinverma.c new file mode 100644 index 0000000..f02a0e8 --- /dev/null +++ b/src/c/matrixOperations/inversion/sinverma.c @@ -0,0 +1,55 @@ +/* + * 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 +#include +#include "matrixInversion.h" +#include "lapack.h" + +void sinverma ( float* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/src/c/matrixOperations/inversion/testMatrixInversion.c b/src/c/matrixOperations/inversion/testMatrixInversion.c new file mode 100644 index 0000000..2a0e005 --- /dev/null +++ b/src/c/matrixOperations/inversion/testMatrixInversion.c @@ -0,0 +1,581 @@ +/* + * 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 "matrixInversion.h" +#include +#include +#include + +#define LEADDIM 10 + +#define SMATRIX_IN {0.56672112690284848f,0.57116389367729425f,0.81601104838773608f,0.05689279362559319f,\ + 0.55959366867318749f,0.12493403162807226f,0.72792222863063216f,0.26777664758265018f,\ + 0.54653349192813039f,0.98854076582938433f,\ +0.73956565884873271f,0.00371731072664261f,0.59005728596821427f,0.3096467358991504f,\ + 0.25522057106718421f,0.62518793903291225f,0.11574173765257001f,0.61170040909200907f,\ + 0.67839562846347690f,0.33200952783226967f,\ +0.02587099233642220f,0.51744682248681784f,0.39168732380494475f,0.24135384149849415f,\ + 0.50644348980858922f,0.42361020017415285f,0.28937275288626552f,0.08879321813583374f,\ + 0.62128817522898316f,0.34549844544380903f,\ +0.70648676296696067f,0.52114724926650524f,0.28704008506610990f,0.65027950797230005f,\ + 0.08813347620889544f,0.44987633451819420f,0.72272530803456903f,0.89767962601035833f,\ + 0.24278218811377883f,0.43377211131155491f,\ +0.96770532103255391f,0.50685344357043505f,0.52329764096066356f,0.5596947595477104f,\ + 0.56173070007935166f,0.46817600261420012f,0.77945467224344611f,0.79010718129575253f,\ + 0.98085420625284314f,0.81870661024004221f,\ +0.42568723810836673f,0.24615605548024178f,0.92295324662700295f,0.10007458087056875f,\ + 0.46782181179150939f,0.39504976756870747f,0.03661171020939946f,0.51753685344010592f,\ + 0.83254515705630183f,0.61048321425914764f,\ +0.18711117887869477f,0.01895748358219862f,0.84335647663101554f,0.07485948316752911f,\ + 0.85328151332214475f,0.01245901081711054f,0.18675393564626575f,0.49205840751528740f,\ + 0.74896081397309899f,0.94149570073932409f,\ +0.21240556007251143f,0.57950199581682682f,0.26281475694850087f,0.43609866220504045f,\ + 0.91105451015755534f,0.80826673656702042f,0.81026530498638749f,0.25904283951967955f,\ + 0.41390872886404395f,0.35999277792870998f,\ +0.69127879338338971f,0.76568587962538004f,0.35726496530696750f,0.76933998242020607f,\ + 0.54776339093223214f,0.09622887428849936f,0.95611717319115996f,0.22074085660278797f,\ + 0.01432593585923314f,0.81914897728711367f,\ +0.13049928424879909f,0.96820035576820374f,0.6561381467618048f,0.24455389659851789f,\ + 0.52831235667690635f,0.84689256362617016f,0.78766220854595304f,0.12620826158672571f,\ + 0.78838609857484698f,0.34530424699187279f} + +#define SMATRIX_TEST {-0.52918209318099763f,-1.4122060840199684f,-2.81447731203224061f,-1.55267562705322471f,\ + 1.7795249093271313f,3.41331242497436538f,-1.88904543501184552f,1.12197724430279377f,\ + 0.72267367241531266f,-0.34793324767314804f,\ +-0.04291642356311276f,-3.42251783874691506f,0.02468613395048536f,0.08908661449574046f,\ + 0.97788374996171823f,4.61261377725807620f,-2.59399616857143833f,1.20317500146072143f,\ + -0.02166245003208622f,-1.3267013649317376f,\ +-2.67087412768695565f,-0.22033432555244847f,-5.29579931307827412f,-1.14315667195430248f,\ + 0.09168583909366912f,1.5851803683202144f,1.66558750370151065f,-0.86555486622239652f,\ + 1.8195567574793376f,3.61754347340892135f,\ +-1.89697408392725020f,1.8626200864938904f,0.79417407448685418f,-0.05121347333860876f,\ + -0.58894433303940863f,-2.25150397211694164f,1.83391219779456915f,-1.71612581802446540f,\ + 1.573412079629398f,1.342726670155854f,\ +-2.25362434223770558f,-3.27855988666729736f,-4.38426363396032048f,-1.74427000048068570f,\ + 2.03129249683994884f,4.82780099711724908f,-0.73809777439724900f,2.2509436506925824f,\ + 0.94584198058114821f,0.25243671945739055f,\ +3.84378244490602494f,3.72355620392145159f,6.53582696174593814f,1.94952916234761564f,\ + -3.13395988068588593f,-4.02699662712894213f,-0.76253598522946087f,0.23575927310254180f,\ + -1.8359327702678865f,-2.83401823371425543f,\ +-1.18180799907519307f,0.63788382527496235f,-3.78074265572599399f,-0.54137361290359209f,\ + 0.70395890323932231f,-2.37398893454907611f,2.2701087812490388f,-0.86112335471809098f,\ + 0.47829335155324559f,3.33447092282135671f,\ +-0.74596393761410851f,-2.37451784604461391f,-1.71445760029220273f,1.04267932396181950f,\ + 0.72418115460071419f,2.59078382027510390f,-0.24977554095572621f,1.00522161428916723f,\ + -0.63851725590828357f,-0.32538135452852734f,\ +-1.03321944290699186f,0.06105622131119152f,-0.23434658474553238f,-0.78361018751135569f,\ + 1.52101204019895975f,-0.98475391631291920f,0.82324943504312742f,-1.09543520381998416f,\ + -0.06310749918170644f,1.29987814669920709f,\ +6.08715177443300171f,4.38684491456130132f,10.9588676689371631f,3.07570017972914656f,\ + -3.9362327692213568f,-6.43408376602510224f,-0.44360914322700107f,-0.86171558904483270f,\ + -2.44206676099519093f,-4.96806164188692279f} + +#define DMATRIX_IN {0.56672112690284848,0.57116389367729425,0.81601104838773608,0.05689279362559319,\ + 0.55959366867318749,0.12493403162807226,0.72792222863063216,0.26777664758265018,\ + 0.54653349192813039,0.98854076582938433,\ +0.73956565884873271,0.00371731072664261,0.59005728596821427,0.3096467358991504,\ + 0.25522057106718421,0.62518793903291225,0.11574173765257001,0.61170040909200907,\ + 0.67839562846347690,0.33200952783226967,\ +0.02587099233642220,0.51744682248681784,0.39168732380494475,0.24135384149849415,\ + 0.50644348980858922,0.42361020017415285,0.28937275288626552,0.08879321813583374,\ + 0.62128817522898316,0.34549844544380903,\ +0.70648676296696067,0.52114724926650524,0.28704008506610990,0.65027950797230005,\ + 0.08813347620889544,0.44987633451819420,0.72272530803456903,0.89767962601035833,\ + 0.24278218811377883,0.43377211131155491,\ +0.96770532103255391,0.50685344357043505,0.52329764096066356,0.5596947595477104,\ + 0.56173070007935166,0.46817600261420012,0.77945467224344611,0.79010718129575253,\ + 0.98085420625284314,0.81870661024004221,\ +0.42568723810836673,0.24615605548024178,0.92295324662700295,0.10007458087056875,\ + 0.46782181179150939,0.39504976756870747,0.03661171020939946,0.51753685344010592,\ + 0.83254515705630183,0.61048321425914764,\ +0.18711117887869477,0.01895748358219862,0.84335647663101554,0.07485948316752911,\ + 0.85328151332214475,0.01245901081711054,0.18675393564626575,0.49205840751528740,\ + 0.74896081397309899,0.94149570073932409,\ +0.21240556007251143,0.57950199581682682,0.26281475694850087,0.43609866220504045,\ + 0.91105451015755534,0.80826673656702042,0.81026530498638749,0.25904283951967955,\ + 0.41390872886404395,0.35999277792870998,\ +0.69127879338338971,0.76568587962538004,0.35726496530696750,0.76933998242020607,\ + 0.54776339093223214,0.09622887428849936,0.95611717319115996,0.22074085660278797,\ + 0.01432593585923314,0.81914897728711367,\ +0.13049928424879909,0.96820035576820374,0.6561381467618048,0.24455389659851789,\ + 0.52831235667690635,0.84689256362617016,0.78766220854595304,0.12620826158672571,\ + 0.78838609857484698,0.34530424699187279} + +#define DMATRIX_TEST {-0.52918209318099763,-1.4122060840199684,-2.81447731203224061,-1.55267562705322471,\ + 1.7795249093271313,3.41331242497436538,-1.88904543501184552,1.12197724430279377,\ + 0.72267367241531266,-0.34793324767314804,\ +-0.04291642356311276,-3.42251783874691506,0.02468613395048536,0.08908661449574046,\ + 0.97788374996171823,4.61261377725807620,-2.59399616857143833,1.20317500146072143,\ + -0.02166245003208622,-1.3267013649317376,\ +-2.67087412768695565,-0.22033432555244847,-5.29579931307827412,-1.14315667195430248,\ + 0.09168583909366912,1.5851803683202144,1.66558750370151065,-0.86555486622239652,\ + 1.8195567574793376,3.61754347340892135,\ +-1.89697408392725020,1.8626200864938904,0.79417407448685418,-0.05121347333860876,\ + -0.58894433303940863,-2.25150397211694164,1.83391219779456915,-1.71612581802446540,\ + 1.573412079629398,1.342726670155854,\ +-2.25362434223770558,-3.27855988666729736,-4.38426363396032048,-1.74427000048068570,\ + 2.03129249683994884,4.82780099711724908,-0.73809777439724900,2.2509436506925824,\ + 0.94584198058114821,0.25243671945739055,\ +3.84378244490602494,3.72355620392145159,6.53582696174593814,1.94952916234761564,\ + -3.13395988068588593,-4.02699662712894213,-0.76253598522946087,0.23575927310254180,\ + -1.8359327702678865,-2.83401823371425543,\ +-1.18180799907519307,0.63788382527496235,-3.78074265572599399,-0.54137361290359209,\ + 0.70395890323932231,-2.37398893454907611,2.2701087812490388,-0.86112335471809098,\ + 0.47829335155324559,3.33447092282135671,\ +-0.74596393761410851,-2.37451784604461391,-1.71445760029220273,1.04267932396181950,\ + 0.72418115460071419,2.59078382027510390,-0.24977554095572621,1.00522161428916723,\ + -0.63851725590828357,-0.32538135452852734,\ +-1.03321944290699186,0.06105622131119152,-0.23434658474553238,-0.78361018751135569,\ + 1.52101204019895975,-0.98475391631291920,0.82324943504312742,-1.09543520381998416,\ + -0.06310749918170644,1.29987814669920709,\ +6.08715177443300171,4.38684491456130132,10.9588676689371631,3.07570017972914656,\ + -3.9362327692213568,-6.43408376602510224,-0.44360914322700107,-0.86171558904483270,\ + -2.44206676099519093,-4.96806164188692279} + +#define CRMATRIX_IN {0.56672112690284848f,0.57116389367729425f,0.81601104838773608f,0.05689279362559319f,\ + 0.55959366867318749f,0.12493403162807226f,0.72792222863063216f,0.26777664758265018f,\ + 0.54653349192813039f,0.98854076582938433f,\ +0.73956565884873271f,0.00371731072664261f,0.59005728596821427f,0.3096467358991504f,\ + 0.25522057106718421f,0.62518793903291225f,0.11574173765257001f,0.61170040909200907f,\ + 0.67839562846347690f,0.33200952783226967f,\ +0.02587099233642220f,0.51744682248681784f,0.39168732380494475f,0.24135384149849415f,\ + 0.50644348980858922f,0.42361020017415285f,0.28937275288626552f,0.08879321813583374f,\ + 0.62128817522898316f,0.34549844544380903f,\ +0.70648676296696067f,0.52114724926650524f,0.28704008506610990f,0.65027950797230005f,\ + 0.08813347620889544f,0.44987633451819420f,0.72272530803456903f,0.89767962601035833f,\ + 0.24278218811377883f,0.43377211131155491f,\ +0.96770532103255391f,0.50685344357043505f,0.52329764096066356f,0.5596947595477104f,\ + 0.56173070007935166f,0.46817600261420012f,0.77945467224344611f,0.79010718129575253f,\ + 0.98085420625284314f,0.81870661024004221f,\ +0.42568723810836673f,0.24615605548024178f,0.92295324662700295f,0.10007458087056875f,\ + 0.46782181179150939f,0.39504976756870747f,0.03661171020939946f,0.51753685344010592f,\ + 0.83254515705630183f,0.61048321425914764f,\ +0.18711117887869477f,0.01895748358219862f,0.84335647663101554f,0.07485948316752911f,\ + 0.85328151332214475f,0.01245901081711054f,0.18675393564626575f,0.49205840751528740f,\ + 0.74896081397309899f,0.94149570073932409f,\ +0.21240556007251143f,0.57950199581682682f,0.26281475694850087f,0.43609866220504045f,\ + 0.91105451015755534f,0.80826673656702042f,0.81026530498638749f,0.25904283951967955f,\ + 0.41390872886404395f,0.35999277792870998f,\ +0.69127879338338971f,0.76568587962538004f,0.35726496530696750f,0.76933998242020607f,\ + 0.54776339093223214f,0.09622887428849936f,0.95611717319115996f,0.22074085660278797f,\ + 0.01432593585923314f,0.81914897728711367f,\ +0.13049928424879909f,0.96820035576820374f,0.6561381467618048f,0.24455389659851789f,\ + 0.52831235667690635f,0.84689256362617016f,0.78766220854595304f,0.12620826158672571f,\ + 0.78838609857484698f,0.34530424699187279f} + +#define CIMATRIX_IN {0.26598573336377740f,0.12025266280397773f,0.90711546363309026f,0.41329363686963916f,\ + 0.33616027468815446f,0.20337020372971892f,0.31845858739688993f,0.04173615900799632f,\ + 0.00291663268581033f,0.92589621385559440f,\ +0.97098186518996954f,0.82874121330678463f,0.33601493109017611f,0.14022908732295036f,\ + 0.53368766140192747f,0.30119446106255054f,0.57618944440037012f,0.34382718056440353f,\ + 0.89934705849736929f,0.09938172809779644f,\ +0.88752476638182998f,0.31610729591920972f,0.11756130633875728f,0.49523561308160424f,\ + 0.20390639593824744f,0.27625959040597081f,0.42549022240564227f,0.1970167332328856f,\ + 0.83879271661862731f,0.42805786477401853f,\ +0.20667528547346592f,0.53051907662302256f,0.92537237703800201f,0.41948772873729467f,\ + 0.15899897180497646f,0.29445307422429323f,0.97619816288352013f,0.21228986512869596f,\ + 0.43437494523823261f,0.94318309519439936f,\ +0.85251609655097127f,0.57151748193427920f,0.72636712575331330f,0.86262222891673446f,\ + 0.01818151073530316f,0.57180739520117640f,0.25189600000157952f,0.31403985014185309f,\ + 0.77678761305287480f,0.03273952705785632f,\ +0.67446978110820055f,0.04780154302716255f,0.90094979386776686f,0.28575096465647221f,\ + 0.40983706060796976f,0.21417701244354248f,0.43911290075629950f,0.78216253779828548f,\ + 0.13953176606446505f,0.92132670804858208f,\ +0.91528743831440806f,0.82486197212710977f,0.39489932497963309f,0.25121363671496511f,\ + 0.01058345986530185f,0.68954616272822022f,0.07593036955222487f,0.05409323470667005f,\ + 0.11506372271105647f,0.94490244099870324f,\ +0.02848597615957260f,0.5798843121156096f,0.56551797501742840f,0.33891015965491533f,\ + 0.19653097167611122f,0.58555728476494551f,0.25593801774084568f,0.91902069095522165f,\ + 0.53554199635982513f,0.900706990621984f,\ +0.23678414756432176f,0.27918082987889647f,0.70614896761253476f,0.39219759730622172f,\ + 0.27255953708663583f,0.42041230341419578f,0.06706167431548238f,0.46035157097503543f,\ + 0.43117330456152558f,0.80943161016330123f,\ +0.70153435599058867f,0.95451109297573566f,0.67878311965614557f,0.46815521270036697f,\ + 0.34376550372689962f,0.42775720171630383f,0.76511315722018480f,0.29926850274205208f,\ + 0.61453847866505384f,0.02519542910158634f} + +#define CRMATRIX_RESULT {1.13334136062879454f,1.00204710284162091f,-0.36268445209785111f,0.44135219666801256f,\ + -0.28889550886983612f,-0.83933700493692454f,0.02619582683916769f,-0.03686600548096228f,\ + -0.3105979269805872f,-0.41314497983816856f,\ +-1.35807279244359291f,-0.95351719301170645f,0.24508427491574258f,-0.29038757219777517f,\ + 0.37390577835866062f,1.1835902691419622f,-0.05725271188164360f,-0.45507733751420543f,\ + 0.89349083196709700f,0.22599186865989143f,\ +0.04475841273073522f,0.65452526617183937f,-0.45264724847008608f,1.48730985056287901f,\ + -0.62424039568072809f,-0.07013705727696817f,0.66279285096827567f,-0.49314454581179629f,\ + -0.75846179749076570f,0.03847068162421585f,\ +-0.28834686632766587f,-0.12621821344664338f,0.66167042153468991f,-0.30750952923310820f,\ + -0.38799028698820520f,-0.06244610332663336f,-0.16699468178690519f,-0.25703548004808097f,\ + 1.05027930016160997f,0.31201179786307248f,\ +3.09851038226275932f,0.68543010150986716f,0.67201299485007393f,-1.36595464827487545f,\ + -0.97056467795873491f,-2.43637154663396904f,-0.44698290573897426f,0.25335968244039719f,\ + 0.52656196888052886f,0.8186504936893056f,\ +1.61532430192389009f,0.61052036715893920f,0.37049911672435160f,-0.89240571480272601f,\ + -0.10120030002332725f,-0.89781867625900547f,-0.69692694811392220f,1.15675538992405480f,\ + -0.60391534256305657f,-0.22021828342698485f,\ +-0.3741129583278592f,-0.04777966095669883f,-0.71234429260192467f,0.67967568250401755f,\ + 0.25551727122371526f,-0.21501817490214456f,0.33990052672394827f,0.26217278721004078f,\ + -0.62229775428125067f,0.12867275098729825f,\ +-1.29410590757942501f,-0.90500447621878899f,-0.02669409932542677f,-0.65737384875432148f,\ + 1.06680350537307067f,1.0309312701659521f,-0.17448425396711695f,0.10358425160515741f,\ + 0.48518012284543799f,-0.12380980760248197f,\ +-1.74148559631895505f,-0.80563620794306168f,0.09831541569063014f,0.29858001971458137f,\ + 0.71315790168444038f,1.51589578494898358f,0.26752178758245609f,-0.07814488857312252f,\ + -0.33226019516643074f,-0.25594588429781640f,\ +-0.55157638336116810f,-0.32553554473562663f,0.18945085905693287f,-0.49018398019943904f,\ + 0.22032383413091419f,0.80929284051108974f,-0.26930477901947342f,0.01565276572275408f,\ + 0.50897245662655299f,-0.2000796589321248f} + +#define CIMATRIX_RESULT {-0.72071682835421724f,-0.27956750077582515f,-0.12213482023956473f,0.66199681493358187f,\ + 0.19294748584842841f,0.71511499705121806f,-0.07262892107788382f,0.16934235088255833f,\ + -0.28481834522168847f,-0.4356262417043216f,\ +0.89322305892893428f,-0.47480723687179577f,0.74313808566553685f,-0.47801173363000360f,\ + 0.13877492668810687f,-0.24397029588270253f,-0.56410605487977428f,0.13174383488792796f,\ + -0.11275208753659083f,-0.02853860897251614f,\ +-2.35574562422712885f,-0.66252937112300103f,0.41163350762074485f,0.21189678704881354f,\ + 0.57210153384651341f,1.59871861336304111f,0.24013928122080053f,0.1908634439410304f,\ + 0.04233444329438218f,-0.74974593479018292f,\ +0.21852271998327827f,0.46641793006923571f,-0.50775725878230649f,0.36932403849454087f,\ + -0.97035140329820424f,-0.59905481375287661f,0.47057866052210873f,-0.27484558236611223f,\ + 0.14983776443256616f,0.65314738162484509f,\ +1.21784046668363755f,0.89544041489161419f,-0.55385999040744260f,2.3960585010456512f,\ + -1.08813967734866801f,-1.76566044616615891f,1.01831164014477937f,-0.39749297613335716f,\ + -1.42421433146953369f,0.1681331405197976f,\ +1.2139424005771302f,1.25657353572343178f,-0.00767306183273730f,0.23949549471191356f,\ + -0.93651648982768132f,-0.892557290343648f,-0.31803824197434533f,-0.30269705651930523f,\ + 0.06480270543120303f,0.04863444130781940f,\ +-0.4833117651305104f,0.0427206592410736f,-0.32334126501314669f,-0.77563551313076551f,\ + 0.77531171370204577f,0.4186703610529936f,0.06140053814127502f,0.40102788900264252f,\ + 0.23384530409440230f,-0.64994440926481989f,\ +1.96328712223105617f,0.26113952707794202f,0.7924550400337056f,-0.65512478202793500f,\ + -0.18012047754401772f,-1.54644464183129848f,-0.24103692367484025f,0.06994604293168416f,\ + -0.14071021436989639f,0.02396061029170871f,\ +-0.38634718234016863f,-0.79360643330422442f,-0.24953759611467596f,-1.18124389108964234f,\ + 0.36517943778230522f,0.69540420551183901f,-0.15267947346137922f,0.23673803504827576f,\ + 0.58370191145957184f,0.41325242999322420f,\ +0.27463944706760368f,-0.07374243215114486f,-0.23939703640616677f,-0.68898202198243763f,\ + 0.18544512532830235f,-0.26697093307764330f,-0.38327334858322648f,-0.29893133575699177f,\ + 0.40729781218472505f,0.82660964787147106f} + + + +#define ZRMATRIX_IN {0.56672112690284848,0.57116389367729425,0.81601104838773608,0.05689279362559319,\ + 0.55959366867318749,0.12493403162807226,0.72792222863063216,0.26777664758265018,\ + 0.54653349192813039,0.98854076582938433,\ +0.73956565884873271,0.00371731072664261,0.59005728596821427,0.3096467358991504,\ + 0.25522057106718421,0.62518793903291225,0.11574173765257001,0.61170040909200907,\ + 0.67839562846347690,0.33200952783226967,\ +0.02587099233642220,0.51744682248681784,0.39168732380494475,0.24135384149849415,\ + 0.50644348980858922,0.42361020017415285,0.28937275288626552,0.08879321813583374,\ + 0.62128817522898316,0.34549844544380903,\ +0.70648676296696067,0.52114724926650524,0.28704008506610990,0.65027950797230005,\ + 0.08813347620889544,0.44987633451819420,0.72272530803456903,0.89767962601035833,\ + 0.24278218811377883,0.43377211131155491,\ +0.96770532103255391,0.50685344357043505,0.52329764096066356,0.5596947595477104,\ + 0.56173070007935166,0.46817600261420012,0.77945467224344611,0.79010718129575253,\ + 0.98085420625284314,0.81870661024004221,\ +0.42568723810836673,0.24615605548024178,0.92295324662700295,0.10007458087056875,\ + 0.46782181179150939,0.39504976756870747,0.03661171020939946,0.51753685344010592,\ + 0.83254515705630183,0.61048321425914764,\ +0.18711117887869477,0.01895748358219862,0.84335647663101554,0.07485948316752911,\ + 0.85328151332214475,0.01245901081711054,0.18675393564626575,0.49205840751528740,\ + 0.74896081397309899,0.94149570073932409,\ +0.21240556007251143,0.57950199581682682,0.26281475694850087,0.43609866220504045,\ + 0.91105451015755534,0.80826673656702042,0.81026530498638749,0.25904283951967955,\ + 0.41390872886404395,0.35999277792870998,\ +0.69127879338338971,0.76568587962538004,0.35726496530696750,0.76933998242020607,\ + 0.54776339093223214,0.09622887428849936,0.95611717319115996,0.22074085660278797,\ + 0.01432593585923314,0.81914897728711367,\ +0.13049928424879909,0.96820035576820374,0.6561381467618048,0.24455389659851789,\ + 0.52831235667690635,0.84689256362617016,0.78766220854595304,0.12620826158672571,\ + 0.78838609857484698,0.34530424699187279} + +#define ZIMATRIX_IN {0.26598573336377740,0.12025266280397773,0.90711546363309026,0.41329363686963916,\ + 0.33616027468815446,0.20337020372971892,0.31845858739688993,0.04173615900799632,\ + 0.00291663268581033,0.92589621385559440,\ +0.97098186518996954,0.82874121330678463,0.33601493109017611,0.14022908732295036,\ + 0.53368766140192747,0.30119446106255054,0.57618944440037012,0.34382718056440353,\ + 0.89934705849736929,0.09938172809779644,\ +0.88752476638182998,0.31610729591920972,0.11756130633875728,0.49523561308160424,\ + 0.20390639593824744,0.27625959040597081,0.42549022240564227,0.1970167332328856,\ + 0.83879271661862731,0.42805786477401853,\ +0.20667528547346592,0.53051907662302256,0.92537237703800201,0.41948772873729467,\ + 0.15899897180497646,0.29445307422429323,0.97619816288352013,0.21228986512869596,\ + 0.43437494523823261,0.94318309519439936,\ +0.85251609655097127,0.57151748193427920,0.72636712575331330,0.86262222891673446,\ + 0.01818151073530316,0.57180739520117640,0.25189600000157952,0.31403985014185309,\ + 0.77678761305287480,0.03273952705785632,\ +0.67446978110820055,0.04780154302716255,0.90094979386776686,0.28575096465647221,\ + 0.40983706060796976,0.21417701244354248,0.43911290075629950,0.78216253779828548,\ + 0.13953176606446505,0.92132670804858208,\ +0.91528743831440806,0.82486197212710977,0.39489932497963309,0.25121363671496511,\ + 0.01058345986530185,0.68954616272822022,0.07593036955222487,0.05409323470667005,\ + 0.11506372271105647,0.94490244099870324,\ +0.02848597615957260,0.5798843121156096,0.56551797501742840,0.33891015965491533,\ + 0.19653097167611122,0.58555728476494551,0.25593801774084568,0.91902069095522165,\ + 0.53554199635982513,0.900706990621984,\ +0.23678414756432176,0.27918082987889647,0.70614896761253476,0.39219759730622172,\ + 0.27255953708663583,0.42041230341419578,0.06706167431548238,0.46035157097503543,\ + 0.43117330456152558,0.80943161016330123,\ +0.70153435599058867,0.95451109297573566,0.67878311965614557,0.46815521270036697,\ + 0.34376550372689962,0.42775720171630383,0.76511315722018480,0.29926850274205208,\ + 0.61453847866505384,0.02519542910158634} + +#define ZRMATRIX_RESULT {1.13334136062879454,1.00204710284162091,-0.36268445209785111,0.44135219666801256,\ + -0.28889550886983612,-0.83933700493692454,0.02619582683916769,-0.03686600548096228,\ + -0.3105979269805872,-0.41314497983816856,\ +-1.35807279244359291,-0.95351719301170645,0.24508427491574258,-0.29038757219777517,\ + 0.37390577835866062,1.1835902691419622,-0.05725271188164360,-0.45507733751420543,\ + 0.89349083196709700,0.22599186865989143,\ +0.04475841273073522,0.65452526617183937,-0.45264724847008608,1.48730985056287901,\ + -0.62424039568072809,-0.07013705727696817,0.66279285096827567,-0.49314454581179629,\ + -0.75846179749076570,0.03847068162421585,\ +-0.28834686632766587,-0.12621821344664338,0.66167042153468991,-0.30750952923310820,\ + -0.38799028698820520,-0.06244610332663336,-0.16699468178690519,-0.25703548004808097,\ + 1.05027930016160997,0.31201179786307248,\ +3.09851038226275932,0.68543010150986716,0.67201299485007393,-1.36595464827487545,\ + -0.97056467795873491,-2.43637154663396904,-0.44698290573897426,0.25335968244039719,\ + 0.52656196888052886,0.8186504936893056,\ +1.61532430192389009,0.61052036715893920,0.37049911672435160,-0.89240571480272601,\ + -0.10120030002332725,-0.89781867625900547,-0.69692694811392220,1.15675538992405480,\ + -0.60391534256305657,-0.22021828342698485,\ +-0.3741129583278592,-0.04777966095669883,-0.71234429260192467,0.67967568250401755,\ + 0.25551727122371526,-0.21501817490214456,0.33990052672394827,0.26217278721004078,\ + -0.62229775428125067,0.12867275098729825,\ +-1.29410590757942501,-0.90500447621878899,-0.02669409932542677,-0.65737384875432148,\ + 1.06680350537307067,1.0309312701659521,-0.17448425396711695,0.10358425160515741,\ + 0.48518012284543799,-0.12380980760248197,\ +-1.74148559631895505,-0.80563620794306168,0.09831541569063014,0.29858001971458137,\ + 0.71315790168444038,1.51589578494898358,0.26752178758245609,-0.07814488857312252,\ + -0.33226019516643074,-0.25594588429781640,\ +-0.55157638336116810,-0.32553554473562663,0.18945085905693287,-0.49018398019943904,\ + 0.22032383413091419,0.80929284051108974,-0.26930477901947342,0.01565276572275408,\ + 0.50897245662655299,-0.2000796589321248} + +#define ZIMATRIX_RESULT {-0.72071682835421724,-0.27956750077582515,-0.12213482023956473,0.66199681493358187,\ + 0.19294748584842841,0.71511499705121806,-0.07262892107788382,0.16934235088255833,\ + -0.28481834522168847,-0.4356262417043216,\ +0.89322305892893428,-0.47480723687179577,0.74313808566553685,-0.47801173363000360,\ + 0.13877492668810687,-0.24397029588270253,-0.56410605487977428,0.13174383488792796,\ + -0.11275208753659083,-0.02853860897251614,\ +-2.35574562422712885,-0.66252937112300103,0.41163350762074485,0.21189678704881354,\ + 0.57210153384651341,1.59871861336304111,0.24013928122080053,0.1908634439410304,\ + 0.04233444329438218,-0.74974593479018292,\ +0.21852271998327827,0.46641793006923571,-0.50775725878230649,0.36932403849454087,\ + -0.97035140329820424,-0.59905481375287661,0.47057866052210873,-0.27484558236611223,\ + 0.14983776443256616,0.65314738162484509,\ +1.21784046668363755,0.89544041489161419,-0.55385999040744260,2.3960585010456512,\ + -1.08813967734866801,-1.76566044616615891,1.01831164014477937,-0.39749297613335716,\ + -1.42421433146953369,0.1681331405197976,\ +1.2139424005771302,1.25657353572343178,-0.00767306183273730,0.23949549471191356,\ + -0.93651648982768132,-0.892557290343648,-0.31803824197434533,-0.30269705651930523,\ + 0.06480270543120303,0.04863444130781940,\ +-0.4833117651305104,0.0427206592410736,-0.32334126501314669,-0.77563551313076551,\ + 0.77531171370204577,0.4186703610529936,0.06140053814127502,0.40102788900264252,\ + 0.23384530409440230,-0.64994440926481989,\ +1.96328712223105617,0.26113952707794202,0.7924550400337056,-0.65512478202793500,\ + -0.18012047754401772,-1.54644464183129848,-0.24103692367484025,0.06994604293168416,\ + -0.14071021436989639,0.02396061029170871,\ +-0.38634718234016863,-0.79360643330422442,-0.24953759611467596,-1.18124389108964234,\ + 0.36517943778230522,0.69540420551183901,-0.15267947346137922,0.23673803504827576,\ + 0.58370191145957184,0.41325242999322420,\ +0.27463944706760368,-0.07374243215114486,-0.23939703640616677,-0.68898202198243763,\ + 0.18544512532830235,-0.26697093307764330,-0.38327334858322648,-0.29893133575699177,\ + 0.40729781218472505,0.82660964787147106} + + +static void sinvermaTest (void) +{ + int i ; + + float in[] = SMATRIX_IN ; + + float result[] = SMATRIX_TEST ; + + float out[LEADDIM*LEADDIM]; + + + sinverma (in, out, LEADDIM); + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-4 ) ; + } + + + +} + +static void dinvermaTest (void) +{ + int i ; + + double in[] = DMATRIX_IN ; + + double result[] = DMATRIX_TEST ; + + double out[LEADDIM*LEADDIM]; + + + dinverma (in, out, LEADDIM); + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-14 ) ; + } + + + +} + +static void cinvermaTest (void) +{ + int i = 0 ; + + float tRealIn [] = CRMATRIX_IN ; + float tImagIn [] = CIMATRIX_IN ; + + + + float tRealResult [] = CRMATRIX_RESULT ; + float tImagResult [] = CIMATRIX_RESULT ; + + floatComplex out[LEADDIM*LEADDIM ] ; + + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + + cinverma( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t +%e\t * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-6 && creals (Result[i]) < 1e-6 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-5 ); + + + if ( cimags(out[i]) < 1e-6 && cimags (Result[i]) < 1e-6 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-5) ; + + } +} + + +static void zinvermaTest (void) +{ + int i = 0 ; + + double tRealIn [] = ZRMATRIX_IN ; + double tImagIn [] = ZIMATRIX_IN ; + + + + double tRealResult [] = ZRMATRIX_RESULT ; + double tImagResult [] = ZIMATRIX_RESULT ; + + doubleComplex out[LEADDIM*LEADDIM ] ; + + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + + zinverma( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t +%e\t * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-13 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-13 ) ; + + } +} + +static void mytest (void ){ + double in1[16] = { 1 , 5 , 9 ,13 , + 2 , 6 , 10 , 14 , + 3 , 7 , 11 , 15 , + 4 , 8 , 12 , 16 } ; + + double out[16] = { 0 } ; + + int i = 0 ; + + dinverma ( in1 , out , 4 ); + + for ( i = 0 ; i <16; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + +static int testMatrixInversion(void) { + + printf("\n\n\n\t>>> MY TEST Tests\n"); + mytest () ; + + + printf("\n>>>> Matrix Inversion Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dinvermaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sinvermaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cinvermaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zinvermaTest(); + + return 0; +} + + + +int main(void) { + + assert(testMatrixInversion() == 0); + return 0; +} + diff --git a/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj b/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj new file mode 100644 index 0000000..e874edf --- /dev/null +++ b/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {44D3EFB8-A861-41C4-BBCD-18470FA0D5AC} + testMatrixInversion + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters b/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters new file mode 100644 index 0000000..8daf0ce --- /dev/null +++ b/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/inversion/u16inverma.c b/src/c/matrixOperations/inversion/u16inverma.c new file mode 100644 index 0000000..917c9af --- /dev/null +++ b/src/c/matrixOperations/inversion/u16inverma.c @@ -0,0 +1,55 @@ +/* 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 +#include +#include "matrixInversion.h" +#include "lapack.h" + +void u16inverma ( uint16* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/src/c/matrixOperations/inversion/u8inverma.c b/src/c/matrixOperations/inversion/u8inverma.c new file mode 100644 index 0000000..2fab659 --- /dev/null +++ b/src/c/matrixOperations/inversion/u8inverma.c @@ -0,0 +1,55 @@ +/* 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 +#include +#include "matrixInversion.h" +#include "lapack.h" + +void u8inverma ( uint8* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/src/c/matrixOperations/inversion/zinverma.c b/src/c/matrixOperations/inversion/zinverma.c new file mode 100644 index 0000000..7948445 --- /dev/null +++ b/src/c/matrixOperations/inversion/zinverma.c @@ -0,0 +1,36 @@ +/* + * 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 +#include "matrixInversion.h" +#include "lapack.h" + +void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ) +{ + int info = 0 ; + int* vectPivot = (int*) malloc ( sizeof(int) * (unsigned int)( leadDimIn) ); + doubleComplex* work = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (leadDimIn*leadDimIn) ); + + int i = 0 ; + + for ( i = 0 ; i < leadDimIn*leadDimIn ; i ++) + { + out[i] = in[i] ; + } + + zgetrf_ ( &leadDimIn, &leadDimIn, out, &leadDimIn, vectPivot, &info ); + zgetri_ ( &leadDimIn, out, &leadDimIn , vectPivot, work , &leadDimIn , &info ); + + free(vectPivot); + free(work); +} + diff --git a/src/c/matrixOperations/jmat/Makefile.am b/src/c/matrixOperations/jmat/Makefile.am new file mode 100644 index 0000000..08afef5 --- /dev/null +++ b/src/c/matrixOperations/jmat/Makefile.am @@ -0,0 +1,35 @@ +## +## 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 +## +## + +libJmat_la_CFLAGS= -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libJmat.la + +HEAD = ../includes/jmat.h + +libJmat_la_SOURCES = $(HEAD) \ + sjmata.c \ + djmata.c + +check_PROGRAMS = testJmat + +check_LDADD = libJmat.la + +check_INCLUDES = -I $(top_builddir)/src/c/matrixOperations/includes + +testJmat_SOURCES = testJmat.c +testJmat_LDADD = $(check_LDADD) +testJmat_CFLAGS = $(check_INCLUDES) + +TESTS = testJmat diff --git a/src/c/matrixOperations/jmat/Makefile.in b/src/c/matrixOperations/jmat/Makefile.in new file mode 100644 index 0000000..e883117 --- /dev/null +++ b/src/c/matrixOperations/jmat/Makefile.in @@ -0,0 +1,684 @@ +# 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 = testJmat$(EXEEXT) +TESTS = testJmat$(EXEEXT) +subdir = src/c/matrixOperations/jmat +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) +libJmat_la_LIBADD = +am__objects_1 = +am_libJmat_la_OBJECTS = $(am__objects_1) libJmat_la-sjmata.lo \ + libJmat_la-djmata.lo +libJmat_la_OBJECTS = $(am_libJmat_la_OBJECTS) +libJmat_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libJmat_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testJmat_OBJECTS = testJmat-testJmat.$(OBJEXT) +testJmat_OBJECTS = $(am_testJmat_OBJECTS) +testJmat_DEPENDENCIES = $(check_LDADD) +testJmat_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testJmat_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 = $(libJmat_la_SOURCES) $(testJmat_SOURCES) +DIST_SOURCES = $(libJmat_la_SOURCES) $(testJmat_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@ +libJmat_la_CFLAGS = -I $(top_builddir)/src/c/matrixOperations/includes +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libJmat.la +HEAD = ../includes/jmat.h +libJmat_la_SOURCES = $(HEAD) \ + sjmata.c \ + djmata.c + +check_LDADD = libJmat.la +check_INCLUDES = -I $(top_builddir)/src/c/matrixOperations/includes +testJmat_SOURCES = testJmat.c +testJmat_LDADD = $(check_LDADD) +testJmat_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/jmat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/jmat/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 +libJmat.la: $(libJmat_la_OBJECTS) $(libJmat_la_DEPENDENCIES) + $(libJmat_la_LINK) -rpath $(pkglibdir) $(libJmat_la_OBJECTS) $(libJmat_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 +testJmat$(EXEEXT): $(testJmat_OBJECTS) $(testJmat_DEPENDENCIES) + @rm -f testJmat$(EXEEXT) + $(testJmat_LINK) $(testJmat_OBJECTS) $(testJmat_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libJmat_la-djmata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libJmat_la-sjmata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testJmat-testJmat.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 $@ $< + +libJmat_la-sjmata.lo: sjmata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libJmat_la_CFLAGS) $(CFLAGS) -MT libJmat_la-sjmata.lo -MD -MP -MF $(DEPDIR)/libJmat_la-sjmata.Tpo -c -o libJmat_la-sjmata.lo `test -f 'sjmata.c' || echo '$(srcdir)/'`sjmata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libJmat_la-sjmata.Tpo $(DEPDIR)/libJmat_la-sjmata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sjmata.c' object='libJmat_la-sjmata.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) $(libJmat_la_CFLAGS) $(CFLAGS) -c -o libJmat_la-sjmata.lo `test -f 'sjmata.c' || echo '$(srcdir)/'`sjmata.c + +libJmat_la-djmata.lo: djmata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libJmat_la_CFLAGS) $(CFLAGS) -MT libJmat_la-djmata.lo -MD -MP -MF $(DEPDIR)/libJmat_la-djmata.Tpo -c -o libJmat_la-djmata.lo `test -f 'djmata.c' || echo '$(srcdir)/'`djmata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libJmat_la-djmata.Tpo $(DEPDIR)/libJmat_la-djmata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='djmata.c' object='libJmat_la-djmata.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) $(libJmat_la_CFLAGS) $(CFLAGS) -c -o libJmat_la-djmata.lo `test -f 'djmata.c' || echo '$(srcdir)/'`djmata.c + +testJmat-testJmat.o: testJmat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testJmat_CFLAGS) $(CFLAGS) -MT testJmat-testJmat.o -MD -MP -MF $(DEPDIR)/testJmat-testJmat.Tpo -c -o testJmat-testJmat.o `test -f 'testJmat.c' || echo '$(srcdir)/'`testJmat.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testJmat-testJmat.Tpo $(DEPDIR)/testJmat-testJmat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testJmat.c' object='testJmat-testJmat.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) $(testJmat_CFLAGS) $(CFLAGS) -c -o testJmat-testJmat.o `test -f 'testJmat.c' || echo '$(srcdir)/'`testJmat.c + +testJmat-testJmat.obj: testJmat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testJmat_CFLAGS) $(CFLAGS) -MT testJmat-testJmat.obj -MD -MP -MF $(DEPDIR)/testJmat-testJmat.Tpo -c -o testJmat-testJmat.obj `if test -f 'testJmat.c'; then $(CYGPATH_W) 'testJmat.c'; else $(CYGPATH_W) '$(srcdir)/testJmat.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testJmat-testJmat.Tpo $(DEPDIR)/testJmat-testJmat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testJmat.c' object='testJmat-testJmat.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) $(testJmat_CFLAGS) $(CFLAGS) -c -o testJmat-testJmat.obj `if test -f 'testJmat.c'; then $(CYGPATH_W) 'testJmat.c'; else $(CYGPATH_W) '$(srcdir)/testJmat.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/jmat/djmata.c b/src/c/matrixOperations/jmat/djmata.c new file mode 100644 index 0000000..6ccff61 --- /dev/null +++ b/src/c/matrixOperations/jmat/djmata.c @@ -0,0 +1,22 @@ +#include + +void djmata(double n, double m, double *out){ + int i,nn,mm,j; + mm=(int) m; + nn=(int) n; + + + for (i=0;i + +void sjmata(float n, float m, float *out){ + int i,nn,mm,j; + mm=(int) m; + nn=(int) n; + + + for (i=0;i +#include +#include "jmat.h" + +static void sjmataTest(void){ + +} + + +static void djmataTest(void){ + +} + + + +int main(void){ + sjmataTest(); + djmataTest(); + return 0; +} diff --git a/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj b/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj new file mode 100644 index 0000000..cd31d61 --- /dev/null +++ b/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {04980E4A-FD92-4D44-8EB6-6F643A4ED9B3} + testJmat + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters b/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters new file mode 100644 index 0000000..bb1a673 --- /dev/null +++ b/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/kron/dkrona.c b/src/c/matrixOperations/kron/dkrona.c new file mode 100644 index 0000000..31e0a52 --- /dev/null +++ b/src/c/matrixOperations/kron/dkrona.c @@ -0,0 +1,39 @@ +/* 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 +*/ + +/*Function for kroneker product of two matrices*/ + +#include "kron.h" + +void dkrona (double *in1, int row1, int col1, double *in2, int row2, \ + int col2, double *out) +{ + int row1_count, col1_count,row2_count, col2_count; + int row = row1*row2; + int temp = 0; + + for(col1_count = 0;col1_count < col1; col1_count++) + { + for(row1_count = 0;row1_count < row1; row1_count++) + { + for(col2_count = 0;col2_count < col2; col2_count++) + { + for(row2_count = 0;row2_count < row2; row2_count++) + { + temp = (col1_count*col2+col2_count)*row+(row1_count*row2+row2_count); + out[temp] = in1[col1_count*row1+row1_count]*in2[col2_count*row2+row2_count]; + } + } + } + } + +} \ No newline at end of file diff --git a/src/c/matrixOperations/kron/skrona.c b/src/c/matrixOperations/kron/skrona.c new file mode 100644 index 0000000..1e0daaf --- /dev/null +++ b/src/c/matrixOperations/kron/skrona.c @@ -0,0 +1,39 @@ +/* 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 +*/ + +/*Function for kroneker product of two matrices*/ + +#include "kron.h" + +void skrona (float *in1, int row1, int col1, float *in2, int row2, \ + int col2, float *out) +{ + int row1_count, col1_count,row2_count, col2_count; + int row = row1*row2; + int temp = 0; + + for(col1_count = 0;col1_count < col1; col1_count++) + { + for(row1_count = 0;row1_count < row1; row1_count++) + { + for(col2_count = 0;col2_count < col2; col2_count++) + { + for(row2_count = 0;row2_count < row2; row2_count++) + { + temp = (col1_count*col2+col2_count)*row+(row1_count*row2+row2_count); + out[temp] = in1[col1_count*row1+row1_count]*in2[col2_count*row2+row2_count]; + } + } + } + } + +} \ No newline at end of file diff --git a/src/c/matrixOperations/logm/Makefile.am b/src/c/matrixOperations/logm/Makefile.am new file mode 100644 index 0000000..f21ded7 --- /dev/null +++ b/src/c/matrixOperations/logm/Makefile.am @@ -0,0 +1,81 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 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 +## +## + + + + +libLogm_la_CFLAGS = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + + +pkglib_LTLIBRARIES = libLogm.la + +HEAD = ../includes/logm.h + + +libLogm_la_SOURCES = $(HEAD) \ + zlogma.c \ + clogma.c \ + slogma.c \ + dlogma.c + +############# +## CHECK ## +############# + +check_PROGRAMS = testDoubleLogm testFloatLogm + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la + + +check_INCLUDES = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleLogm_SOURCES = testDoubleLogm.c +testDoubleLogm_LDADD = $(check_LDADD) +testDoubleLogm_CFLAGS = $(check_INCLUDES) + +testFloatLogm_SOURCES = testFloatLogm.c +testFloatLogm_LDADD = $(check_LDADD) +testFloatLogm_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleLogm testFloatLogm diff --git a/src/c/matrixOperations/logm/Makefile.in b/src/c/matrixOperations/logm/Makefile.in new file mode 100644 index 0000000..d4923eb --- /dev/null +++ b/src/c/matrixOperations/logm/Makefile.in @@ -0,0 +1,763 @@ +# 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 = testDoubleLogm$(EXEEXT) testFloatLogm$(EXEEXT) +TESTS = testDoubleLogm$(EXEEXT) testFloatLogm$(EXEEXT) +subdir = src/c/matrixOperations/logm +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) +libLogm_la_LIBADD = +am__objects_1 = +am_libLogm_la_OBJECTS = $(am__objects_1) libLogm_la-zlogma.lo \ + libLogm_la-clogma.lo libLogm_la-slogma.lo libLogm_la-dlogma.lo +libLogm_la_OBJECTS = $(am_libLogm_la_OBJECTS) +libLogm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLogm_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLogm_OBJECTS = testDoubleLogm-testDoubleLogm.$(OBJEXT) +testDoubleLogm_OBJECTS = $(am_testDoubleLogm_OBJECTS) +testDoubleLogm_DEPENDENCIES = $(check_LDADD) +testDoubleLogm_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLogm_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatLogm_OBJECTS = testFloatLogm-testFloatLogm.$(OBJEXT) +testFloatLogm_OBJECTS = $(am_testFloatLogm_OBJECTS) +testFloatLogm_DEPENDENCIES = $(check_LDADD) +testFloatLogm_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLogm_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 = $(libLogm_la_SOURCES) $(testDoubleLogm_SOURCES) \ + $(testFloatLogm_SOURCES) +DIST_SOURCES = $(libLogm_la_SOURCES) $(testDoubleLogm_SOURCES) \ + $(testFloatLogm_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@ +libLogm_la_CFLAGS = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLogm.la +HEAD = ../includes/logm.h +libLogm_la_SOURCES = $(HEAD) \ + zlogma.c \ + clogma.c \ + slogma.c \ + dlogma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la + +check_INCLUDES = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleLogm_SOURCES = testDoubleLogm.c +testDoubleLogm_LDADD = $(check_LDADD) +testDoubleLogm_CFLAGS = $(check_INCLUDES) +testFloatLogm_SOURCES = testFloatLogm.c +testFloatLogm_LDADD = $(check_LDADD) +testFloatLogm_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/logm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/logm/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 +libLogm.la: $(libLogm_la_OBJECTS) $(libLogm_la_DEPENDENCIES) + $(libLogm_la_LINK) -rpath $(pkglibdir) $(libLogm_la_OBJECTS) $(libLogm_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 +testDoubleLogm$(EXEEXT): $(testDoubleLogm_OBJECTS) $(testDoubleLogm_DEPENDENCIES) + @rm -f testDoubleLogm$(EXEEXT) + $(testDoubleLogm_LINK) $(testDoubleLogm_OBJECTS) $(testDoubleLogm_LDADD) $(LIBS) +testFloatLogm$(EXEEXT): $(testFloatLogm_OBJECTS) $(testFloatLogm_DEPENDENCIES) + @rm -f testFloatLogm$(EXEEXT) + $(testFloatLogm_LINK) $(testFloatLogm_OBJECTS) $(testFloatLogm_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-clogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-dlogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-slogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-zlogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLogm-testDoubleLogm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLogm-testFloatLogm.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 $@ $< + +libLogm_la-zlogma.lo: zlogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-zlogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-zlogma.Tpo -c -o libLogm_la-zlogma.lo `test -f 'zlogma.c' || echo '$(srcdir)/'`zlogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-zlogma.Tpo $(DEPDIR)/libLogm_la-zlogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlogma.c' object='libLogm_la-zlogma.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) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-zlogma.lo `test -f 'zlogma.c' || echo '$(srcdir)/'`zlogma.c + +libLogm_la-clogma.lo: clogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-clogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-clogma.Tpo -c -o libLogm_la-clogma.lo `test -f 'clogma.c' || echo '$(srcdir)/'`clogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-clogma.Tpo $(DEPDIR)/libLogm_la-clogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clogma.c' object='libLogm_la-clogma.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) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-clogma.lo `test -f 'clogma.c' || echo '$(srcdir)/'`clogma.c + +libLogm_la-slogma.lo: slogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-slogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-slogma.Tpo -c -o libLogm_la-slogma.lo `test -f 'slogma.c' || echo '$(srcdir)/'`slogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-slogma.Tpo $(DEPDIR)/libLogm_la-slogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slogma.c' object='libLogm_la-slogma.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) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-slogma.lo `test -f 'slogma.c' || echo '$(srcdir)/'`slogma.c + +libLogm_la-dlogma.lo: dlogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-dlogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-dlogma.Tpo -c -o libLogm_la-dlogma.lo `test -f 'dlogma.c' || echo '$(srcdir)/'`dlogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-dlogma.Tpo $(DEPDIR)/libLogm_la-dlogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlogma.c' object='libLogm_la-dlogma.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) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-dlogma.lo `test -f 'dlogma.c' || echo '$(srcdir)/'`dlogma.c + +testDoubleLogm-testDoubleLogm.o: testDoubleLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLogm_CFLAGS) $(CFLAGS) -MT testDoubleLogm-testDoubleLogm.o -MD -MP -MF $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo -c -o testDoubleLogm-testDoubleLogm.o `test -f 'testDoubleLogm.c' || echo '$(srcdir)/'`testDoubleLogm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo $(DEPDIR)/testDoubleLogm-testDoubleLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLogm.c' object='testDoubleLogm-testDoubleLogm.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) $(testDoubleLogm_CFLAGS) $(CFLAGS) -c -o testDoubleLogm-testDoubleLogm.o `test -f 'testDoubleLogm.c' || echo '$(srcdir)/'`testDoubleLogm.c + +testDoubleLogm-testDoubleLogm.obj: testDoubleLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLogm_CFLAGS) $(CFLAGS) -MT testDoubleLogm-testDoubleLogm.obj -MD -MP -MF $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo -c -o testDoubleLogm-testDoubleLogm.obj `if test -f 'testDoubleLogm.c'; then $(CYGPATH_W) 'testDoubleLogm.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLogm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo $(DEPDIR)/testDoubleLogm-testDoubleLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLogm.c' object='testDoubleLogm-testDoubleLogm.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) $(testDoubleLogm_CFLAGS) $(CFLAGS) -c -o testDoubleLogm-testDoubleLogm.obj `if test -f 'testDoubleLogm.c'; then $(CYGPATH_W) 'testDoubleLogm.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLogm.c'; fi` + +testFloatLogm-testFloatLogm.o: testFloatLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLogm_CFLAGS) $(CFLAGS) -MT testFloatLogm-testFloatLogm.o -MD -MP -MF $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo -c -o testFloatLogm-testFloatLogm.o `test -f 'testFloatLogm.c' || echo '$(srcdir)/'`testFloatLogm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo $(DEPDIR)/testFloatLogm-testFloatLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLogm.c' object='testFloatLogm-testFloatLogm.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) $(testFloatLogm_CFLAGS) $(CFLAGS) -c -o testFloatLogm-testFloatLogm.o `test -f 'testFloatLogm.c' || echo '$(srcdir)/'`testFloatLogm.c + +testFloatLogm-testFloatLogm.obj: testFloatLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLogm_CFLAGS) $(CFLAGS) -MT testFloatLogm-testFloatLogm.obj -MD -MP -MF $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo -c -o testFloatLogm-testFloatLogm.obj `if test -f 'testFloatLogm.c'; then $(CYGPATH_W) 'testFloatLogm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLogm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo $(DEPDIR)/testFloatLogm-testFloatLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLogm.c' object='testFloatLogm-testFloatLogm.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) $(testFloatLogm_CFLAGS) $(CFLAGS) -c -o testFloatLogm-testFloatLogm.obj `if test -f 'testFloatLogm.c'; then $(CYGPATH_W) 'testFloatLogm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLogm.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/logm/clogma.c b/src/c/matrixOperations/logm/clogma.c new file mode 100644 index 0000000..16c1bb4 --- /dev/null +++ b/src/c/matrixOperations/logm/clogma.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "logm.h" + +void clogma (floatComplex* in, int rows, floatComplex* out){ + doubleComplex *inCopy, *outCopy; + int i=0; + + inCopy = (doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + outCopy = (doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for(i=0;i +#include "logm.h" + +void dlogma (double* in, int rows, double* out){ + doubleComplex *inCpx,*outCpx; + int i; + + inCpx=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + outCpx=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for (i=0;i +#include "logm.h" + +void slogma (float* in, int rows, float* out){ + doubleComplex *inCpx, *outCopy; + int i; + + inCpx=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + outCopy=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for (i=0;i +#include +#include +#include +#include "logm.h" + + +/* FIXME : Untested*/ + +static void dlogmaTest(void){ + int i=0; + + double in4[4] = {0.0683740368112921714783,0.5608486062847077846527, + 0.6623569373041391372681,0.7263506767340004444122 }; + double in9[9] = {0.1985143842175602912903,0.5442573162727057933807,0.2320747897028923034668, + 0.2312237196601927280426,0.2164632631465792655945,0.8833887814544141292572, + 0.6525134947150945663452,0.3076090742833912372589,0.9329616213217377662659}; + double in16[16] = {2.1460078610107302665710,3.126419968903064727783,3.6163610080257058143616,2.922266637906432151794, + 5.664248815737664699554,4.8264719732105731964111,3.3217189135029911994934,5.9350947011262178421021, + 5.0153415976092219352722,4.3685875833034515380859,2.6931248093023896217346,6.3257448654621839523315, + 4.051954015158116817474,9.1847078315913677215576,0.4373343335464596748352,4.818508932366967201233}; + double inHer[16] = {2,3,4,5,3,1,7,9,4,7,2,4,5,9,4,7}; + + double result4R[4]={- 0.8770746698483730119378,0.5288031941140065583795, + 0.6245116064569415925689,- 0.2566930821175439358939}; + + double result9R[9]={- 0.8537183024765053751537,1.9622873186332121520081,- 0.8931518563294031931577, + - 0.6983367178614473536,- 1.1199049557115796638129,1.539392415892589571769, + 1.0815849580686147657,- 0.4078285487954845245362,0.1789837218054647349774,}; + + double result16R[16]={1.4069394184534917968676,- 1.7915236034592834091228,2.3099248310776610004780,0.5320777350783232328979, + 0.6986579270151970222358,0.9874373592109859654187,0.8902400742596190408307,0.6067035092100719895214, + 0.0466142343271527676007,0.3821963653954382200695,1.129789301050062144682,1.2310339071369393870725, + 0.424502387440284123521,3.4580528009566289249221,- 2.1337657344549150195689,1.0826836628584670663145}; + + double resultHerR[16]={- 0.0707459665791660696765,0.9744491331561414559914,0.0316695005563280007621,0.9186825501429138896015, + 0.9744491331561416780360,1.9318283614573175110962,- 0.0664515082056250649956,0.3546926741474874522631, + 0.0316695005563280562733,- 0.0664515082056250649956,0.3206743709780528472919,1.82590946141052867802, + 0.9186825501429141116461,0.3546926741474875632854,1.82590946141052867802,0.9537374500729456361370}; + + + double out4[4],out9[9],out16[16],outHer[16]; + + + dlogma(in4,2,out4); + dlogma(in9,3,out9); + dlogma(in16,4,out16); + dlogma(inHer,4,outHer); + + for(i=0;i<4;i++) { + assert( (fabs(out4[i]-result4R[i]) / fabs(out4[i])) <3e-15); + } + + for(i=0;i<9;i++) { + assert( (fabs(out9[i]-result9R[i]) / fabs(out9[i])) <3e-14); + } + + for(i=0;i<16;i++) { + + assert( (fabs(out16[i]-result16R[i]) / fabs(out16[i])) <3e-14); + } + + for(i=0;i<16;i++) { + assert( (fabs(outHer[i]-resultHerR[i]) / fabs(outHer[i])) <3e-13); + } +} + + +static void zlogmaTest(void){ + int i; + + + double in4D[4] = {0.0683740368112921714783,0.5608486062847077846527, + 0.6623569373041391372681,0.7263506767340004444122 }; + double in9D[9] = {0.1985143842175602912903,0.5442573162727057933807,0.2320747897028923034668, + 0.2312237196601927280426,0.2164632631465792655945,0.8833887814544141292572, + 0.6525134947150945663452,0.3076090742833912372589,0.9329616213217377662659}; + double in16D[16] = {2.1460078610107302665710,3.126419968903064727783,3.6163610080257058143616,2.922266637906432151794, + 5.664248815737664699554,4.8264719732105731964111,3.3217189135029911994934,5.9350947011262178421021, + 5.0153415976092219352722,4.3685875833034515380859,2.6931248093023896217346,6.3257448654621839523315, + 4.051954015158116817474,9.1847078315913677215576,0.4373343335464596748352,4.818508932366967201233}; + double inHerD[16] = {2,3,4,5,3,1,7,9,4,7,2,4,5,9,4,7}; + + + double result4R[4]={- 0.8770746698483730119378,0.5288031941140065583795, + 0.6245116064569415925689,- 0.2566930821175439358939}; + double result4I[4]={2.3169161534469857599561,- 1.2719608554746495432397, + - 1.5021738258100643115256,0.8246765001428078001311}; + double result9R[9]={- 0.8537183024765053751537,1.9622873186332121520081,- 0.8931518563294031931577, + - 0.6983367178614473536,- 1.1199049557115796638129,1.539392415892589571769, + 1.0815849580686147657,- 0.4078285487954845245362,0.1789837218054647349774,}; + double result9I[9]={+ 0.0000000000000006661338,-0.0000000000000005551115,+0.0000000000000001110223, + -0.0000000000000002844947,+0.0000000000000004163336,+ 0.0000000000000008743006, + -0.0000000000000001665335,+ 0.0000000000000004996004,-0.0000000000000003330669}; + double result16R[16]={1.4069394184534917968676,- 1.7915236034592834091228,2.3099248310776610004780,0.5320777350783232328979, + 0.6986579270151970222358,0.9874373592109859654187,0.8902400742596190408307,0.6067035092100719895214, + 0.0466142343271527676007,0.3821963653954382200695,1.129789301050062144682,1.2310339071369393870725, + 0.424502387440284123521,3.4580528009566289249221,- 2.1337657344549150195689,1.0826836628584670663145}; + double result16I[16]={-1.4875734535892033427729,+ 1.8146634352088595321106,-0.0551064758054355952055,-0.8617364610492967980093, + + 1.0892397305420760122985,-1.3287434690517783142383,+ 0.0403503858667347281575,+ 0.6309857092212021179023, + + 1.3838992102024216813,-1.6881931367553519862668,+ 0.0512659110447117594145,+ 0.8016790061501579689463, + -0.6500053973791579675634,+ 0.7929296025459252605927,-0.0240791515993044047406,-0.3765416419935233571792}; + + + doubleComplex out4[4],out9[9],out16[16],outHer[16]; + doubleComplex in4[4],in9[9],in16[16],inHer[16]; + + + for(i=0;i<4;i++) in4[i]=DoubleComplex(in4D[i],0); + for(i=0;i<9;i++) in9[i]=DoubleComplex(in9D[i],0); + for(i=0;i<16;i++) in16[i]=DoubleComplex(in16D[i],0); + for(i=0;i<16;i++) inHer[i]=DoubleComplex(inHerD[i],0); + + + zlogma(in4,2,out4); + zlogma(in9,3,out9); + zlogma(in16,4,out16); + zlogma(inHer,4,outHer); + + + + + for(i=0;i<4;i++) { + assert( fabs(zreals(out4[i])-result4R[i]) / fabs(zreals(out4[i])) <3e-15); + assert( fabs(zimags(out4[i])-result4I[i]) / fabs(zimags(out4[i])) <3e-15); + } + + for(i=0;i<9;i++) { + assert( fabs(zreals(out9[i])-result9R[i]) / fabs(zreals(out9[i])) <3e-14); + if (zimags(out9[i])>3e-16) assert( fabs(zimags(out9[i])-result9I[i]) / fabs(zimags(out9[i])) <1e-16); + else assert(1); + } + + /* FIXME : sign pb with the imaginary part below : it's due to the reals eigenvalues which are + stored like that : eigenvalues + (-0)*i instead of eigenvalues + 0 *i + When we do operations with eigenvalues the sign isn't good + */ + + for(i=0;i<16;i++) { + printf("out[%d] = %f + %f *i ---result = %f + %f *i --- assert : %f + %f*i\n", + i, + zreals(out16[i]), + zimags(out16[i]), + result16R[i], + result16I[i], + fabs(zreals(out16[i])-result16R[i]) / fabs(zreals(out16[i])), + fabs(zimags(out16[i])-result16I[i]) / fabs(zimags(out16[i]))); + + assert( fabs(zreals(out16[i])-result16R[i]) / fabs(zreals(out16[i])) <3e-13); + assert( fabs(zimags(out16[i])-result16I[i]) / fabs(zimags(out16[i])) <3e-13); + } + + +} + +static int logmTest(void){ + dlogmaTest(); + zlogmaTest(); + return 0; +} + +int main (void){ + assert(logmTest()==0); + return 0; +} + + + + + + + + diff --git a/src/c/matrixOperations/logm/testFloatLogm.c b/src/c/matrixOperations/logm/testFloatLogm.c new file mode 100644 index 0000000..3ddd4b0 --- /dev/null +++ b/src/c/matrixOperations/logm/testFloatLogm.c @@ -0,0 +1,185 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include +#include "logm.h" + + +static void slogmaTest(void){ + int i=0; + + float in4[4] = {0.0683740368112921714783f,0.5608486062847077846527f, + 0.6623569373041391372681f,0.7263506767340004444122f }; + float in9[9] = {0.1985143842175602912903f,0.5442573162727057933807f,0.2320747897028923034668f, + 0.2312237196601927280426f,0.2164632631465792655945f,0.8833887814544141292572f, + 0.6525134947150945663452f,0.3076090742833912372589f,0.9329616213217377662659f}; + float in16[16] = {2.1460078610107302665710f,3.126419968903064727783f,3.6163610080257058143616f,2.922266637906432151794f, + 5.664248815737664699554f,4.8264719732105731964111f,3.3217189135029911994934f,5.9350947011262178421021f, + 5.0153415976092219352722f,4.3685875833034515380859f,2.6931248093023896217346f,6.3257448654621839523315f, + 4.051954015158116817474f,9.1847078315913677215576f,0.4373343335464596748352f,4.818508932366967201233f}; + float inHer[16] = {2.0f,3.0f,4.0f,5.0f,3.0f,1.0f,7.0f,9.0f,4.0f,7.0f,2.0f,4.0f,5.0f,9.0f,4.0f,7.0f}; + + float result4R[4]={- 0.8770746698483730119378f,0.5288031941140065583795f, + 0.6245116064569415925689f,- 0.2566930821175439358939f}; + + float result9R[9]={- 0.8537183024765053751537f,1.9622873186332121520081f,- 0.8931518563294031931577f, + - 0.6983367178614473536f,- 1.1199049557115796638129f,1.539392415892589571769f, + 1.0815849580686147657f,- 0.4078285487954845245362f,0.1789837218054647349774f}; + + float result16R[16]={1.4069394184534917968676f,- 1.7915236034592834091228f,2.3099248310776610004780f,0.5320777350783232328979f, + 0.6986579270151970222358f,0.9874373592109859654187f,0.8902400742596190408307f,0.6067035092100719895214f, + 0.0466142343271527676007f,0.3821963653954382200695f,1.129789301050062144682f,1.2310339071369393870725f, + 0.424502387440284123521f,3.4580528009566289249221f,- 2.1337657344549150195689f,1.0826836628584670663145f}; + + float resultHerR[16]={- 0.0707459665791660696765f,0.9744491331561414559914f,0.0316695005563280007621f,0.9186825501429138896015f, + 0.9744491331561416780360f,1.9318283614573175110962f,- 0.0664515082056250649956f,0.3546926741474874522631f, + 0.0316695005563280562733f,- 0.0664515082056250649956f,0.3206743709780528472919f,1.82590946141052867802f, + 0.9186825501429141116461f,0.3546926741474875632854f,1.82590946141052867802f,0.9537374500729456361370f}; + + + float out4[4],out9[9],out16[16],outHer[16]; + + + slogma(in4,2,out4); + slogma(in9,3,out9); + slogma(in16,4,out16); + slogma(inHer,4,outHer); + + for(i=0;i<4;i++) { + assert( (fabs(out4[i]-result4R[i]) / fabs(out4[i])) <1e-6); + } + + for(i=0;i<9;i++) { + assert( (fabs(out9[i]-result9R[i]) / fabs(out9[i])) <1e-6); + } + + for(i=0;i<16;i++) { + assert( (fabs(out16[i]-result16R[i]) / fabs(out16[i])) <1e-6); + } + + for(i=0;i<16;i++) { + assert( (fabs(outHer[i]-resultHerR[i]) / fabs(outHer[i])) <1e-7); + } +} + + +static void clogmaTest(void){ + int i; + + float in4D[4] = {0.0683740368112921714783f,0.5608486062847077846527f, + 0.6623569373041391372681f,0.7263506767340004444122f }; + float in9D[9] = {0.1985143842175602912903f,0.5442573162727057933807f,0.2320747897028923034668f, + 0.2312237196601927280426f,0.2164632631465792655945f,0.8833887814544141292572f, + 0.6525134947150945663452f,0.3076090742833912372589f,0.9329616213217377662659f}; + float in16D[16] = {2.1460078610107302665710f,3.126419968903064727783f,3.6163610080257058143616f,2.922266637906432151794f, + 5.664248815737664699554f,4.8264719732105731964111f,3.3217189135029911994934f,5.9350947011262178421021f, + 5.0153415976092219352722f,4.3685875833034515380859f,2.6931248093023896217346f,6.3257448654621839523315f, + 4.051954015158116817474f,9.1847078315913677215576f,0.4373343335464596748352f,4.818508932366967201233f}; + float inHerD[16] = {2.0f,3.0f,4.0f,5.0f,3.0f,1.0f,7.0f,9.0f,4.0f,7.0f,2.0f,4.0f,5.0f,9.0f,4.0f,7.0f}; + + + float result4R[4]={- 0.8770746698483730119378f,0.5288031941140065583795f, + 0.6245116064569415925689f,- 0.2566930821175439358939f}; + float result4I[4]={2.3169161534469857599561f,- 1.2719608554746495432397f, + - 1.5021738258100643115256f,0.8246765001428078001311f}; + float result9R[9]={- 0.8537183024765053751537f,1.9622873186332121520081f,- 0.8931518563294031931577f, + - 0.6983367178614473536f,- 1.1199049557115796638129f,1.539392415892589571769f, + 1.0815849580686147657f,- 0.4078285487954845245362f,0.1789837218054647349774f}; + float result9I[9]={- 0.0000000000000006661338f,0.0000000000000005551115f,0.0000000000000001110223f, + 0.0000000000000002844947f,0.0000000000000004163336f,- 0.0000000000000008743006f, + 0.0000000000000001665335f,- 0.0000000000000004996004f,0.0000000000000003330669f}; + float result16R[16]={1.4069394184534917968676f,- 1.7915236034592834091228f,2.3099248310776610004780f,0.5320777350783232328979f, + 0.6986579270151970222358f,0.9874373592109859654187f,0.8902400742596190408307f,0.6067035092100719895214f, + 0.0466142343271527676007f,0.3821963653954382200695f,1.129789301050062144682f,1.2310339071369393870725f, + 0.424502387440284123521f,3.4580528009566289249221f,- 2.1337657344549150195689f,1.0826836628584670663145f}; + float result16I[16]={-1.4875734535892033427729f,+ 1.8146634352088595321106f,-0.0551064758054355952055f,-0.8617364610492967980093f, + + 1.0892397305420760122985f,-1.3287434690517783142383f,+ 0.0403503858667347281575f,+ 0.6309857092212021179023f, + + 1.3838992102024216813f,-1.6881931367553519862668f,+ 0.0512659110447117594145f,+ 0.8016790061501579689463f, + -0.6500053973791579675634f,+ 0.7929296025459252605927f,-0.0240791515993044047406f,-0.3765416419935233571792f}; + float resultHerR[16]={- 0.0707459665791660696765f,0.9744491331561414559914f,0.0316695005563280007621f,0.9186825501429138896015f, + 0.9744491331561416780360f,1.9318283614573175110962f,- 0.0664515082056250649956f,0.3546926741474874522631f, + 0.0316695005563280562733f,- 0.0664515082056250649956f,0.3206743709780528472919f,1.82590946141052867802f, + 0.9186825501429141116461f,0.3546926741474875632854f,1.82590946141052867802f,0.9537374500729456361370f}; + float resultHerI[16]={2.1383917599789858954296f,- 0.5351429414718615884539f,- 1.3567950682942089279948f,0.1340361867044403687554f, + - 0.5351429414718615884539f,2.2766753224580762449136f,- 0.6151069729626167381653f,- 1.1421039303668867326280f, + - 1.3567950682942089279948f,- 0.6151069729626165161207f,1.2861990290089324595613f,0.4088471998565592624431f, + 0.1340361867044403965110f,- 1.1421039303668867326280f,0.4088471998565592624431f,0.5819191957335942966267f}; + + floatComplex out4[4],out9[9],out16[16],outHer[16]; + floatComplex in4[4],in9[9],in16[16],inHer[16]; + + + for(i=0;i<4;i++) in4[i]=FloatComplex(in4D[i],0); + for(i=0;i<9;i++) in9[i]=FloatComplex(in9D[i],0); + for(i=0;i<16;i++) in16[i]=FloatComplex(in16D[i],0); + for(i=0;i<16;i++) inHer[i]=FloatComplex(inHerD[i],0); + + + clogma(in4,2,out4); + clogma(in9,3,out9); + clogma(in16,4,out16); + clogma(inHer,4,outHer); + + + + + for(i=0;i<4;i++) { + assert( fabs(creals(out4[i])-result4R[i]) / fabs(creals(out4[i])) <1e-6); + assert( fabs(cimags(out4[i])-result4I[i]) / fabs(cimags(out4[i])) <1e-6); + } + + for(i=0;i<9;i++) { + assert( fabs(creals(out9[i])-result9R[i]) / fabs(creals(out9[i])) <1e-6); + if (cimags(out9[i])>1e-15) assert( fabs(cimags(out9[i])-result9I[i]) / fabs(cimags(out9[i])) <1e-7); + else assert(1); + } + + /* FIXME : sign pb with the imaginary part below : it's due to the reals eigenvalues which are + stored like that : eigenvalues + (-0)*i instead of eigenvalues + 0 *i + When we do operations with eigenvalues the sign isn't good + */ + + for(i=0;i<16;i++) { + printf("out[%d] = %f + %f *i ---result = %f + %f *i --- assert : %f + %f*i\n", + i, + creals(out16[i]), + cimags(out16[i]), + result16R[i], + result16I[i], + fabs(creals(out16[i])-result16R[i]) / fabs(creals(out16[i])), + fabs(cimags(out16[i])-result16I[i]) / fabs(cimags(out16[i]))); + + assert( fabs(creals(out16[i])-result16R[i]) / fabs(creals(out16[i])) <1e-6); + assert( fabs(cimags(out16[i])-result16I[i]) / fabs(cimags(out16[i])) <3e-6); + + } + + for(i=0;i<16;i++) { + assert( fabs(creals(outHer[i])-resultHerR[i]) / fabs(creals(outHer[i])) <1e-7); + assert( fabs(cimags(outHer[i])-resultHerI[i]) / fabs(cimags(outHer[i])) <1e-7); + } +} + +static int logmTest(void){ + slogmaTest(); + clogmaTest(); + return 0; +} + +int main (void){ + assert(logmTest()==0); + return 0; +} + + diff --git a/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj b/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj new file mode 100644 index 0000000..7b57b30 --- /dev/null +++ b/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DF3336E6-F783-4577-B014-75D0E0377B3E} + testDoubleLogm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters b/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters new file mode 100644 index 0000000..44276aa --- /dev/null +++ b/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj b/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj new file mode 100644 index 0000000..91169df --- /dev/null +++ b/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BAFD5FA4-3D99-48FF-BBFD-5017207870E7} + testFloatLogm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters b/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters new file mode 100644 index 0000000..e96ff69 --- /dev/null +++ b/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/logm/zlogma.c b/src/c/matrixOperations/logm/zlogma.c new file mode 100644 index 0000000..3fb7b27 --- /dev/null +++ b/src/c/matrixOperations/logm/zlogma.c @@ -0,0 +1,100 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "lapack.h" +#include "logm.h" +#include "log.h" +#include "matrixMultiplication.h" +#include "matrixTranspose.h" +#include "matrixInversion.h" +#include "max.h" +#include "conj.h" +#include "spec.h" + +void zlogma (doubleComplex* in, int rows, doubleComplex* out){ + + /* Algo : */ + /* find eigenvalues and eigenvectors */ + /* use formula + * logm = Vp * diag(log(diag(vp)) * inv(Vp) */ + + + int i = 0,j = 0; + doubleComplex *eigenvalues, *eigenvectors, *tmp, *tmp2; + int hermitienne = 0; + + + /* Data initialization */ + eigenvalues = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + eigenvectors = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + tmp = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + tmp2 = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + + + + + + /* hermitian test */ + for (i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/cmagns.c b/src/c/matrixOperations/magnitude/cmagns.c new file mode 100644 index 0000000..78d773b --- /dev/null +++ b/src/c/matrixOperations/magnitude/cmagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" +#include "abs.h" + +float cmagns(floatComplex in){ + return cabss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/dmagna.c b/src/c/matrixOperations/magnitude/dmagna.c new file mode 100644 index 0000000..21e4d9e --- /dev/null +++ b/src/c/matrixOperations/magnitude/dmagna.c @@ -0,0 +1,43 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" + +double dmagna(double* in, int rows, int cols){ + int i=0,j=0; + double out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/dmagns.c b/src/c/matrixOperations/magnitude/dmagns.c new file mode 100644 index 0000000..d651cac --- /dev/null +++ b/src/c/matrixOperations/magnitude/dmagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" +#include "abs.h" + +double dmagns(double in){ + return dabss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/i16magna.c b/src/c/matrixOperations/magnitude/i16magna.c new file mode 100644 index 0000000..193d237 --- /dev/null +++ b/src/c/matrixOperations/magnitude/i16magna.c @@ -0,0 +1,43 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + + +#include "matrixMagnitude.h" + +int16 i16magna(int16* in, int rows, int cols){ + int i=0,j=0; + int16 out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/i16magns.c b/src/c/matrixOperations/magnitude/i16magns.c new file mode 100644 index 0000000..44800ca --- /dev/null +++ b/src/c/matrixOperations/magnitude/i16magns.c @@ -0,0 +1,22 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +int16 i16magns(int16 in){ + return i16abss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/i8magna.c b/src/c/matrixOperations/magnitude/i8magna.c new file mode 100644 index 0000000..8de96b7 --- /dev/null +++ b/src/c/matrixOperations/magnitude/i8magna.c @@ -0,0 +1,43 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + + +#include "matrixMagnitude.h" + +int8 i8magna(int8* in, int rows, int cols){ + int i=0,j=0; + int8 out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/i8magns.c b/src/c/matrixOperations/magnitude/i8magns.c new file mode 100644 index 0000000..a13ae3d --- /dev/null +++ b/src/c/matrixOperations/magnitude/i8magns.c @@ -0,0 +1,22 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +int8 i8magns(int8 in){ + return i8abss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/smagna.c b/src/c/matrixOperations/magnitude/smagna.c new file mode 100644 index 0000000..761baf8 --- /dev/null +++ b/src/c/matrixOperations/magnitude/smagna.c @@ -0,0 +1,45 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" + +float smagna(float* in, int rows, int cols){ + int i=0,j=0; + float out=0, colSum=0; + + + /* Other method : + srowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/smagns.c b/src/c/matrixOperations/magnitude/smagns.c new file mode 100644 index 0000000..3ccf383 --- /dev/null +++ b/src/c/matrixOperations/magnitude/smagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" +#include "abs.h" + +float smagns(float in){ + return sabss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/testDoubleMagnitude.c b/src/c/matrixOperations/magnitude/testDoubleMagnitude.c new file mode 100644 index 0000000..14189d2 --- /dev/null +++ b/src/c/matrixOperations/magnitude/testDoubleMagnitude.c @@ -0,0 +1,192 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include "matrixMagnitude.h" +#include +static void dmagnsTest(void){ + double in[11]={-5,-4,-3,-2,-1,0,1,2,3,4,5}; + double res[11]={5,4,3,2,1,0,1,2,3,4,5}; + double out; + int i; + + for (i=0;i<11;i++) { + out=dmagns(in[i]); + if (out==0) assert( fabs(out-res[i])==0); + else assert( fabs(out-res[i])/fabs(out)==0); + } +} + + +static void zmagnsTest(void){ + double inR[8] = {0.3493615407496690750122,0.9222898678854107856751,- 0.8906224733218550682068,- 0.3435337245464324951172, \ + 0.5896177329123020172119,0.5896177329123020172119,- 0.5896177329123020172119,- 0.5896177329123020172119}; + double inI[8] = { 0.3873778772540390491486,0.9488184261135756969452,0.5042212805710732936859,- 0.3760118731297552585602, \ + 0.6853979662992060184479,- 0.6853979662992060184479,0.6853979662992060184479,- 0.6853979662992060184479}; + double res[8] = {0.5216465335270885628205,1.3232063354355325657252,1.0234488212737711254618, 0.5093136053899318671512, \ + 0.9041125168759308605715,0.9041125168759308605715,0.9041125168759308605715,0.9041125168759308605715}; + int i; + double out; + doubleComplex in; + + for (i=0;i<8;i++) { + in = DoubleComplex(inR[i],inI[i]); + out=zmagns(in); + assert( fabs(out-res[i])/fabs(out)<3e-16); + } +} + + +static void dmagnaTest(void){ + double in1[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ + 0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ + 0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ + 0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + double in2[12] = {0.2017172696068882942200,0.8400885667651891708374,0.3911573919467628002167,\ + 0.1205995907075703144074,0.8300316557288169860840,0.2855364168062806129456,\ + 0.5878720157779753208160,0.8607514644972980022430,0.4829179299995303153992,\ + 0.8494101651012897491455,0.2232865034602582454681,0.5257060811854898929596}; + double in3[12] = {0.2017172696068882942200,0.4829179299995303153992,0.2855364168062806129456,\ + 0.3911573919467628002167,0.2232865034602582454681,0.8607514644972980022430,\ + 0.8300316557288169860840,0.8400885667651891708374,0.8494101651012897491455,\ + 0.5878720157779753208160,0.1205995907075703144074,0.5257060811854898929596}; + double in4[12] = {0.2017172696068882942200,0.5878720157779753208160,0.8400885667651891708374,\ + 0.8607514644972980022430,0.3911573919467628002167,0.4829179299995303153992,\ + 0.1205995907075703144074,0.8494101651012897491455,0.8300316557288169860840,\ + 0.2232865034602582454681,0.2855364168062806129456,0.5257060811854898929596}; + double in5[12] = {0.2017172696068882942200,0.8300316557288169860840,0.4829179299995303153992,\ + 0.8400885667651891708374,0.2855364168062806129456,0.8494101651012897491455,\ + 0.3911573919467628002167,0.5878720157779753208160,0.2232865034602582454681,\ + 0.1205995907075703144074,0.8607514644972980022430,0.5257060811854898929596}; + double in6[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ +0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ +0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ +0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + double res[6] = {6.1990750515833497047424,1.448623480275273323059,2.5195303875952959060669,\ + 2.4904293166473507881165,3.4897020040079951286316,6.1990750515833497047424}; + double out1,out2,out3,out4,out5,out6; + + out1=dmagna(in1,1,12); + out2=dmagna(in2,2,6); + out3=dmagna(in3,3,4); + out4=dmagna(in4,4,3); + out5=dmagna(in5,6,2); + out6=dmagna(in6,12,1); + + + assert( fabs(out1-res[0])/fabs(out1)<1e-16); + assert( fabs(out2-res[1])/fabs(out2)<1e-16); + assert( fabs(out3-res[2])/fabs(out3)<1e-16); + assert( fabs(out4-res[3])/fabs(out4)<1e-16); + assert( fabs(out5-res[4])/fabs(out5)<1e-16); + assert( fabs(out6-res[5])/fabs(out6)<1e-16); + +} + + +static void zmagnaTest(void){ + double inr1[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ + 0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ + 0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ + 0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + + double inr2[12] = {0.2017172696068882942200,0.8400885667651891708374,0.3911573919467628002167,\ + 0.1205995907075703144074,0.8300316557288169860840,0.2855364168062806129456,\ + 0.5878720157779753208160,0.8607514644972980022430,0.4829179299995303153992,\ + 0.8494101651012897491455,0.2232865034602582454681,0.5257060811854898929596}; + + double inr3[12] = {0.2017172696068882942200,0.4829179299995303153992,0.2855364168062806129456,\ + 0.3911573919467628002167,0.2232865034602582454681,0.8607514644972980022430,\ + 0.8300316557288169860840,0.8400885667651891708374,0.8494101651012897491455,\ + 0.5878720157779753208160,0.1205995907075703144074,0.5257060811854898929596}; + + double inr4[12] = {0.2017172696068882942200,0.5878720157779753208160,0.8400885667651891708374,\ + 0.8607514644972980022430,0.3911573919467628002167,0.4829179299995303153992,\ + 0.1205995907075703144074,0.8494101651012897491455,0.8300316557288169860840,\ + 0.2232865034602582454681,0.2855364168062806129456,0.5257060811854898929596}; + + double inr5[12] = {0.2017172696068882942200,0.8300316557288169860840,0.4829179299995303153992,\ + 0.8400885667651891708374,0.2855364168062806129456,0.8494101651012897491455,\ + 0.3911573919467628002167,0.5878720157779753208160,0.2232865034602582454681,\ + 0.1205995907075703144074,0.8607514644972980022430,0.5257060811854898929596}; + + double inr6[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ + 0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ + 0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ + 0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + + double in7[12]={0}; + + double res[6] = {6.1990750515833497047424,1.448623480275273323059,2.5195303875952959060669,\ + 2.4904293166473507881165,3.4897020040079951286316,6.1990750515833497047424}; + + double inR[12] = {0.9931209897622466087341,0.6488562873564660549164,0.9923190940171480178833,\ + 0.0500419777818024158478,\ + 0.7485506581142544746399,0.4104058998636901378632,0.6084526330232620239258,\ + 0.8544210889376699924469,\ + 0.0642646728083491325378,0.8279082938097417354584,0.9262343775480985641480,\ + 0.5667211269028484821320}; + double inI[12] = {0.5711638936772942543030,0.8160110483877360820770,0.0568927936255931854248,\ + 0.5595936686731874942780,\ + 0.1249340316280722618103,0.7279222286306321620941,0.2677766475826501846314,\ + 0.5465334919281303882599,\ + 0.9885407658293843269348,0.7395656588487327098846,0.0037173107266426086426,\ + 0.5900572859682142734528}; + double result = 3.8451319979533651327586; + + double out1,out2,out3,out4,out5,out6; + double out; + doubleComplex* in,*in1,*in2,*in3,*in4,*in5,*in6; + + in=DoubleComplexMatrix(inR,inI,12); + out = zmagna(in, 4,3); + assert(fabs(out-result)/fabs(out) <1e-16); + + + in1=DoubleComplexMatrix(inr1,in7,12); + in2=DoubleComplexMatrix(inr2,in7,12); + in3=DoubleComplexMatrix(inr3,in7,12); + in4=DoubleComplexMatrix(inr4,in7,12); + in5=DoubleComplexMatrix(inr5,in7,12); + in6=DoubleComplexMatrix(inr6,in7,12); + + out1=zmagna(in1,1,12); + out2=zmagna(in2,2,6); + out3=zmagna(in3,3,4); + out4=zmagna(in4,4,3); + out5=zmagna(in5,6,2); + out6=zmagna(in6,12,1); + + assert( fabs(out1-res[0])/fabs(out1)<1e-16); + assert( fabs(out2-res[1])/fabs(out2)<1e-16); + assert( fabs(out3-res[2])/fabs(out3)<1e-16); + assert( fabs(out4-res[3])/fabs(out4)<1e-16); + assert( fabs(out5-res[4])/fabs(out5)<1e-16); + assert( fabs(out6-res[5])/fabs(out6)<1e-16); +} + + +static int magnTest(void){ + printf("\n >>> Double Magnitude Tests <<< \n"); + dmagnsTest(); + dmagnaTest(); + zmagnsTest(); + zmagnaTest(); + return 0; +} + +int main (void){ + assert (magnTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/magnitude/testFloatMagnitude.c b/src/c/matrixOperations/magnitude/testFloatMagnitude.c new file mode 100644 index 0000000..441d260 --- /dev/null +++ b/src/c/matrixOperations/magnitude/testFloatMagnitude.c @@ -0,0 +1,183 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include +#include "matrixMagnitude.h" +#include + +static void smagnsTest(void){ + float in[11]={-5.0f,-4.0f,-3.0f,-2.0f,-1.0f,0.0f,1.0f,2.0f,3.0f,4.0f,5.0f}; + float res[11]={5.0f,4.0f,3.0f,2.0f,1.0f,0.0f,1.0f,2.0f,3.0f,4.0f,5.0f}; + float out; + int i; + + for (i=0;i<11;i++) { + out=smagns(in[i]); + if (out==0) assert( fabs(out-res[i])==0); + else assert( fabs(out-res[i])/fabs(out)==0); + } +} + + +static void cmagnsTest(void){ + float inR[8] = {0.3493615407496690750122f,0.9222898678854107856751f,- 0.8906224733218550682068f,- 0.3435337245464324951172f, \ + 0.5896177329123020172119f,0.5896177329123020172119f,- 0.5896177329123020172119f,- 0.5896177329123020172119f}; + float inI[8] = { 0.3873778772540390491486f,0.9488184261135756969452f,0.5042212805710732936859f,- 0.3760118731297552585602f, \ + 0.6853979662992060184479f,- 0.6853979662992060184479f,0.6853979662992060184479f,- 0.6853979662992060184479f}; + float res[8] = {0.5216465335270885628205f,1.3232063354355325657252f,1.0234488212737711254618f, 0.5093136053899318671512f, \ + 0.9041125168759308605715f,0.9041125168759308605715f,0.9041125168759308605715f,0.9041125168759308605715f}; + int i; + float out; + floatComplex in; + + for (i=0;i<8;i++) { + in = FloatComplex(inR[i],inI[i]); + out=cmagns(in); + assert( fabs(out-res[i])/fabs(out)<1e-6); + } +} + + +static void smagnaTest(void){ + float in1[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ + 0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ + 0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ + 0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float in2[12] = {0.2017172696068882942200f,0.8400885667651891708374f,0.3911573919467628002167f,\ + 0.1205995907075703144074f,0.8300316557288169860840f,0.2855364168062806129456f,\ + 0.5878720157779753208160f,0.8607514644972980022430f,0.4829179299995303153992f,\ + 0.8494101651012897491455f,0.2232865034602582454681f,0.5257060811854898929596f}; + float in3[12] = {0.2017172696068882942200f,0.4829179299995303153992f,0.2855364168062806129456f,\ + 0.3911573919467628002167f,0.2232865034602582454681f,0.8607514644972980022430f,\ + 0.8300316557288169860840f,0.8400885667651891708374f,0.8494101651012897491455f,\ + 0.5878720157779753208160f,0.1205995907075703144074f,0.5257060811854898929596f}; + float in4[12] = {0.2017172696068882942200f,0.5878720157779753208160f,0.8400885667651891708374f,\ + 0.8607514644972980022430f,0.3911573919467628002167f,0.4829179299995303153992f,\ + 0.1205995907075703144074f,0.8494101651012897491455f,0.8300316557288169860840f,\ + 0.2232865034602582454681f,0.2855364168062806129456f,0.5257060811854898929596f}; + float in5[12] = {0.2017172696068882942200f,0.8300316557288169860840f,0.4829179299995303153992f,\ + 0.8400885667651891708374f,0.2855364168062806129456f,0.8494101651012897491455f,\ + 0.3911573919467628002167f,0.5878720157779753208160f,0.2232865034602582454681f,\ + 0.1205995907075703144074f,0.8607514644972980022430f,0.5257060811854898929596f}; + float in6[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ +0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ +0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ +0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float res[6] = {6.1990750515833497047424f,1.448623480275273323059f,2.5195303875952959060669f,\ + 2.4904293166473507881165f,3.4897020040079951286316f,6.1990750515833497047424f}; + float out1,out2,out3,out4,out5,out6; + + out1=smagna(in1,1,12); + out2=smagna(in2,2,6); + out3=smagna(in3,3,4); + out4=smagna(in4,4,3); + out5=smagna(in5,6,2); + out6=smagna(in6,12,1); + + assert( fabs(out1-res[0])/fabs(out1)<1e-6); + assert( fabs(out2-res[1])/fabs(out2)<1e-6); + assert( fabs(out3-res[2])/fabs(out3)<1e-6); + assert( fabs(out4-res[3])/fabs(out4)<1e-6); + assert( fabs(out5-res[4])/fabs(out5)<1e-6); + assert( fabs(out6-res[5])/fabs(out6)<1e-6); +} + + +static void cmagnaTest(void){ + float inR[12] = {0.9931209897622466087341f,0.6488562873564660549164f,0.9923190940171480178833f, \ + 0.0500419777818024158478f,\ +0.7485506581142544746399f,0.4104058998636901378632f,0.6084526330232620239258f,\ + 0.8544210889376699924469f,\ +0.0642646728083491325378f,0.8279082938097417354584f,0.9262343775480985641480f,\ + 0.5667211269028484821320f}; + float inI[12] = {0.5711638936772942543030f,0.8160110483877360820770f,0.0568927936255931854248f, \ + 0.5595936686731874942780f,\ +0.1249340316280722618103f,0.7279222286306321620941f,0.2677766475826501846314f,\ + 0.5465334919281303882599f,\ +0.9885407658293843269348f,0.7395656588487327098846f,0.0037173107266426086426f,\ + 0.5900572859682142734528f}; + float result = 3.8451319979533651327586f; + + float in1[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ + 0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ + 0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ + 0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float in2[12] = {0.2017172696068882942200f,0.8400885667651891708374f,0.3911573919467628002167f,\ + 0.1205995907075703144074f,0.8300316557288169860840f,0.2855364168062806129456f,\ + 0.5878720157779753208160f,0.8607514644972980022430f,0.4829179299995303153992f,\ + 0.8494101651012897491455f,0.2232865034602582454681f,0.5257060811854898929596f}; + float in3[12] = {0.2017172696068882942200f,0.4829179299995303153992f,0.2855364168062806129456f,\ + 0.3911573919467628002167f,0.2232865034602582454681f,0.8607514644972980022430f,\ + 0.8300316557288169860840f,0.8400885667651891708374f,0.8494101651012897491455f,\ + 0.5878720157779753208160f,0.1205995907075703144074f,0.5257060811854898929596f}; + float in4[12] = {0.2017172696068882942200f,0.5878720157779753208160f,0.8400885667651891708374f,\ + 0.8607514644972980022430f,0.3911573919467628002167f,0.4829179299995303153992f,\ + 0.1205995907075703144074f,0.8494101651012897491455f,0.8300316557288169860840f,\ + 0.2232865034602582454681f,0.2855364168062806129456f,0.5257060811854898929596f}; + float in5[12] = {0.2017172696068882942200f,0.8300316557288169860840f,0.4829179299995303153992f,\ + 0.8400885667651891708374f,0.2855364168062806129456f,0.8494101651012897491455f,\ + 0.3911573919467628002167f,0.5878720157779753208160f,0.2232865034602582454681f,\ + 0.1205995907075703144074f,0.8607514644972980022430f,0.5257060811854898929596f}; + float in6[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ + 0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ + 0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ + 0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float in7[12] = {0}; + float res[6] = {6.1990750515833497047424f,1.448623480275273323059f,2.5195303875952959060669f,\ + 2.4904293166473507881165f,3.4897020040079951286316f,6.1990750515833497047424f}; + float out; + floatComplex *in; + floatComplex *In1,*In2,*In3,*In4,*In5,*In6; + float out1,out2,out3,out4,out5,out6; + + in=FloatComplexMatrix(inR,inI,12); + out = cmagna(in, 4,3); + assert(fabs(out-result)/fabs(out) <1e-6); + + + In1=FloatComplexMatrix(in1,in7,12); + In2=FloatComplexMatrix(in2,in7,12); + In3=FloatComplexMatrix(in3,in7,12); + In4=FloatComplexMatrix(in4,in7,12); + In5=FloatComplexMatrix(in5,in7,12); + In6=FloatComplexMatrix(in6,in7,12); + out1=cmagna(In1,1,12); + out2=cmagna(In2,2,6); + out3=cmagna(In3,3,4); + out4=cmagna(In4,4,3); + out5=cmagna(In5,6,2); + out6=cmagna(In6,12,1); + assert( fabs(out1-res[0])/fabs(out1)<1e-6); + assert( fabs(out2-res[1])/fabs(out2)<1e-6); + assert( fabs(out3-res[2])/fabs(out3)<1e-6); + assert( fabs(out4-res[3])/fabs(out4)<1e-6); + assert( fabs(out5-res[4])/fabs(out5)<1e-6); + assert( fabs(out6-res[5])/fabs(out6)<1e-6); +} + + + +static int magnTest(void){ + printf("\n >>> Float Magnitude Tests <<< \n"); + smagnsTest(); + smagnaTest(); + cmagnsTest(); + cmagnaTest(); + return 0; +} + +int main (void){ + assert (magnTest()==0); + return 0; +} diff --git a/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj b/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj new file mode 100644 index 0000000..ae84760 --- /dev/null +++ b/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {818553D4-0DEF-4BBE-A43A-45611DD84580} + testDoubleMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters b/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters new file mode 100644 index 0000000..2fa7f70 --- /dev/null +++ b/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj b/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj new file mode 100644 index 0000000..710b616 --- /dev/null +++ b/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1E12C5A2-EDF1-47BB-A2EF-60A288DC278D} + testFloatMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters b/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters new file mode 100644 index 0000000..4ec3a5f --- /dev/null +++ b/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/magnitude/u16magna.c b/src/c/matrixOperations/magnitude/u16magna.c new file mode 100644 index 0000000..10680c7 --- /dev/null +++ b/src/c/matrixOperations/magnitude/u16magna.c @@ -0,0 +1,33 @@ +/* SCilab2C FOSSEE IIT BOMBAY */ + + + +#include "matrixMagnitude.h" + +uint16 u16magna(uint16* in, int rows, int cols){ + int i=0,j=0; + uint16 out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/u16magns.c b/src/c/matrixOperations/magnitude/u16magns.c new file mode 100644 index 0000000..78853ed --- /dev/null +++ b/src/c/matrixOperations/magnitude/u16magns.c @@ -0,0 +1,13 @@ + +/* SCilab2C FOSSEE IIT BOMBAY */ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +uint16 u16magns(uint16 in){ + return u16abss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/u8magna.c b/src/c/matrixOperations/magnitude/u8magna.c new file mode 100644 index 0000000..7f5df58 --- /dev/null +++ b/src/c/matrixOperations/magnitude/u8magna.c @@ -0,0 +1,33 @@ +/* SCilab2C FOSSEE IIT BOMBAY */ + + + +#include "matrixMagnitude.h" + +uint8 u8magna(uint8* in, int rows, int cols){ + int i=0,j=0; + uint8 out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/u8magns.c b/src/c/matrixOperations/magnitude/u8magns.c new file mode 100644 index 0000000..e6d789c --- /dev/null +++ b/src/c/matrixOperations/magnitude/u8magns.c @@ -0,0 +1,13 @@ + +/* SCilab2C FOSSEE IIT BOMBAY */ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +uint8 u8magns(uint8 in){ + return u8abss(in); +} + + diff --git a/src/c/matrixOperations/magnitude/zmagna.c b/src/c/matrixOperations/magnitude/zmagna.c new file mode 100644 index 0000000..8982da1 --- /dev/null +++ b/src/c/matrixOperations/magnitude/zmagna.c @@ -0,0 +1,46 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" + +double zmagna(doubleComplex* in, int rows, int cols){ + int i=0,j=0; + double out=0, colSum=0; + + + /* Other method : + zrowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/src/c/matrixOperations/magnitude/zmagns.c b/src/c/matrixOperations/magnitude/zmagns.c new file mode 100644 index 0000000..5f132aa --- /dev/null +++ b/src/c/matrixOperations/magnitude/zmagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixMagnitude.h" +#include "abs.h" + +double zmagns(doubleComplex in){ + return zabss(in); +} + + diff --git a/src/c/matrixOperations/matrixOperations.vcxproj b/src/c/matrixOperations/matrixOperations.vcxproj new file mode 100644 index 0000000..db4a828 --- /dev/null +++ b/src/c/matrixOperations/matrixOperations.vcxproj @@ -0,0 +1,934 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FD335544-52BF-4736-A34E-77F591D158D5} + matrixOperations + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + + + {72b46833-b150-432d-b231-3e0ecd91e190} + + + {9b622a66-546a-4b33-b947-0a189d259d37} + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/matrixOperations.vcxproj.filters b/src/c/matrixOperations/matrixOperations.vcxproj.filters new file mode 100644 index 0000000..18b2850 --- /dev/null +++ b/src/c/matrixOperations/matrixOperations.vcxproj.filters @@ -0,0 +1,576 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {50669223-b754-4e72-9393-58022d4f7620} + + + {ff7a57b0-c6bc-43c3-8d86-36786e8fe9d5} + + + {dd4e5fd5-24a0-440a-bdf0-b6578a4b9be2} + + + {0c8faacf-3f59-484b-9bd3-d9ec25039ca0} + + + {d27faf2b-2d32-434c-b4db-80c4090d283d} + + + {75693e96-1cec-40f8-b111-eba4dfbbe311} + + + {da1a0d02-b218-44ad-898e-7b971205770d} + + + {6bb535d0-7b17-4940-bdfb-ff142424a6fc} + + + {4eed3cb8-2d46-495f-bf5a-12a2c7f48361} + + + {3216afe8-00b8-4910-99e1-885cebf71f18} + + + {bbed4850-0b3c-4f03-8a72-de19980d8bab} + + + {6d360e1d-6db1-4a93-bbfe-38a15bcbcd75} + + + {280aa00d-6dd5-4468-a6ab-88643dcbe4f7} + + + {0166b150-dcc9-40ac-b233-993d67fca2d7} + + + {ff21e2a8-d2a4-4a19-b1ea-b7d1d3a8d2d8} + + + {78c5b505-dff8-483f-84ae-2a14c3cb4fe0} + + + {6429efdd-0d73-49a9-8b3b-3ca1463bebde} + + + {0880c91a-9165-4b91-8457-9d008eed7217} + + + {a5b7de6e-4acf-4d8f-b93b-5c71afb35071} + + + {24575c01-f16e-4bdb-9cd0-febf8695e09a} + + + {c292263c-96bf-4106-92a6-d8de899c2bb6} + + + {7155bd34-e1bf-4931-914c-7076b45a976e} + + + {873959cb-ab2f-47b4-aaf1-61e0804f3922} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\determ + + + Source Files\determ + + + Source Files\determ + + + Source Files\determ + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\expm + + + Source Files\expm + + + Source Files\expm + + + Source Files\expm + + + Source Files\eye + + + Source Files\eye + + + Source Files\eye + + + Source Files\eye + + + Source Files\fill + + + Source Files\fill + + + Source Files\fill + + + Source Files\fill + + + Source Files\hilb + + + Source Files\hilb + + + Source Files\infiniteNorm + + + Source Files\infiniteNorm + + + Source Files\infiniteNorm + + + Source Files\infiniteNorm + + + Source Files\inversion + + + Source Files\inversion + + + Source Files\inversion + + + Source Files\inversion + + + Source Files\jmat + + + Source Files\jmat + + + Source Files\logm + + + Source Files\logm + + + Source Files\logm + + + Source Files\logm + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\ones + + + Source Files\ones + + + Source Files\ones + + + Source Files\ones + + + Source Files\pown + + + Source Files\pown + + + Source Files\pown + + + Source Files\pown + + + Source Files\spec + + + Source Files\spec + + + Source Files\spec + + + Source Files\spec + + + Source Files\spec2 + + + Source Files\spec2 + + + Source Files\spec2 + + + Source Files\spec2 + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\trace + + + Source Files\trace + + + Source Files\trace + + + Source Files\trace + + + Source Files\transpose + + + Source Files\transpose + + + Source Files\transpose + + + Source Files\transpose + + + Source Files\zeros + + + Source Files\zeros + + + Source Files\zeros + + + Source Files\zeros + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + + + Source Files\cat + + + Source Files\chol + + + Source Files\determ + + + Source Files\expm + + + Source Files\eye + + + Source Files\fill + + + Source Files\infiniteNorm + + + Source Files\inversion + + + Source Files\jmat + + + Source Files\logm + + + Source Files\magnitude + + + Source Files\ones + + + Source Files\pown + + + Source Files\spec + + + Source Files\spec2 + + + Source Files\squaredMagnitude + + + Source Files\trace + + + Source Files\transpose + + + Source Files\zeros + + + Source Files\dist + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/multiplication/Makefile.am b/src/c/matrixOperations/multiplication/Makefile.am new file mode 100644 index 0000000..f281aad --- /dev/null +++ b/src/c/matrixOperations/multiplication/Makefile.am @@ -0,0 +1,49 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixMultiplication.la + +HEAD = ../includes/matrixMultiplication.h + +libMatrixMultiplication_la_SOURCES = $(HEAD) \ + smulma.c \ + dmulma.c \ + cmulma.c \ + zmulma.c + +check_PROGRAMS = testFloatMatrixMultiplication testDoubleMatrixMultiplication + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixMultiplication.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +testFloatMatrixMultiplication_SOURCES = testFloatMatrixMultiplication.c +testFloatMatrixMultiplication_LDADD = $(check_LDADD) +testFloatMatrixMultiplication_CFLAGS = $(check_INCLUDES) + +testDoubleMatrixMultiplication_SOURCES = testDoubleMatrixMultiplication.c +testDoubleMatrixMultiplication_LDADD = $(check_LDADD) +testDoubleMatrixMultiplication_CFLAGS = $(check_INCLUDES) +TESTS = testFloatMatrixMultiplication testDoubleMatrixMultiplication diff --git a/src/c/matrixOperations/multiplication/Makefile.in b/src/c/matrixOperations/multiplication/Makefile.in new file mode 100644 index 0000000..7bc3f74 --- /dev/null +++ b/src/c/matrixOperations/multiplication/Makefile.in @@ -0,0 +1,756 @@ +# 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 = testFloatMatrixMultiplication$(EXEEXT) \ + testDoubleMatrixMultiplication$(EXEEXT) +TESTS = testFloatMatrixMultiplication$(EXEEXT) \ + testDoubleMatrixMultiplication$(EXEEXT) +subdir = src/c/matrixOperations/multiplication +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) +libMatrixMultiplication_la_LIBADD = +am__objects_1 = +am_libMatrixMultiplication_la_OBJECTS = $(am__objects_1) \ + libMatrixMultiplication_la-smulma.lo \ + libMatrixMultiplication_la-dmulma.lo \ + libMatrixMultiplication_la-cmulma.lo \ + libMatrixMultiplication_la-zmulma.lo +libMatrixMultiplication_la_OBJECTS = \ + $(am_libMatrixMultiplication_la_OBJECTS) +libMatrixMultiplication_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testDoubleMatrixMultiplication_OBJECTS = testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.$(OBJEXT) +testDoubleMatrixMultiplication_OBJECTS = \ + $(am_testDoubleMatrixMultiplication_OBJECTS) +testDoubleMatrixMultiplication_DEPENDENCIES = $(check_LDADD) +testDoubleMatrixMultiplication_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMatrixMultiplication_OBJECTS = testFloatMatrixMultiplication-testFloatMatrixMultiplication.$(OBJEXT) +testFloatMatrixMultiplication_OBJECTS = \ + $(am_testFloatMatrixMultiplication_OBJECTS) +testFloatMatrixMultiplication_DEPENDENCIES = $(check_LDADD) +testFloatMatrixMultiplication_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatMatrixMultiplication_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 = $(libMatrixMultiplication_la_SOURCES) \ + $(testDoubleMatrixMultiplication_SOURCES) \ + $(testFloatMatrixMultiplication_SOURCES) +DIST_SOURCES = $(libMatrixMultiplication_la_SOURCES) \ + $(testDoubleMatrixMultiplication_SOURCES) \ + $(testFloatMatrixMultiplication_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@ +libMatrixMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixMultiplication.la +HEAD = ../includes/matrixMultiplication.h +libMatrixMultiplication_la_SOURCES = $(HEAD) \ + smulma.c \ + dmulma.c \ + cmulma.c \ + zmulma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixMultiplication.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +testFloatMatrixMultiplication_SOURCES = testFloatMatrixMultiplication.c +testFloatMatrixMultiplication_LDADD = $(check_LDADD) +testFloatMatrixMultiplication_CFLAGS = $(check_INCLUDES) +testDoubleMatrixMultiplication_SOURCES = testDoubleMatrixMultiplication.c +testDoubleMatrixMultiplication_LDADD = $(check_LDADD) +testDoubleMatrixMultiplication_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/multiplication/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/multiplication/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 +libMatrixMultiplication.la: $(libMatrixMultiplication_la_OBJECTS) $(libMatrixMultiplication_la_DEPENDENCIES) + $(libMatrixMultiplication_la_LINK) -rpath $(pkglibdir) $(libMatrixMultiplication_la_OBJECTS) $(libMatrixMultiplication_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 +testDoubleMatrixMultiplication$(EXEEXT): $(testDoubleMatrixMultiplication_OBJECTS) $(testDoubleMatrixMultiplication_DEPENDENCIES) + @rm -f testDoubleMatrixMultiplication$(EXEEXT) + $(testDoubleMatrixMultiplication_LINK) $(testDoubleMatrixMultiplication_OBJECTS) $(testDoubleMatrixMultiplication_LDADD) $(LIBS) +testFloatMatrixMultiplication$(EXEEXT): $(testFloatMatrixMultiplication_OBJECTS) $(testFloatMatrixMultiplication_DEPENDENCIES) + @rm -f testFloatMatrixMultiplication$(EXEEXT) + $(testFloatMatrixMultiplication_LINK) $(testFloatMatrixMultiplication_OBJECTS) $(testFloatMatrixMultiplication_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-cmulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-dmulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-smulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-zmulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.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 $@ $< + +libMatrixMultiplication_la-smulma.lo: smulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-smulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-smulma.Tpo -c -o libMatrixMultiplication_la-smulma.lo `test -f 'smulma.c' || echo '$(srcdir)/'`smulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-smulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-smulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smulma.c' object='libMatrixMultiplication_la-smulma.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) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-smulma.lo `test -f 'smulma.c' || echo '$(srcdir)/'`smulma.c + +libMatrixMultiplication_la-dmulma.lo: dmulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-dmulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-dmulma.Tpo -c -o libMatrixMultiplication_la-dmulma.lo `test -f 'dmulma.c' || echo '$(srcdir)/'`dmulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-dmulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-dmulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmulma.c' object='libMatrixMultiplication_la-dmulma.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) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-dmulma.lo `test -f 'dmulma.c' || echo '$(srcdir)/'`dmulma.c + +libMatrixMultiplication_la-cmulma.lo: cmulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-cmulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-cmulma.Tpo -c -o libMatrixMultiplication_la-cmulma.lo `test -f 'cmulma.c' || echo '$(srcdir)/'`cmulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-cmulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-cmulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmulma.c' object='libMatrixMultiplication_la-cmulma.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) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-cmulma.lo `test -f 'cmulma.c' || echo '$(srcdir)/'`cmulma.c + +libMatrixMultiplication_la-zmulma.lo: zmulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-zmulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-zmulma.Tpo -c -o libMatrixMultiplication_la-zmulma.lo `test -f 'zmulma.c' || echo '$(srcdir)/'`zmulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-zmulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-zmulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmulma.c' object='libMatrixMultiplication_la-zmulma.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) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-zmulma.lo `test -f 'zmulma.c' || echo '$(srcdir)/'`zmulma.c + +testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o: testDoubleMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o -MD -MP -MF $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o `test -f 'testDoubleMatrixMultiplication.c' || echo '$(srcdir)/'`testDoubleMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixMultiplication.c' object='testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.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) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o `test -f 'testDoubleMatrixMultiplication.c' || echo '$(srcdir)/'`testDoubleMatrixMultiplication.c + +testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj: testDoubleMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj -MD -MP -MF $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj `if test -f 'testDoubleMatrixMultiplication.c'; then $(CYGPATH_W) 'testDoubleMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixMultiplication.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixMultiplication.c' object='testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.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) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj `if test -f 'testDoubleMatrixMultiplication.c'; then $(CYGPATH_W) 'testDoubleMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixMultiplication.c'; fi` + +testFloatMatrixMultiplication-testFloatMatrixMultiplication.o: testFloatMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testFloatMatrixMultiplication-testFloatMatrixMultiplication.o -MD -MP -MF $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.o `test -f 'testFloatMatrixMultiplication.c' || echo '$(srcdir)/'`testFloatMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixMultiplication.c' object='testFloatMatrixMultiplication-testFloatMatrixMultiplication.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) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.o `test -f 'testFloatMatrixMultiplication.c' || echo '$(srcdir)/'`testFloatMatrixMultiplication.c + +testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj: testFloatMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj -MD -MP -MF $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj `if test -f 'testFloatMatrixMultiplication.c'; then $(CYGPATH_W) 'testFloatMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixMultiplication.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixMultiplication.c' object='testFloatMatrixMultiplication-testFloatMatrixMultiplication.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) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj `if test -f 'testFloatMatrixMultiplication.c'; then $(CYGPATH_W) 'testFloatMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixMultiplication.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/multiplication/cmulma.c b/src/c/matrixOperations/multiplication/cmulma.c new file mode 100644 index 0000000..33eab64 --- /dev/null +++ b/src/c/matrixOperations/multiplication/cmulma.c @@ -0,0 +1,44 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for floats complex matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void cmulma(floatComplex *in1, int lines1, int columns1, + floatComplex *in2, int lines2, int columns2, + floatComplex *out) +{ + int i = 0; + int k = 0; + floatComplex accu = FloatComplex(0, 0); + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = FloatComplex(0,0); + for (k = 0; k < columns1 ; ++k) + { + accu = cadds(accu, + cmuls(in1[i % lines1 + k *lines1] , + in2[k + (i / lines1) *lines2] )); + } + out[i] = accu; + } +} diff --git a/src/c/matrixOperations/multiplication/dmulma.c b/src/c/matrixOperations/multiplication/dmulma.c new file mode 100644 index 0000000..8edd311 --- /dev/null +++ b/src/c/matrixOperations/multiplication/dmulma.c @@ -0,0 +1,67 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef WITHOUT_BLAS +#include "lapack.h" +#endif +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void dmulma(double *in1, int lines1, int columns1, + double *in2, int lines2, int columns2, + double *out) +{ +#ifndef WITHOUT_BLAS + /* + ** USES BLAS DGEMM FUNCTION. + */ + double One = 1; + double Zero = 0; + + /* Cr <- 1*Ar*Br + 0*Cr */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1 , &lines1, in2, &lines2, &Zero, out, &lines1); +#else + /* + ** DO NOT USE ANY BLAS FUNCTION. + */ + int i = 0; + int k = 0; + double accu = 0; + + /* + ** How to convert 2 index matrixes to one. + ** #define in1(a, b) in1[a+b*lines1] + ** #define in2(c, d) in2[c+d*lines2] + */ + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = 0; + for (k = 0; k < columns1 ; ++k) + { + accu += in1[i % lines1 + k * lines1] + * in2[k + (i / lines1) * lines2]; + } + out[i] = accu; + } +#endif +} diff --git a/src/c/matrixOperations/multiplication/i16mulma.c b/src/c/matrixOperations/multiplication/i16mulma.c new file mode 100644 index 0000000..ba46e8e --- /dev/null +++ b/src/c/matrixOperations/multiplication/i16mulma.c @@ -0,0 +1,54 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* +** \brief Compute a multiplication for int16 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ + +/* dgemm function of lapack library does not support uint8,uint16,int8 and int16 datatype so removed*/ + +#include "matrixMultiplication.h" + +void i16mulma(int16 *in1,int lines1,int columns1, + int16 *in2,int lines2,int columns2, + int16 *out) +{ + + /* Do Not Use Any BLAS Function*/ + int i = 0; + int k = 0; + int16 accu = 0; + + /* How to convert 2 index matrixes to one. + ** #define in1(a,b) in1[a+b*lines1] + ** #define in2(c,d) in2[c+d*lines2] + */ + for(i=0;i < lines1 * columns2; ++i) + { + accu = 0; + for(k=0;k < columns1; ++k) + { + accu += in1[i % lines1 + k * lines1] * in2[k + (i / lines1) * lines2]; + + } + out[i] = accu; + + } + +} diff --git a/src/c/matrixOperations/multiplication/i8mulma.c b/src/c/matrixOperations/multiplication/i8mulma.c new file mode 100644 index 0000000..88f192d --- /dev/null +++ b/src/c/matrixOperations/multiplication/i8mulma.c @@ -0,0 +1,54 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* +** \brief Compute a multiplication for int8 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ + +/* dgemm function of lapack library does not support uint8,uint16,int8 and int16 datatype so removed*/ + +#include "matrixMultiplication.h" + +void i8mulma(int8 *in1,int lines1,int columns1, + int8 *in2,int lines2,int columns2, + int8 *out) +{ + + /* Do Not Use Any BLAS Function*/ + int i = 0; + int k = 0; + int8 accu = 0; + + /* How to convert 2 index matrixes to one. + ** #define in1(a,b) in1[a+b*lines1] + ** #define in2(c,d) in2[c+d*lines2] + */ + for(i=0;i < lines1 * columns2; ++i) + { + accu = 0; + for(k=0;k < columns1; ++k) + { + accu += in1[i % lines1 + k * lines1] * in2[k + (i / lines1) * lines2]; + + } + out[i] = accu; + + } + +} diff --git a/src/c/matrixOperations/multiplication/smulma.c b/src/c/matrixOperations/multiplication/smulma.c new file mode 100644 index 0000000..edf10a0 --- /dev/null +++ b/src/c/matrixOperations/multiplication/smulma.c @@ -0,0 +1,49 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for floats matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void smulma(float *in1, int lines1, int columns1, + float *in2, int lines2, int columns2, + float *out) +{ + int i = 0; + int k = 0; + float accu = 0; + + /* + ** How to convert 2 index matrixes to one. + ** #define in1(a, b) in1[a+b*lines1] + ** #define in2(c, d) in2[c+d*lines2] + */ + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = 0; + for (k = 0; k < columns1 ; ++k) + { + accu += in1[i % lines1 + k * lines1] + * in2[k + (i / lines1) * lines2]; + } + out[i] = accu; + } +} diff --git a/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c b/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c new file mode 100644 index 0000000..01d2a37 --- /dev/null +++ b/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c @@ -0,0 +1,354 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "matrixMultiplication.h" + +int testFloatMultiplication(void); + +static void zmulmaTest(void) { + double realM1[4] = {1.0, 2.0, 3.0, 4.0}; + double imagM1[4] = {1.0, 2.0, 3.0, 4.0}; + double realM3[6] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}; + double imagM3[6] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}; + + doubleComplex *M1; + doubleComplex *M2; + doubleComplex M1_mul_M2[4]; + doubleComplex *M3; + doubleComplex *M4; + doubleComplex M3_mul_M4[4]; + doubleComplex miscM3_mul_M4[9]; + + int i = 0; + + printf("\n>>>> Matrix Complex Double Multiplication Tests\n"); + + M1 = DoubleComplexMatrix(realM1, imagM1, 4); + M2 = DoubleComplexMatrix(realM1, imagM1, 4); + + /* + [ 1+1.%i 3+3.%i] * [ 1+1.%i 3+3.%i] = [ 14.%i 30.%i ] + [ 2+2.%i 4+4.%i] [ 2+2.%i 4+4.%i] [ 20.%i 44.%i ] + */ + zmulma(M1, 2, 2, M2, 2, 2, M1_mul_M2); + for (i = 0; i < 4; ++i) + { + printf("M1_mul_M2[%d] = %e + %e i\n", i, zreals(M1_mul_M2[i]), zimags(M1_mul_M2[i])); + } + for (i = 0; i < 4; ++i) + { + assert(zreals(M1_mul_M2[i]) == 0.0); + } + assert(zimags(M1_mul_M2[0]) == 14.0); + assert(zimags(M1_mul_M2[1]) == 20.0); + assert(zimags(M1_mul_M2[2]) == 30.0); + assert(zimags(M1_mul_M2[3]) == 44.0); + + M3 = DoubleComplexMatrix(realM3, imagM3, 6); + M4 = DoubleComplexMatrix(realM3, imagM3, 6); + + /* + [ 1+1.%i 3+3.%i 5+5.%i ] * [ 1+1.%i 4+4.%i ] = [ 44.%i 98.%i ] + [ 2+2.%i 4+4.%i 6+6.%i ] [ 2+2.%i 5+5.%i ] [ 56.%i 128.%i ] + [ 3+3.%i 6+6.%i ] + */ + zmulma(M3, 2, 3, M4, 3, 2, M3_mul_M4); + for (i = 0; i < 4; ++i) + { + printf("M3_mul_M4[%d] = %e + %e i\n", i, zreals(M3_mul_M4[i]), zimags(M3_mul_M4[i])); + } + for (i = 0; i < 4; ++i) + { + assert(zreals(M3_mul_M4[i]) == 0.0); + } + assert(zimags(M3_mul_M4[0]) == 44.0); + assert(zimags(M3_mul_M4[1]) == 56.0); + assert(zimags(M3_mul_M4[2]) == 98.0); + assert(zimags(M3_mul_M4[3]) == 128.0); + + /* + [ 1+1.%i 4+4.%i ] * [ 1+1.%i 3+3.%i 5+5.%i ] = [ 18.%i 38.%i 58.%i ] + [ 2+2.%i 5+5.%i ] [ 2+2.%i 4+4.%i 6+6.%i ] [ 24.%i 52.%i 80.%i ] + [ 3+3.%i 6+6.%i ] [ 30.%i 66.%i 102.%i ] + */ + zmulma(M3, 3, 2, M4, 2, 3, miscM3_mul_M4); + for (i = 0; i < 9; ++i) + { + printf("miscM3_mul_M4[%d] = %e + %e i\n", i, zreals(miscM3_mul_M4[i]), zimags(miscM3_mul_M4[i])); + } + for (i = 0; i < 9; ++i) + { + assert(zreals(miscM3_mul_M4[i]) == 0.0); + } + assert(zimags(miscM3_mul_M4[0]) == 18.0); + assert(zimags(miscM3_mul_M4[1]) == 24.0); + assert(zimags(miscM3_mul_M4[2]) == 30.0); + assert(zimags(miscM3_mul_M4[3]) == 38.0); + assert(zimags(miscM3_mul_M4[4]) == 52.0); + assert(zimags(miscM3_mul_M4[5]) == 66.0); + assert(zimags(miscM3_mul_M4[6]) == 58.0); + assert(zimags(miscM3_mul_M4[7]) == 80.0); + assert(zimags(miscM3_mul_M4[8]) == 102.0); +} + +static void dmulmaTest(void) { + double M1[4] = {1.0, 2.0, 3.0, 4.0}; + double M2[4] = {1.0, 2.0, 3.0, 4.0}; + double M1_by_M2[4]; + double M3[4] = {1.0, 0.0, 1.0, 0.0}; + double M4[4] = {0.0, 1.0, 0.0, 1.0}; + double M3_by_M4[4]; + double M5[4] = {1.0, 0.0, 0.0, 1.0}; + double M6[4] = {42.0, 51.0, 69.0, 1664.0}; + double M5_by_M6[4]; + double M7[6] = {1.0, 4.0, 2.0, 5.0, 3.0, 6.0}; + double M8[6] = {1.0, 3.0, 5.0, 2.0, 4.0, 6.0}; + double M7_by_M8[4]; + double miscM7_by_M8[9]; + double M9[6] = {1, 4, 2, 5, 3, 6}; + double M10[9] = {4, 8, 3, 2, 8, 4, 3, 4, 5}; + double M9_by_M10[6]; + + int i = 0; + + printf("\n>>>> Matrix Real Double Multiplication Tests\n"); + /* + [ 1 3 ] * [ 1 3 ] = [ 7 15 ] + [ 2 4 ] [ 2 4 ] [10 22 ] + */ + dmulma(M1, 2, 2, M2, 2, 2, M1_by_M2); + for (i = 0; i < 4; ++i) { + printf("M1_by_M2[%d] = %e\n", i, M1_by_M2[i]); + } + assert(M1_by_M2[0] == 7.0); + assert(M1_by_M2[1] == 10.0); + assert(M1_by_M2[2] == 15.0); + assert(M1_by_M2[3] == 22.0); + /* + [ 1 1 ] * [ 0 0 ] = [ 1 1 ] + [ 0 0 ] [ 1 1 ] [ 0 0 ] + */ + dmulma(M3, 2, 2, M4, 2, 2, M3_by_M4); + for (i = 0; i < 4; ++i) { + printf("M3_by_M4[%d] = %e\n", i, M3_by_M4[i]); + } + assert(M3_by_M4[0] == 1.0); + assert(M3_by_M4[1] == 0.0); + assert(M3_by_M4[2] == 1.0); + assert(M3_by_M4[3] == 0.0); + + /* + [ 1 0 ] * [ 42 69 ] = [ 42 69 ] + [ 0 1 ] [ 51 1664 ] [ 51 1664 ] + */ + dmulma(M5, 2, 2, M6, 2, 2, M5_by_M6); + for (i = 0; i < 4; ++i) { + printf("M5_by_M6[%d] = %e\n", i, M5_by_M6[i]); + } + assert(M5_by_M6[0] == 42.0); + assert(M5_by_M6[1] == 51.0); + assert(M5_by_M6[2] == 69.0); + assert(M5_by_M6[3] == 1664.0); + + /* + [ 1 2 3 ] * [ 1 2 ] = [ 22 28 ] + [ 4 5 6 ] [ 3 4 ] [ 49 64 ] + [ 5 6 ] + */ + dmulma(M7, 2, 3, M8, 3, 2, M7_by_M8); + for (i = 0; i < 4; ++i) { + printf("M7_by_M8[%d] = %e\n", i, M7_by_M8[i]); + } + assert(M7_by_M8[0] == 22.0); + assert(M7_by_M8[1] == 49.0); + assert(M7_by_M8[2] == 28.0); + assert(M7_by_M8[3] == 64.0); + + /* + [ 1 5 ] * [ 1 5 4 ] = [ 16 15 34 ] + [ 4 3 ] [ 3 2 6 ] [ 13 26 34 ] + [ 2 6 ] [ 20 22 44 ] + */ + dmulma(M7, 3, 2, M8, 2, 3, miscM7_by_M8); + for (i = 0; i < 9; ++i) { + printf("miscM7_by_M8[%d] = %e\n", i, miscM7_by_M8[i]); + } + assert(miscM7_by_M8[0] == 16.0); + assert(miscM7_by_M8[1] == 13.0); + assert(miscM7_by_M8[2] == 20.0); + assert(miscM7_by_M8[3] == 15.0); + assert(miscM7_by_M8[4] == 26.0); + assert(miscM7_by_M8[5] == 22.0); + assert(miscM7_by_M8[6] == 34.0); + assert(miscM7_by_M8[7] == 34.0); + assert(miscM7_by_M8[8] == 44.0); + + /* + [ 1 2 3 ] * [ 4 2 3 ] = [ 29 30 26 ] + [ 4 5 6 ] [ 8 8 4 ] [ 74 72 62 ] + [ 3 4 5 ] + */ + dmulma(M9, 2, 3, M10, 3, 3, M9_by_M10); + for (i = 0; i < 6; ++i) { + printf("M9_by_M10[%d] = %e\n", i, M9_by_M10[i]); + } + assert(M9_by_M10[0] == 29.0); + assert(M9_by_M10[1] == 74.0); + assert(M9_by_M10[2] == 30.0); + assert(M9_by_M10[3] == 72.0); + assert(M9_by_M10[4] == 26.0); + assert(M9_by_M10[5] == 62.0); + +} + + + + +static void dmulma2Test(void){ + int i=0; + double in1[16]={0.2164632631465792655945 , 0.8833887814544141292572 , 0.6525134947150945663452 , 0.3076090742833912372589, 0.9329616213217377662659, + 0.2146007861010730266571 , 0.3126419968903064727783 , 0.3616361008025705814362 , 0.2922266637906432151794 , 0.5664248815737664699554 , + 0.4826471973210573196411 , 0.3321718913502991199493 , 0.5935094701126217842102 , 0.5015341597609221935272 , 0.4368587583303451538086 , + 0.2693124809302389621735 }; + double in2[16]={ 0.6325744865462183952332 , 0.4051954015158116817474 , 0.9184707831591367721558 , 0.0437334333546459674835 , 0.4818508932366967201233 , + 0.2639556000940501689911 , 0.4148103706538677215576 , 0.2806498021818697452545 , 0.1280058464035391807556 , 0.7783128595910966396332 , + 0.2119030449539422988892 , 0.1121354666538536548615 , 0.6856895955279469490051 , 0.1531216683797538280487 , 0.6970850601792335510254 , + 0.8415518426336348056793 }; + double result1[1]={3.4777275993941634268936}; + double result2[4]={1.9089008209228131018875 , 1.5406061588610213686223 , + 1.8239702765316110344429, 1.4540285665075025622883}; + double result4[16]={0.8093187558996659536348 , 1.1879429718699099360890 , 1.0018471710504197602631 , 0.6579870739173818705581, + 0.6383504274229201413959 , 0.8580211304925904336471 , 0.7197492031038768001139 , 0.4570484210841743166753 , + 0.8823217718625468997118 , 0.4563724043650834172325 , 0.4781206002867167681458 , 0.4214295036121353255076 , + 0.9944590770529683210199 , 1.4555038456021862636192 , 1.199379422070573131265 , 0.7244911422701945102887}; + double result8[64]={0.2553380379093421193026,0.7883219621670439769545,0.6083298137928665472174,0.3291801751097247485944,0.83065502662064605310 , + 0.3389703173185232287779,0.3747825106430331398855,0.3378859496255101069195, + 0.211595258152759591042, 0.8361384907451508974319,0.6204223995507252009674,0.2970569646365784355346,0.8828541978493160691244 , + 0.2190383628278015915036,0.3062578731251097141630,0.3439301521590905075243, + 0.1814378811044508321704,0.5751726929430913681784,0.4418116408800580319216,0.2359003381269093035932,0.6062085389345149843976 , + 0.2357883305794587769366,0.2659581411763266567405,0.2453412157151133865529 , + 0.1718045618038900324009,0.5254058588311405486593,0.406124205051207498585, 0.2208234097178256027938,0.5535704713264770759906 , + 0.2297740943495505672178,0.2522914667188620452265,0.2255928995139138970583 , + 0.255152333558011423786, 0.5539346979946898619218,0.4591760625013173724440,0.2979094145476890442836,0.5813605948770583786711 , + 0.4178206413298739541062,0.3800327928667431298671,0.2559009023296956453208 , + 0.0786381978942892051476,0.2507090910879711254111,0.1923914651044380252909,0.1024315495419729910021,0.2642508697778033210923 , + 0.1017143270719664260859,0.1152371518487332324732,0.1068312716501549353154 , + 0.1931728416583101681781,0.6924624191277827245372,0.5213254583603328384811,0.2617870559185208612085,0.7306012370300282166014 , + 0.2239452735136546190908,0.2812679063146140134855,0.2892076880831473406630 , + 0.3968171941968219318397,1.09247302468375151463, 0.8610300469787290911228,0.4939695572954598823401,1.149822596137767938274 , + 0.5716619981842931963456,0.5855773582603787108525,0.4787315376620214779635 }; + double result16[256]={0.1369291375410663369472,0.5588092048492155905493,0.4127633888838795339638,0.1945856522217737638592,0.5901677185749256704384 , + 0.1357509820803011191259,0.1977693506556700286936,0.2287617707817625745115,0.1848551318024805323326,0.3583059286285278921547 , + 0.3053103030283391694510,0.2101234636160017044126,0.3754389483168098506916,0.3172577135961544003706,0.2763457047440365799140 , + 0.1703602043449341518766 , + 0.0877099188241009936062,0.3579450719959849647189,0.2643954674855681918899,0.1246417823641658567668,0.3780317587503042031649 , + 0.0869552516898331046002,0.1266810994606728801859,0.1465332850673101428018,0.1184089003682757823555,0.2295127573178283864053 , + 0.1955664249089870132536,0.1345945228879510124909,0.2404873080457204104210,0.203219335238222109652, 0.1770131599873631389475 , + 0.1091241788437475462859 , + 0.1988151828274209720338,0.8113667859364313006410,0.5993145805128781145044,0.2825299473639234504319,0.8568979909927945115555 , + 0.1971045520768189285299,0.287152539732276168571, 0.3321521927227535364580,0.2684016527517738559538,0.5202447045798785918436 , + 0.4432973493130339392998,0.30509017719196090956, 0.5451211078267039766843,0.4606444724966738402117,0.4012420058936001510119 , + 0.2473556452745266642790 , + 0.0094666816925501173080,0.0386336243999785347580,0.0285366554341297228026,0.0134528009494570312266,0.0408016148885166698990 , + 0.0093852291768059120658,0.0136729079348656499399,0.0158155883130832522476,0.0127800753253386294162,0.0247717048087195516881 , + 0.0211078190378471211575,0.0145270172726550076542,0.0259562068565215887939,0.0219338107509826525654,0.0191053333928335386527 , + 0.0117779594363369693316 , + 0.1043030167001093577728,0.4256616734190865058984,0.3144142102774669100818,0.1482217072111654543321,0.4495483905894361309485 , + 0.1034055804720993287926,0.1506468254648987425970,0.174254678198354717722, 0.1408096789751012989367,0.272932335137809511938 , + 0.2325639831473396978989,0.1600573225552646139391,0.2859830683182053578939,0.2416646828695165061252,0.210500782919751050493 , + 0.1297684594960265003216 , + 0.0571366905221716223084,0.2331754159251516189677,0.1722345910669886293043,0.0811951377968477827629,0.2462604446206972941269 , + 0.0566450792759636348461,0.0825236059037830066432,0.0954558740030149316391,0.0771348644043414743976,0.1495110195240048345244 , + 0.1273974306025911218399,0.0876786309157438353834,0.1566601483450788256935,0.1323827501073594481440,0.1153113157114278863880 , + 0.0710865375167586688310 , + 0.0897912064187782466007,0.3664388278665740572571,0.2706693645994189267867,0.1275994341199866433101,0.3870021559463034388493 , + 0.08901863162519749184, 0.1296871426120334014343,0.1500104050157337609583,0.121218650721939893988, 0.2349589150731871967093 , + 0.2002070628157982257189,0.1377883453718138639932,0.2461938832839972723932,0.2080415707060042362908,0.1812135434663988964310 , + 0.1117136100363851081152 , + 0.0607503719817294868255,0.2479228867648642919974,0.1831277832127918003824,0.0863304258469818203148,0.2618354944672221518154 , + 0.0602276681673398900374,0.0877429145810092459001,0.1014931001520641418168,0.0820133553851117719224,0.1589670309645665469134 , + 0.1354548404517885995535,0.0932239755978389733615,0.1665683153801736371413,0.1407554627243530753766,0.1226043241068286160367 , + 0.0755824944981801360999 , + 0.0277085632143499079050,0.1130789286734633775078,0.0835255421807369752285,0.0393757599150546533373,0.1194245419993072432341 , + 0.0274701552637327192641,0.0400200034332363480116,0.0462915351733086607999,0.0374067214402037592769,0.0725056963898744188946 , + 0.0617816630073779321508,0.0425199441037594910719,0.0759726820702821964426,0.0641993046204846901093,0.0559204751188750043278 , + 0.0344735720685122454254 , + 0.1684761413360341408829,0.6875528486244794068583,0.5078596439934851547449,0.2394160982416763117087,0.7261360273796675368629 , + 0.1670265515008234058492,0.2433332866279651618413,0.2814660277470227844887,0.2274437703436615054731,0.440855769321226442781 , + 0.3756505203205803833377,0.2585336546326343909463,0.4619360528777511909482,0.3903504860661412556588,0.3400127894335067679776 , + 0.209609367156386977582 , + 0.0458692245814266291726,0.1871927726683430270871,0.1382695964036666780306,0.0651832994961140249623,0.1976974083832430950647 , + 0.0454745600243270306495,0.0662497911215368939786,0.0766317909253355217247,0.0619237198739692532024,0.1200271571431572731337 , + 0.1022744107508182648259,0.0703882352252384740909,0.1257664639258653793696,0.1062766156017563717873,0.0925717011049985438742 , + 0.0570681347532181540427 , + 0.0242732090263575867040,0.0990592132451698637041,0.0731699052278139971950,0.0344938870917280079875,0.1046180867770489658630 , + 0.0240643592937276537547,0.0350582562168871778030,0.0405522329223763147721,0.0327689733128625759750,0.0635163184196280983240 , + 0.0541218687007713472603,0.0372482500458589660397,0.066553461394560253783, 0.0562397670476394023753,0.0489873607271963315557 , + 0.0301994807248194101212 , + 0.1484266073536374686004,0.6057304962494031164155,0.4474217142677203162826,0.2109243417261047193190,0.6397220767671999430704 , + 0.1471495262216242216891,0.2143753643927638896649,0.247970111687618482987, 0.2003767828970874909089,0.3883916479432811819095 , + 0.3309461615137729850744,0.2277668098257397411022,0.4069632685035297625653,0.3438967551499154673422,0.2995495053023755072097 , + 0.1846647661196834933062 , + 0.0331452159959298997549,0.1352659640442576416408,0.0999139549510789648501,0.0471016146630244963989,0.1428566399910645989824 , + 0.0328600304034029899736,0.0478722641694215370056,0.0553743231012384373724,0.0447462343046726856999,0.0867319228783796081217 , + 0.0739037440926125499541,0.0508627141924161210729,0.0908791602628282874088,0.0767957472920304112796,0.0668925419218501238205 , + 0.0412375763955288299201 , + 0.1508933068171264824109,0.6157971218818100167525,0.4548574087312337033140,0.2144296900585161147479,0.6503536079439788952783 , + 0.1495950018937773073890,0.2179380652168350362974,0.2520911230909432809710,0.2037068415144771826864,0.3948463226588642127624 , + 0.3364461505898876381160,0.2315520628717731010937,0.4137265846904019661601,0.3496119699388837709364,0.3045277138405338979155 , + 0.1877337069762743115842 , + 0.1821650579634931654827,0.7434174567948435008447,0.5491239338208003806230,0.2588689832740145302381,0.7851355715297718695922 , + 0.1805976869739845391827,0.2631044485676965472010,0.3043355269932461748539,0.2459238873796954771844,0.4766759028019415533883 , + 0.4061726382474953322976,0.2795398672369437398366,0.4994689881937890429953,0.4220669962905158612010,0.3676392930435437023107 , + 0.2266404145710782247480 }; + double out1[1],out2[4],out4[16],out8[64],out16[256]; + + + dmulma(in1, 1, 16, in2, 16, 1, out1); + dmulma(in1, 2, 8, in2, 8, 2, out2); + dmulma(in1, 4, 4, in2, 4, 4, out4); + dmulma(in1, 8, 2, in2, 2, 8, out8); + dmulma(in1, 16, 1, in2, 1, 16, out16); + + + assert( (fabs(out1[0]-result1[0]) / fabs(out1[0])) <1e-16); + for (i=0;i<4;i++) assert( (fabs(out2[i]-result2[i]) / fabs(out2[i])) <3e-16); + for (i=0;i<16;i++) assert( (fabs(out4[i]-result4[i]) / fabs(out4[i])) <3e-16); + for (i=0;i<64;i++) assert( (fabs(out8[i]-result8[i]) / fabs(out8[i])) <3e-16); + for (i=0;i<256;i++) assert( (fabs(out16[i]-result16[i]) / fabs(out16[i])) <1e-16); +} + + + + + + +static int testDoubleMultiplication(void) { + + printf("\n>>>> Matrix Double Multiplication Tests\n"); + dmulmaTest(); + dmulma2Test(); + zmulmaTest(); + return 0; +} + + + +int main(void) { + + assert(testDoubleMultiplication() == 0); + return 0; +} diff --git a/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c b/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c new file mode 100644 index 0000000..f8ba0cd --- /dev/null +++ b/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c @@ -0,0 +1,213 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "matrixMultiplication.h" + +int testFloatMultiplication(void); + +static void cmulmaTest(void) { + float realM1[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float imagM1[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float realM3[6] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + float imagM3[6] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + + floatComplex *M1; + floatComplex *M2; + floatComplex M1_mul_M2[4]; + floatComplex *M3; + floatComplex *M4; + floatComplex M3_mul_M4[4]; + floatComplex miscM3_mul_M4[9]; + + int i = 0; + + printf("\n>>>> Matrix Complex Float Multiplication Tests\n"); + + M1 = FloatComplexMatrix(realM1, imagM1, 4); + M2 = FloatComplexMatrix(realM1, imagM1, 4); + + /* + [ 1+1.%i 3+3.%i] * [ 1+1.%i 3+3.%i] = [ 14.%i 30.%i ] + [ 2+2.%i 3+3.%i] [ 2+2.%i 3+3.%i] [ 20.%i 44.%i ] + */ + cmulma(M1, 2, 2, M2, 2, 2, M1_mul_M2); + for (i = 0; i < 4; ++i) + { + printf("M1_mul_M2[%d] = %e + %e i\n", i, creals(M1_mul_M2[i]), cimags(M1_mul_M2[i])); + } + for (i = 0; i < 4; ++i) + { + assert(creals(M1_mul_M2[i]) == 0.0f); + } + assert(cimags(M1_mul_M2[0]) == 14.0f); + assert(cimags(M1_mul_M2[1]) == 20.0f); + assert(cimags(M1_mul_M2[2]) == 30.0f); + assert(cimags(M1_mul_M2[3]) == 44.0f); + + M3 = FloatComplexMatrix(realM3, imagM3, 6); + M4 = FloatComplexMatrix(realM3, imagM3, 6); + + /* + [ 1+1.%i 3+3.%i 5+5.%i ] * [ 1+1.%i 4+4.%i ] = [ 44.%i 98.%i ] + [ 2+2.%i 4+4.%i 6+6.%i ] [ 2+2.%i 5+5.%i ] [ 56.%i 128.%i ] + [ 3+3.%i 6+6.%i ] + */ + cmulma(M3, 2, 3, M4, 3, 2, M3_mul_M4); + for (i = 0; i < 4; ++i) + { + printf("M3_mul_M4[%d] = %e + %e i\n", i, creals(M3_mul_M4[i]), cimags(M3_mul_M4[i])); + } + for (i = 0; i < 4; ++i) + { + assert(creals(M3_mul_M4[i]) == 0.0f); + } + assert(cimags(M3_mul_M4[0]) == 44.0f); + assert(cimags(M3_mul_M4[1]) == 56.0f); + assert(cimags(M3_mul_M4[2]) == 98.0f); + assert(cimags(M3_mul_M4[3]) == 128.0f); + + /* + [ 1+1.%i 4+4.%i ] * [ 1+1.%i 3+3.%i 5+5.%i ] = [ 18.%i 38.%i 58.%i ] + [ 2+2.%i 5+5.%i ] [ 2+2.%i 4+4.%i 6+6.%i ] [ 24.%i 52.%i 80.%i ] + [ 3+3.%i 6+6.%i ] [ 30.%i 66.%i 102.%i ] + */ + cmulma(M3, 3, 2, M4, 2, 3, miscM3_mul_M4); + for (i = 0; i < 9; ++i) + { + printf("miscM3_mul_M4[%d] = %e + %e i\n", i, creals(miscM3_mul_M4[i]), cimags(miscM3_mul_M4[i])); + } + for (i = 0; i < 9; ++i) + { + assert(creals(miscM3_mul_M4[i]) == 0.0); + } + assert(cimags(miscM3_mul_M4[0]) == 18.0); + assert(cimags(miscM3_mul_M4[1]) == 24.0); + assert(cimags(miscM3_mul_M4[2]) == 30.0); + assert(cimags(miscM3_mul_M4[3]) == 38.0); + assert(cimags(miscM3_mul_M4[4]) == 52.0); + assert(cimags(miscM3_mul_M4[5]) == 66.0); + assert(cimags(miscM3_mul_M4[6]) == 58.0); + assert(cimags(miscM3_mul_M4[7]) == 80.0); + assert(cimags(miscM3_mul_M4[8]) == 102.0); + +} + +static void smulmaTest(void) { + float M1[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float M2[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float M1_by_M2[4]; + float M3[4] = {1.0f, 0.0f, 1.0f, 0.0f}; + float M4[4] = {0.0f, 1.0f, 0.0f, 1.0f}; + float M3_by_M4[4]; + float M5[4] = {1.0f, 0.0f, 0.0f, 1.0f}; + float M6[4] = {42.0f, 51.0f, 69.0f, 1664.0f}; + float M5_by_M6[4]; + float M7[6] = {1.0f, 4.0f, 2.0f, 5.0f, 3.0f, 6.0f}; + float M8[6] = {1.0f, 3.0f, 5.0f, 2.0f, 4.0f, 6.0f}; + float M7_by_M8[4]; + float miscM7_by_M8[9]; + + int i = 0; + + printf("\n>>>> Matrix Float Multiplication Tests\n"); + /* + [ 1 3 ] * [ 1 3 ] = [ 7 15 ] + [ 2 4 ] [ 2 4 ] [10 22 ] + */ + smulma(M1, 2, 2, M2, 2, 2, M1_by_M2); + for (i = 0; i < 4; ++i) { + printf("M1_by_M2[%d] = %e\n", i, M1_by_M2[i]); + } + assert(M1_by_M2[0] == 7.0f); + assert(M1_by_M2[1] == 10.0f); + assert(M1_by_M2[2] == 15.0f); + assert(M1_by_M2[3] == 22.0f); + /* + [ 1 1 ] * [ 0 0 ] = [ 1 1 ] + [ 0 0 ] [ 1 1 ] [ 0 0 ] + */ + smulma(M3, 2, 2, M4, 2, 2, M3_by_M4); + for (i = 0; i < 4; ++i) { + printf("M3_by_M4[%d] = %e\n", i, M3_by_M4[i]); + } + assert(M3_by_M4[0] == 1.0f); + assert(M3_by_M4[1] == 0.0f); + assert(M3_by_M4[2] == 1.0f); + assert(M3_by_M4[3] == 0.0f); + + /* + [ 1 0 ] * [ 42 69 ] = [ 42 69 ] + [ 0 1 ] [ 51 1664 ] [ 51 1664 ] + */ + smulma(M5, 2, 2, M6, 2, 2, M5_by_M6); + for (i = 0; i < 4; ++i) { + printf("M5_by_M6[%d] = %e\n", i, M5_by_M6[i]); + } + assert(M5_by_M6[0] == 42.0f); + assert(M5_by_M6[1] == 51.0f); + assert(M5_by_M6[2] == 69.0f); + assert(M5_by_M6[3] == 1664.0f); + + /* + [ 1 2 3 ] * [ 1 2 ] = [ 22 28 ] + [ 4 5 6 ] [ 3 4 ] [ 49 64 ] + [ 5 6 ] + */ + smulma(M7, 2, 3, M8, 3, 2, M7_by_M8); + for (i = 0; i < 4; ++i) { + printf("M7_by_M8[%d] = %e\n", i, M7_by_M8[i]); + } + assert(M7_by_M8[0] == 22.0f); + assert(M7_by_M8[1] == 49.0f); + assert(M7_by_M8[2] == 28.0f); + assert(M7_by_M8[3] == 64.0f); + + /* + [ 1 5 ] * [ 1 5 4 ] = [ 16 15 34 ] + [ 4 3 ] [ 3 2 6 ] [ 13 26 34 ] + [ 2 6 ] [ 20 22 44 ] + */ + smulma(M7, 3, 2, M8, 2, 3, miscM7_by_M8); + for (i = 0; i < 9; ++i) { + printf("miscM7_by_M8[%d] = %e\n", i, miscM7_by_M8[i]); + } + assert(miscM7_by_M8[0] == 16.0f); + assert(miscM7_by_M8[1] == 13.0f); + assert(miscM7_by_M8[2] == 20.0f); + assert(miscM7_by_M8[3] == 15.0f); + assert(miscM7_by_M8[4] == 26.0f); + assert(miscM7_by_M8[5] == 22.0f); + assert(miscM7_by_M8[6] == 34.0f); + assert(miscM7_by_M8[7] == 34.0f); + assert(miscM7_by_M8[8] == 44.0f); + + + +} + +int testFloatMultiplication(void) { + + printf("\n>>>> Matrix Multiplication Tests\n"); + smulmaTest(); + cmulmaTest(); + + return 0; +} + +int main(void) { + assert(testFloatMultiplication() == 0); + return 0; +} diff --git a/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj b/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj new file mode 100644 index 0000000..57565dd --- /dev/null +++ b/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C4FBEB3F-D766-4C74-9377-7D4434A2FC6C} + testDoubleMatrixMultiplication + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters b/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters new file mode 100644 index 0000000..9146934 --- /dev/null +++ b/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj b/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj new file mode 100644 index 0000000..12758bf --- /dev/null +++ b/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4CE33021-55F3-46CC-A548-A151D07B24CF} + testFloatMatrixMultiplication + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters b/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters new file mode 100644 index 0000000..3f7d25f --- /dev/null +++ b/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/multiplication/u16mulma.c b/src/c/matrixOperations/multiplication/u16mulma.c new file mode 100644 index 0000000..b15d844 --- /dev/null +++ b/src/c/matrixOperations/multiplication/u16mulma.c @@ -0,0 +1,54 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* +** \brief Compute a multiplication for uint16 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ + +/* dgemm function of lapack library does not support uint8,uint16,int8 and int16 datatype so removed*/ + +#include "matrixMultiplication.h" + +void u16mulma(uint16 *in1,int lines1,int columns1, + uint16 *in2,int lines2,int columns2, + uint16 *out) +{ + + /* Do Not Use Any BLAS Function*/ + int i = 0; + int k = 0; + uint16 accu = 0; + + /* How to convert 2 index matrixes to one. + ** #define in1(a,b) in1[a+b*lines1] + ** #define in2(c,d) in2[c+d*lines2] + */ + for(i=0;i < lines1 * columns2; ++i) + { + accu = 0; + for(k=0;k < columns1; ++k) + { + accu += in1[i % lines1 + k * lines1] * in2[k + (i / lines1) * lines2]; + + } + out[i] = accu; + + } + +} diff --git a/src/c/matrixOperations/multiplication/u8mulma.c b/src/c/matrixOperations/multiplication/u8mulma.c new file mode 100644 index 0000000..fa4f851 --- /dev/null +++ b/src/c/matrixOperations/multiplication/u8mulma.c @@ -0,0 +1,54 @@ +/* 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: Mushir + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +/* +** \brief Compute a multiplication for uint8 matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ + + +/* dgemm function of lapack library does not support uint8,uint16,int8 and int16 datatype so removed*/ + +#include "matrixMultiplication.h" + +void u8mulma(uint8 *in1,int lines1,int columns1, + uint8 *in2,int lines2,int columns2, + uint8 *out) +{ + + int i = 0; + int k = 0; + uint8 accu = 0; + + /* How to convert 2 index matrixes to one. + ** #define in1(a,b) in1[a+b*lines1] + ** #define in2(c,d) in2[c+d*lines2] + */ + for(i=0;i < lines1 * columns2; ++i) + { + accu = 0; + for(k=0;k < columns1; ++k) + { + accu += in1[i % lines1 + k * lines1] * in2[k + (i / lines1) * lines2]; + + } + out[i] = accu; + + } + +} diff --git a/src/c/matrixOperations/multiplication/zmulma.c b/src/c/matrixOperations/multiplication/zmulma.c new file mode 100644 index 0000000..6a38e7d --- /dev/null +++ b/src/c/matrixOperations/multiplication/zmulma.c @@ -0,0 +1,103 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#ifndef WITHOUT_BLAS +#include "lapack.h" +#endif +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void zmulma(doubleComplex *in1, int lines1, int columns1, + doubleComplex *in2, int lines2, int columns2, + doubleComplex *out) +{ +#ifndef WITHOUT_BLAS + /* + ** USES BLAS DGEMM FUNCTION. + */ + int i = 0; + double One = 1; + double MinusOne = -1; + double Zero = 0; + + double *in1Real = (double*)malloc((unsigned int) lines1 * (unsigned int) columns1 * sizeof(double)); + double *in1Imag = (double*)malloc((unsigned int) lines1 * (unsigned int) columns1 * sizeof(double)); + double *in2Real = (double*)malloc((unsigned int) lines2 * (unsigned int) columns2 * sizeof(double)); + double *in2Imag = (double*)malloc((unsigned int) lines2 * (unsigned int) columns2 * sizeof(double)); + + double *RealOut = (double*)malloc((unsigned int) lines1 * (unsigned int) columns2 * sizeof(double)); + double *ImagOut = (double*)malloc((unsigned int) lines1 * (unsigned int) columns2 * sizeof(double)); + + zreala(in1, lines1 * columns1, in1Real); + zreala(in2, lines2 * columns2, in2Real); + zimaga(in1, lines1 * columns1, in1Imag); + zimaga(in2, lines2 * columns2, in2Imag); + + /* Cr <- 1*Ar*Br + 0*Cr */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1Real, &lines1, in2Real, &lines2, &Zero, RealOut, &lines1); + + + /* Cr <- -1*Ai*Bi + 1*Cr */ + dgemm_("N","N", &lines1, &columns2, &columns1, &MinusOne, + in1Imag, &lines1, in2Imag, &lines2, &One, RealOut, &lines1); + + /* Ci <- 1*Ar*Bi + 0*Ci */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1Real, &lines1, in2Imag, &lines2, &Zero, ImagOut, &lines1); + + /* Ci <- 1*Ai*Br + 1*Ci */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1Imag, &lines1, in2Real, &lines2, &One, ImagOut, &lines1); + + /* Now fill output matrix */ + for(i = 0 ; i < lines1 * columns2 ; ++i) + { + out[i] = DoubleComplex(RealOut[i], ImagOut[i]); + } + /* FREE allocated variguru_dim_structables */ + free(in1Real); + free(in2Real); + free(in1Imag); + free(in2Imag); + free(RealOut); + free(ImagOut); +#else + /* + ** DO NOT USE ANY BLAS FUNCTION. + */ + int i = 0; + int k = 0; + doubleComplex accu = DoubleComplex(0, 0); + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = DoubleComplex(0,0); + for (k = 0; k < columns1 ; ++k) + { + accu = zadds(accu, + zmuls(in1[i % lines1 + k *lines1] , + in2[k + (i / lines1) *lines2] )); + } + out[i] = accu; + } +#endif +} diff --git a/src/c/matrixOperations/norm/dnorma.c b/src/c/matrixOperations/norm/dnorma.c new file mode 100644 index 0000000..c912f85 --- /dev/null +++ b/src/c/matrixOperations/norm/dnorma.c @@ -0,0 +1,72 @@ + /* 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 + */ + + /*This function calculates norms for matrices*/ + /*Acceptable norms are: 1, 2, 'inf', 'fro', */ + +#include "norm.h" +#include + +double dnorma (double *in, int row, int col, int norm) +{ + double res = 0, sum = 0; + int col_count, row_count; + + switch (norm) + { + case 1: /*largest column sum*/ + for(col_count = 0; col_count < col; col_count++) + { + sum = 0; + for(row_count = 0; row_count < row; row_count++) + { + sum += in[col_count*row+row_count]; + } + if (sum >= res) + res = sum; + } + break; + + case 2: /*Largest singular value of the matrix*/ + break; + + case 3: /*inf: largest row sum*/ + + for(row_count = 0; row_count < row; row_count++) + { + sum = 0; + for(col_count = 0; col_count < col; col_count++) + { + sum += in[col_count*row + row_count]; + } + if(sum >= res) + res = sum; + } + break; + + case 4: /*Frobenius norm*/ + + for(row_count = 0; row_count < row; row_count++) + { + for(col_count = 0; col_count < col; col_count++) + { + sum += in[col_count*row + row_count] * in[col_count*row + row_count]; + } + } + res = sqrt(sum); + + break; + } + + + return res; +} \ No newline at end of file diff --git a/src/c/matrixOperations/norm/dnormv.c b/src/c/matrixOperations/norm/dnormv.c new file mode 100644 index 0000000..5d20d60 --- /dev/null +++ b/src/c/matrixOperations/norm/dnormv.c @@ -0,0 +1,60 @@ + /* 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 + */ + + /*This function calculates norms for vectors (row or column)*/ + +#include "norm.h" +#include + +double dnormv (double *in, int size, int norm) +{ + double sum = 0; + double res = 0; + int counter = 0; + + switch (norm) + { + case 0: + res = INFINITY; + break; + case 1: /*Addition of all elements*/ + for (counter=0; counter < size; counter++) + { + sum += in[counter]; + } + res = sum; + break; + case 2: /*Square root of addition of squares of all elements*/ + for (counter=0; counter < size; counter++) + { + sum += in[counter]*in[counter]; + } + res = sqrt(sum); + break; + case 3: /*Cube root of addition of cubes of all elements*/ + for (counter=0; counter < size; counter++) + { + sum += pow(in[counter],3); + } + res = cbrt(sum); + break; + default : /*Nth root of addition of all elements raised to n*/ + for (counter=0; counter < size; counter++) + { + sum += pow(in[counter],norm); + } + res = pow(sum, 1./norm); + break; + } + + return res; +} \ No newline at end of file diff --git a/src/c/matrixOperations/norm/snorma.c b/src/c/matrixOperations/norm/snorma.c new file mode 100644 index 0000000..4bf2ccd --- /dev/null +++ b/src/c/matrixOperations/norm/snorma.c @@ -0,0 +1,72 @@ + /* 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 + */ + + /*This function calculates norms for matrices*/ + /*Acceptable norms are: 1, 2, 'inf', 'fro', */ + +#include "norm.h" +#include + +float dnorma (float *in, int row, int col, int norm) +{ + float res = 0, sum = 0; + int col_count, row_count; + + switch (norm) + { + case 1: /*largest column sum*/ + for(col_count = 0; col_count < col; col_count++) + { + sum = 0; + for(row_count = 0; row_count < row; row_count++) + { + sum += in[col_count*row+row_count]; + } + if (sum >= res) + res = sum; + } + break; + + case 2: /*Largest singular value of the matrix*/ + break; + + case 3: /*inf: largest row sum*/ + + for(row_count = 0; row_count < row; row_count++) + { + sum = 0; + for(col_count = 0; col_count < col; col_count++) + { + sum += in[col_count*row + row_count]; + } + if(sum >= res) + res = sum; + } + break; + + case 4: /*Frobenius norm*/ + + for(row_count = 0; row_count < row; row_count++) + { + for(col_count = 0; col_count < col; col_count++) + { + sum += in[col_count*row + row_count] * in[col_count*row + row_count]; + } + } + res = sqrt(sum); + + break; + } + + + return res; +} \ No newline at end of file diff --git a/src/c/matrixOperations/norm/snormv.c b/src/c/matrixOperations/norm/snormv.c new file mode 100644 index 0000000..03e9ed6 --- /dev/null +++ b/src/c/matrixOperations/norm/snormv.c @@ -0,0 +1,60 @@ + /* 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 + */ + + /*This function calculates norms for vectors (row or column)*/ + +#include "norm.h" +#include + +float dnormv (float *in, int size, int norm) +{ + float sum = 0; + float res = 0; + int counter = 0; + + switch (norm) + { + case 0: + res = INFINITY; + break; + case 1: /*Addition of all elements*/ + for (counter=0; counter < size; counter++) + { + sum += in[counter]; + } + res = sum; + break; + case 2: /*Square root of addition of squares of all elements*/ + for (counter=0; counter < size; counter++) + { + sum += in[counter]*in[counter]; + } + res = sqrt(sum); + break; + case 3: /*Cube root of addition of cubes of all elements*/ + for (counter=0; counter < size; counter++) + { + sum += pow(in[counter],3); + } + res = cbrt(sum); + break; + default : /*Nth root of addition of all elements raised to n*/ + for (counter=0; counter < size; counter++) + { + sum += pow(in[counter],norm); + } + res = pow(sum, 1./norm); + break; + } + + return res; +} \ No newline at end of file diff --git a/src/c/matrixOperations/ones/Makefile.am b/src/c/matrixOperations/ones/Makefile.am new file mode 100644 index 0000000..8f1419c --- /dev/null +++ b/src/c/matrixOperations/ones/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 +## +## + +libMatrixOnes_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixOnes.la + +HEAD = ../includes/matrixOnes.h + +libMatrixOnes_la_SOURCES = $(HEAD) \ + sonesa.c \ + donesa.c \ + conesa.c \ + zonesa.c + +check_PROGRAMS = testMatrixOnes + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixOnes.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixOnes_SOURCES = testMatrixOnes.c +testMatrixOnes_LDADD = $(check_LDADD) +testMatrixOnes_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixOnes diff --git a/src/c/matrixOperations/ones/Makefile.in b/src/c/matrixOperations/ones/Makefile.in new file mode 100644 index 0000000..b5a9bf3 --- /dev/null +++ b/src/c/matrixOperations/ones/Makefile.in @@ -0,0 +1,710 @@ +# 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 = testMatrixOnes$(EXEEXT) +TESTS = testMatrixOnes$(EXEEXT) +subdir = src/c/matrixOperations/ones +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) +libMatrixOnes_la_LIBADD = +am__objects_1 = +am_libMatrixOnes_la_OBJECTS = $(am__objects_1) \ + libMatrixOnes_la-sonesa.lo libMatrixOnes_la-donesa.lo \ + libMatrixOnes_la-conesa.lo libMatrixOnes_la-zonesa.lo +libMatrixOnes_la_OBJECTS = $(am_libMatrixOnes_la_OBJECTS) +libMatrixOnes_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixOnes_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testMatrixOnes_OBJECTS = testMatrixOnes-testMatrixOnes.$(OBJEXT) +testMatrixOnes_OBJECTS = $(am_testMatrixOnes_OBJECTS) +testMatrixOnes_DEPENDENCIES = $(check_LDADD) +testMatrixOnes_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixOnes_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 = $(libMatrixOnes_la_SOURCES) $(testMatrixOnes_SOURCES) +DIST_SOURCES = $(libMatrixOnes_la_SOURCES) $(testMatrixOnes_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@ +libMatrixOnes_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixOnes.la +HEAD = ../includes/matrixOnes.h +libMatrixOnes_la_SOURCES = $(HEAD) \ + sonesa.c \ + donesa.c \ + conesa.c \ + zonesa.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixOnes.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixOnes_SOURCES = testMatrixOnes.c +testMatrixOnes_LDADD = $(check_LDADD) +testMatrixOnes_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/ones/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/ones/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 +libMatrixOnes.la: $(libMatrixOnes_la_OBJECTS) $(libMatrixOnes_la_DEPENDENCIES) + $(libMatrixOnes_la_LINK) -rpath $(pkglibdir) $(libMatrixOnes_la_OBJECTS) $(libMatrixOnes_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 +testMatrixOnes$(EXEEXT): $(testMatrixOnes_OBJECTS) $(testMatrixOnes_DEPENDENCIES) + @rm -f testMatrixOnes$(EXEEXT) + $(testMatrixOnes_LINK) $(testMatrixOnes_OBJECTS) $(testMatrixOnes_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-conesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-donesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-sonesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-zonesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixOnes-testMatrixOnes.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 $@ $< + +libMatrixOnes_la-sonesa.lo: sonesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-sonesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-sonesa.Tpo -c -o libMatrixOnes_la-sonesa.lo `test -f 'sonesa.c' || echo '$(srcdir)/'`sonesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-sonesa.Tpo $(DEPDIR)/libMatrixOnes_la-sonesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sonesa.c' object='libMatrixOnes_la-sonesa.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) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-sonesa.lo `test -f 'sonesa.c' || echo '$(srcdir)/'`sonesa.c + +libMatrixOnes_la-donesa.lo: donesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-donesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-donesa.Tpo -c -o libMatrixOnes_la-donesa.lo `test -f 'donesa.c' || echo '$(srcdir)/'`donesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-donesa.Tpo $(DEPDIR)/libMatrixOnes_la-donesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='donesa.c' object='libMatrixOnes_la-donesa.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) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-donesa.lo `test -f 'donesa.c' || echo '$(srcdir)/'`donesa.c + +libMatrixOnes_la-conesa.lo: conesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-conesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-conesa.Tpo -c -o libMatrixOnes_la-conesa.lo `test -f 'conesa.c' || echo '$(srcdir)/'`conesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-conesa.Tpo $(DEPDIR)/libMatrixOnes_la-conesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='conesa.c' object='libMatrixOnes_la-conesa.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) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-conesa.lo `test -f 'conesa.c' || echo '$(srcdir)/'`conesa.c + +libMatrixOnes_la-zonesa.lo: zonesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-zonesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-zonesa.Tpo -c -o libMatrixOnes_la-zonesa.lo `test -f 'zonesa.c' || echo '$(srcdir)/'`zonesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-zonesa.Tpo $(DEPDIR)/libMatrixOnes_la-zonesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zonesa.c' object='libMatrixOnes_la-zonesa.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) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-zonesa.lo `test -f 'zonesa.c' || echo '$(srcdir)/'`zonesa.c + +testMatrixOnes-testMatrixOnes.o: testMatrixOnes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixOnes_CFLAGS) $(CFLAGS) -MT testMatrixOnes-testMatrixOnes.o -MD -MP -MF $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo -c -o testMatrixOnes-testMatrixOnes.o `test -f 'testMatrixOnes.c' || echo '$(srcdir)/'`testMatrixOnes.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo $(DEPDIR)/testMatrixOnes-testMatrixOnes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixOnes.c' object='testMatrixOnes-testMatrixOnes.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) $(testMatrixOnes_CFLAGS) $(CFLAGS) -c -o testMatrixOnes-testMatrixOnes.o `test -f 'testMatrixOnes.c' || echo '$(srcdir)/'`testMatrixOnes.c + +testMatrixOnes-testMatrixOnes.obj: testMatrixOnes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixOnes_CFLAGS) $(CFLAGS) -MT testMatrixOnes-testMatrixOnes.obj -MD -MP -MF $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo -c -o testMatrixOnes-testMatrixOnes.obj `if test -f 'testMatrixOnes.c'; then $(CYGPATH_W) 'testMatrixOnes.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixOnes.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo $(DEPDIR)/testMatrixOnes-testMatrixOnes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixOnes.c' object='testMatrixOnes-testMatrixOnes.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) $(testMatrixOnes_CFLAGS) $(CFLAGS) -c -o testMatrixOnes-testMatrixOnes.obj `if test -f 'testMatrixOnes.c'; then $(CYGPATH_W) 'testMatrixOnes.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixOnes.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/ones/conesa.c b/src/c/matrixOperations/ones/conesa.c new file mode 100644 index 0000000..f1cf2d8 --- /dev/null +++ b/src/c/matrixOperations/ones/conesa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "ones.h" + +void conesa ( floatComplex* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = FloatComplex ( 1.0f , 0); + + } + +} diff --git a/src/c/matrixOperations/ones/donesa.c b/src/c/matrixOperations/ones/donesa.c new file mode 100644 index 0000000..5380755 --- /dev/null +++ b/src/c/matrixOperations/ones/donesa.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "ones.h" + +void donesa ( double* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 1 ; + + } + +} + diff --git a/src/c/matrixOperations/ones/i16onesa.c b/src/c/matrixOperations/ones/i16onesa.c new file mode 100644 index 0000000..d8dee19 --- /dev/null +++ b/src/c/matrixOperations/ones/i16onesa.c @@ -0,0 +1,28 @@ +/* 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 "ones.h" + +void i16onesa ( int16* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (int16)1 ; + + } + +} + + + diff --git a/src/c/matrixOperations/ones/i8onesa.c b/src/c/matrixOperations/ones/i8onesa.c new file mode 100644 index 0000000..11b48bf --- /dev/null +++ b/src/c/matrixOperations/ones/i8onesa.c @@ -0,0 +1,28 @@ +/* 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 "ones.h" + +void i8onesa ( int8* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (int8)1 ; + + } + +} + + + diff --git a/src/c/matrixOperations/ones/sonesa.c b/src/c/matrixOperations/ones/sonesa.c new file mode 100644 index 0000000..fef8aa0 --- /dev/null +++ b/src/c/matrixOperations/ones/sonesa.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "ones.h" + +void sonesa ( float* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 1.0f ; + + } + +} + + + diff --git a/src/c/matrixOperations/ones/testMatrixOnes.c b/src/c/matrixOperations/ones/testMatrixOnes.c new file mode 100644 index 0000000..7668f30 --- /dev/null +++ b/src/c/matrixOperations/ones/testMatrixOnes.c @@ -0,0 +1,160 @@ +/* + * 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 +#include +#include + +#include "ones.h" + +#define ROWS 20 +#define COLS 50 + +static void donesaTest ( void ) +{ + int i = 0 ; + + double result = 0 ; + + double in [ROWS*COLS] ; + + donesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = 1 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + + if ( in[i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 3e-16 ) ; + } +} + + +static void sonesaTest ( void ) +{ + int i = 0 ; + + float result = 0 ; + + float in[ROWS*COLS] ; + + sonesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = 1.0f ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + if ( in[i] < 1e-6 && result < 1e-6 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 1e-6 ) ; + } +} + + +static void zonesaTest ( void ) +{ + int i = 0 ; + + doubleComplex result = DoubleComplex ( 0 , 0) ; + + doubleComplex in[ROWS*COLS] ; + + zonesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = DoubleComplex ( 1 , 0 ) ; + + + printf ( "\t\t %d in : %e %e*i\tresult : %e %e*i\n" , i, zreals( in[i]) , zimags(in[i]), zreals ( result ),zimags(result) ) ; + + if ( zreals( in[i]) < 1e-14 && zreals( result) < 1e-14 ) + assert(1); + else + assert ( fabs ( zreals(in[i]) - zreals(result)) / fabs( zreals(in[i])) < 1e-16 ) ; + + if ( zimags ( in[i]) < 1e-14 ) + assert (1); + else + assert (0); + + } +} + + + + + +static void conesaTest ( void ) +{ + int i = 0 ; + + floatComplex result = FloatComplex ( 0 , 0 ) ; + + floatComplex in[ROWS*COLS] ; + + conesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = FloatComplex ( 1.0f , 0 ) ; + + + printf ( "\t\t %d in : %e %e*i\tresult : %e %e*i\n" , i, creals( in[i]) , cimags(in[i]), creals ( result ),cimags(result) ) ; + if ( creals( in[i]) < 1e-6 && creals( result) < 1e-6 ) + assert(1); + else + assert ( fabs ( creals(in[i]) - creals(result)) / fabs( creals(in[i])) < 1e-6 ) ; + + if ( cimags ( in[i]) < 1e-6 ) + assert (1); + else + assert (0); + + } +} + + + +static int testEye(void) { + + printf("\n>>>> Matrix ONES Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + donesaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sonesaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + conesaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zonesaTest(); + + return 0; +} + + + +int main(void) { + assert(testEye() == 0); + return 0; +} + diff --git a/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj b/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj new file mode 100644 index 0000000..b37976e --- /dev/null +++ b/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D21BD764-EEC6-4474-9D4B-808EF2217CC4} + testMatrixOnes + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters b/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters new file mode 100644 index 0000000..56b655d --- /dev/null +++ b/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/ones/u16onesa.c b/src/c/matrixOperations/ones/u16onesa.c new file mode 100644 index 0000000..e91b5a7 --- /dev/null +++ b/src/c/matrixOperations/ones/u16onesa.c @@ -0,0 +1,28 @@ +/* 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 "ones.h" + +void u16onesa ( uint16* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (uint16)1 ; + + } + +} + + + diff --git a/src/c/matrixOperations/ones/u8onesa.c b/src/c/matrixOperations/ones/u8onesa.c new file mode 100644 index 0000000..be9a1bf --- /dev/null +++ b/src/c/matrixOperations/ones/u8onesa.c @@ -0,0 +1,28 @@ +/* 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 "ones.h" + +void u8onesa ( uint8* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (uint8)1 ; + + } + +} + + + diff --git a/src/c/matrixOperations/ones/zonesa.c b/src/c/matrixOperations/ones/zonesa.c new file mode 100644 index 0000000..a6364c0 --- /dev/null +++ b/src/c/matrixOperations/ones/zonesa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "ones.h" + +void zonesa ( doubleComplex* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = DoubleComplex ( 1 , 0); + + } + +} diff --git a/src/c/matrixOperations/powm/Makefile.am b/src/c/matrixOperations/powm/Makefile.am new file mode 100644 index 0000000..5f6ef26 --- /dev/null +++ b/src/c/matrixOperations/powm/Makefile.am @@ -0,0 +1,86 @@ +## +## 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 +## +## + +libMatrixPow_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixPow.la + +HEAD = ../includes/matrixPow.h + +libMatrixPow_la_SOURCES = $(HEAD) \ + spowma.c\ + dpowma.c\ + cpowma.c\ + zpowma.c + +check_PROGRAMS = testDoubleMatrixPow testFloatMatrixPow + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/expm/libMatrixExponential.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixPow.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixPow_SOURCES = testDoublePowm.c +testDoubleMatrixPow_LDADD = $(check_LDADD) +testDoubleMatrixPow_CFLAGS = $(check_INCLUDES) + +testFloatMatrixPow_SOURCES = testFloatPowm.c +testFloatMatrixPow_LDADD = $(check_LDADD) +testFloatMatrixPow_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleMatrixPow testFloatMatrixPow diff --git a/src/c/matrixOperations/powm/Makefile.in b/src/c/matrixOperations/powm/Makefile.in new file mode 100644 index 0000000..20e1660 --- /dev/null +++ b/src/c/matrixOperations/powm/Makefile.in @@ -0,0 +1,784 @@ +# 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 = testDoubleMatrixPow$(EXEEXT) \ + testFloatMatrixPow$(EXEEXT) +TESTS = testDoubleMatrixPow$(EXEEXT) testFloatMatrixPow$(EXEEXT) +subdir = src/c/matrixOperations/powm +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) +libMatrixPow_la_LIBADD = +am__objects_1 = +am_libMatrixPow_la_OBJECTS = $(am__objects_1) \ + libMatrixPow_la-spowma.lo libMatrixPow_la-dpowma.lo \ + libMatrixPow_la-cpowma.lo libMatrixPow_la-zpowma.lo +libMatrixPow_la_OBJECTS = $(am_libMatrixPow_la_OBJECTS) +libMatrixPow_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixPow_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMatrixPow_OBJECTS = \ + testDoubleMatrixPow-testDoublePowm.$(OBJEXT) +testDoubleMatrixPow_OBJECTS = $(am_testDoubleMatrixPow_OBJECTS) +testDoubleMatrixPow_DEPENDENCIES = $(check_LDADD) +testDoubleMatrixPow_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testFloatMatrixPow_OBJECTS = \ + testFloatMatrixPow-testFloatPowm.$(OBJEXT) +testFloatMatrixPow_OBJECTS = $(am_testFloatMatrixPow_OBJECTS) +testFloatMatrixPow_DEPENDENCIES = $(check_LDADD) +testFloatMatrixPow_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatMatrixPow_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 = $(libMatrixPow_la_SOURCES) $(testDoubleMatrixPow_SOURCES) \ + $(testFloatMatrixPow_SOURCES) +DIST_SOURCES = $(libMatrixPow_la_SOURCES) \ + $(testDoubleMatrixPow_SOURCES) $(testFloatMatrixPow_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@ +libMatrixPow_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixPow.la +HEAD = ../includes/matrixPow.h +libMatrixPow_la_SOURCES = $(HEAD) \ + spowma.c\ + dpowma.c\ + cpowma.c\ + zpowma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/expm/libMatrixExponential.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixPow.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixPow_SOURCES = testDoublePowm.c +testDoubleMatrixPow_LDADD = $(check_LDADD) +testDoubleMatrixPow_CFLAGS = $(check_INCLUDES) +testFloatMatrixPow_SOURCES = testFloatPowm.c +testFloatMatrixPow_LDADD = $(check_LDADD) +testFloatMatrixPow_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/powm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/powm/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 +libMatrixPow.la: $(libMatrixPow_la_OBJECTS) $(libMatrixPow_la_DEPENDENCIES) + $(libMatrixPow_la_LINK) -rpath $(pkglibdir) $(libMatrixPow_la_OBJECTS) $(libMatrixPow_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 +testDoubleMatrixPow$(EXEEXT): $(testDoubleMatrixPow_OBJECTS) $(testDoubleMatrixPow_DEPENDENCIES) + @rm -f testDoubleMatrixPow$(EXEEXT) + $(testDoubleMatrixPow_LINK) $(testDoubleMatrixPow_OBJECTS) $(testDoubleMatrixPow_LDADD) $(LIBS) +testFloatMatrixPow$(EXEEXT): $(testFloatMatrixPow_OBJECTS) $(testFloatMatrixPow_DEPENDENCIES) + @rm -f testFloatMatrixPow$(EXEEXT) + $(testFloatMatrixPow_LINK) $(testFloatMatrixPow_OBJECTS) $(testFloatMatrixPow_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-cpowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-dpowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-spowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-zpowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMatrixPow-testFloatPowm.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 $@ $< + +libMatrixPow_la-spowma.lo: spowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-spowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-spowma.Tpo -c -o libMatrixPow_la-spowma.lo `test -f 'spowma.c' || echo '$(srcdir)/'`spowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-spowma.Tpo $(DEPDIR)/libMatrixPow_la-spowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spowma.c' object='libMatrixPow_la-spowma.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) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-spowma.lo `test -f 'spowma.c' || echo '$(srcdir)/'`spowma.c + +libMatrixPow_la-dpowma.lo: dpowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-dpowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-dpowma.Tpo -c -o libMatrixPow_la-dpowma.lo `test -f 'dpowma.c' || echo '$(srcdir)/'`dpowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-dpowma.Tpo $(DEPDIR)/libMatrixPow_la-dpowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpowma.c' object='libMatrixPow_la-dpowma.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) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-dpowma.lo `test -f 'dpowma.c' || echo '$(srcdir)/'`dpowma.c + +libMatrixPow_la-cpowma.lo: cpowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-cpowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-cpowma.Tpo -c -o libMatrixPow_la-cpowma.lo `test -f 'cpowma.c' || echo '$(srcdir)/'`cpowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-cpowma.Tpo $(DEPDIR)/libMatrixPow_la-cpowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpowma.c' object='libMatrixPow_la-cpowma.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) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-cpowma.lo `test -f 'cpowma.c' || echo '$(srcdir)/'`cpowma.c + +libMatrixPow_la-zpowma.lo: zpowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-zpowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-zpowma.Tpo -c -o libMatrixPow_la-zpowma.lo `test -f 'zpowma.c' || echo '$(srcdir)/'`zpowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-zpowma.Tpo $(DEPDIR)/libMatrixPow_la-zpowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zpowma.c' object='libMatrixPow_la-zpowma.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) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-zpowma.lo `test -f 'zpowma.c' || echo '$(srcdir)/'`zpowma.c + +testDoubleMatrixPow-testDoublePowm.o: testDoublePowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -MT testDoubleMatrixPow-testDoublePowm.o -MD -MP -MF $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo -c -o testDoubleMatrixPow-testDoublePowm.o `test -f 'testDoublePowm.c' || echo '$(srcdir)/'`testDoublePowm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoublePowm.c' object='testDoubleMatrixPow-testDoublePowm.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) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixPow-testDoublePowm.o `test -f 'testDoublePowm.c' || echo '$(srcdir)/'`testDoublePowm.c + +testDoubleMatrixPow-testDoublePowm.obj: testDoublePowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -MT testDoubleMatrixPow-testDoublePowm.obj -MD -MP -MF $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo -c -o testDoubleMatrixPow-testDoublePowm.obj `if test -f 'testDoublePowm.c'; then $(CYGPATH_W) 'testDoublePowm.c'; else $(CYGPATH_W) '$(srcdir)/testDoublePowm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoublePowm.c' object='testDoubleMatrixPow-testDoublePowm.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) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixPow-testDoublePowm.obj `if test -f 'testDoublePowm.c'; then $(CYGPATH_W) 'testDoublePowm.c'; else $(CYGPATH_W) '$(srcdir)/testDoublePowm.c'; fi` + +testFloatMatrixPow-testFloatPowm.o: testFloatPowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -MT testFloatMatrixPow-testFloatPowm.o -MD -MP -MF $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo -c -o testFloatMatrixPow-testFloatPowm.o `test -f 'testFloatPowm.c' || echo '$(srcdir)/'`testFloatPowm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatPowm.c' object='testFloatMatrixPow-testFloatPowm.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) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -c -o testFloatMatrixPow-testFloatPowm.o `test -f 'testFloatPowm.c' || echo '$(srcdir)/'`testFloatPowm.c + +testFloatMatrixPow-testFloatPowm.obj: testFloatPowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -MT testFloatMatrixPow-testFloatPowm.obj -MD -MP -MF $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo -c -o testFloatMatrixPow-testFloatPowm.obj `if test -f 'testFloatPowm.c'; then $(CYGPATH_W) 'testFloatPowm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatPowm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatPowm.c' object='testFloatMatrixPow-testFloatPowm.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) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -c -o testFloatMatrixPow-testFloatPowm.obj `if test -f 'testFloatPowm.c'; then $(CYGPATH_W) 'testFloatPowm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatPowm.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/powm/cpowma.c b/src/c/matrixOperations/powm/cpowma.c new file mode 100644 index 0000000..d023a7a --- /dev/null +++ b/src/c/matrixOperations/powm/cpowma.c @@ -0,0 +1,64 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void cpowma(floatComplex* in, int rows, floatComplex power, floatComplex* out){ + int i=0, j=0; + int hermitian=0; + floatComplex *eigenvalues,*eigenvectors,*tmp; + + /* Data initialization */ + eigenvalues = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + eigenvectors = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + tmp = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + + /* symmetric test*/ + for(i=0;i +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "zeros.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void dpowma(double* in, int rows, double power, double* out){ + int i=0, j=0; + int symmetric=0; + doubleComplex *eigenvalues,*eigenvectors,*tmp; + double* ZEROS; + + /* Data initialization */ + eigenvalues = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + eigenvectors = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + tmp = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + ZEROS=(double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + + /* symmetric test*/ + for(i=0;i +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "zeros.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void spowma(float* in, int rows, float power, float* out){ + int i=0, j=0; + int symmetric=0; + floatComplex *eigenvalues,*eigenvectors,*tmp; + float* ZEROS; + + /* Data initialization */ + eigenvalues = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + eigenvectors = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + tmp = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + ZEROS = (float*)malloc((unsigned int)(rows*rows)*sizeof(float)); + + /* symmetric test*/ + for(i=0;i +#include +#include + + +static void dpowmaTest(void){ + double in1[4]={1,5,4,2}; + double expand1=2.2; + double result1R[4]={ 27.93459280052221771484 , 23.580294119266994812278 , + 18.864235295413593007652 , 32.650651624375619519469 }; + double out1[4]; + int i; + + double in2[16]={ 2.5358983855694532394409 , 9.0725262500345706939697, 0.0026536155492067337036, 3.9639251008629798889160 , + 7.9845732506364583969116, 7.5407014600932598114014, 10.196942830458283424377 , 8.2287722378969192504883 , + 10.538597775623202323914, 0.8204884417355060577393, 6.7301832754164934158325, 7.9482832476496696472168, + 8.7162081208080053329468 , 2.3821726106107234954834 , 6.5310877952724695205688, 2.784897476434707641602 }; + double expand2 = 3.4683557949028909206390; + double result2R[16]={13801.893971410685480805 , 9622.6108799100766191259 , 10325.586569611912636901, 10694.791005280343597406 , + 24728.411825244897045195 , 18392.823733925368287601 , 18631.05868385956637212 , 19357.84707477861229563 , + 16169.682243927050876664 , 12258.542785024719705689 , 12630.164466338968850323 , 12827.915677254180991440 , + 13742.841851328515986097 , 10198.0420642120679986 , 10658.784670951883526868 , 10839.51135004585739807 }; + double out2[16]; + + + dpowma(in1, 2, expand1, out1); + dpowma(in2, 4, expand2, out2); + + for (i=0;i<4;i++) { + assert( fabs(out1[i]-result1R[i]) / fabs(out1[i]) <3e-15); + } + + for (i=0;i<16;i++) { + assert( fabs(out2[i]-result2R[i]) / fabs(out2[i]) <3e-14); + } + +} + +/* FIXME : assert 1e-14 */ +static void zpowmaTest(void){ + /* Tests 1 */ + { + double inR[9]={1,2,3,4,5,6,7,8,9}; + double inI[9]={1,2,3,4,5,6,7,8,9}; + double resultR[9]={- 4.7115011361608578610571,- 2.0782061409646632732517,0.5550888542315330909105, + - 2.3202132490900626571317,- 2.4412168031527574640904,- 2.5622203572154611528333, + 0.0710746379807356554181,- 2.80422746534086453352,- 5.6795295686624518438634}; + double resultI[9]={- 12.188702380084603049681,- 4.0827818504168584823333,4.0231386792508754268738, + - 3.0919079733956360556135,- 2.5964710348850239540752,- 2.1010340963744131848046, + 6.0048864332933264975622,- 1.1101602193531934226201,- 8.2252068719997026846613}; + doubleComplex *in,out[9]; + int i; + + in=DoubleComplexMatrix(inR,inI,9); + + zpowma(in, 3, DoubleComplex(1,1), out); + + for (i=0;i<9;i++) printf("out[%d] = %f+%f*i\n",i,zreals(out[i]),zimags(out[i])); + + for (i=0;i<9;i++){ + assert( (fabs(zreals(out[i])-resultR[i])/ fabs(zreals(out[i])) ) <3e-13); + assert( (fabs(zimags(out[i])-resultI[i])/ fabs(zimags(out[i])) ) <3e-13); + } + } + + /* Tests 2 and 3 */ + { + double in1R[4]={1,5,4,2}; + double in1I[4]={0}; + double expand1=2.2; + double result1R[4]={ 27.93459280052221771484 , 23.580294119266994812278 , + 18.864235295413593007652 , 32.650651624375619519469 }; + double result1I[4]={ 3.6611113731522362257920 , - 3.6611113731522362257920 , + - 2.9288890985217883589087 , 2.9288890985217883589087 }; + doubleComplex out1[4]; + int i; + + double in2R[16]={ 2.5358983855694532394409 , 9.0725262500345706939697, 0.0026536155492067337036, 3.9639251008629798889160 , + 7.9845732506364583969116, 7.5407014600932598114014, 10.196942830458283424377 , 8.2287722378969192504883 , + 10.538597775623202323914, 0.8204884417355060577393, 6.7301832754164934158325, 7.9482832476496696472168, + 8.7162081208080053329468 , 2.3821726106107234954834 , 6.5310877952724695205688, 2.784897476434707641602 }; + double in2I[16]={0}; + double expand2 = 3.4683557949028909206390; + double result2R[16]={13801.893971410685480805 , 9622.6108799100766191259 , 10325.586569611912636901, 10694.791005280343597406 , + 24728.411825244897045195 , 18392.823733925368287601 , 18631.05868385956637212 , 19357.84707477861229563 , + 16169.682243927050876664 , 12258.542785024719705689 , 12630.164466338968850323 , 12827.915677254180991440 , + 13742.841851328515986097 , 10198.0420642120679986 , 10658.784670951883526868 , 10839.51135004585739807 }; + double result2I[16]={ - 7.1981835972120027378196 , 1.9386514637886893552832, - 17.692616672339234185074 , 24.561537532538231687340 , + - 2.2418859631076406557781 , 0.6037961445855435371755, - 5.5103941755046683681485, 7.649730724813480264857 , + - 4.865855522250573272913 , 1.310496989059492634056 , - 11.95992230200565309417 , 16.603201547139228466676 , + 16.00935601900000193609 , - 4.3117212921047043394651 , 39.34984366402868971591 , - 54.626892107189902958453 }; + doubleComplex out2[16]; + doubleComplex *in1,*in2; + + + in1=DoubleComplexMatrix(in1R,in1I,4); + in2=DoubleComplexMatrix(in2R,in2I,16); + + zpowma(in1, 2, DoubleComplex(expand1,0), out1); + zpowma(in2, 4, DoubleComplex(expand2,0), out2); + + for (i=0;i<4;i++) { + assert( fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i])) <3e-15); + assert( fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i])) <3e-15); + } + + /* + FIXME : assert 1e-11 maybe due to spec2 + */ + for (i=0;i<16;i++) { + printf("out[%d] = %1.16f+%1.16f*i --- result = %1.16f+%1.16f*i\n",i,zreals(out2[i]),zimags(out2[i]),result2R[i],result2I[i]); + assert( fabs(zreals(out2[i])-result2R[i]) / fabs(zreals(out2[i])) <3e-11); + assert( fabs(zimags(out2[i])-result2I[i]) / fabs(zimags(out2[i])) <3e-11); + } + } + +} + + +int main(void){ + dpowmaTest(); + zpowmaTest(); + return 0; +} + diff --git a/src/c/matrixOperations/powm/testFloatPowm.c b/src/c/matrixOperations/powm/testFloatPowm.c new file mode 100644 index 0000000..4b4b016 --- /dev/null +++ b/src/c/matrixOperations/powm/testFloatPowm.c @@ -0,0 +1,136 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixPow.h" +#include +#include +#include + + +static void spowmaTest(void){ + float in1[4]={1,5,4,2}; + float expand1=2.2f; + float result1R[4]={ 27.93459280052221771484f , 23.580294119266994812278f , + 18.864235295413593007652f , 32.650651624375619519469f }; + float out1[4]; + int i; + + float in2[16]={ 2.5358983855694532394409f , 9.0725262500345706939697f, 0.0026536155492067337036f, 3.9639251008629798889160f , + 7.9845732506364583969116f, 7.5407014600932598114014f, 10.196942830458283424377f , 8.2287722378969192504883f , + 10.538597775623202323914f, 0.8204884417355060577393f, 6.7301832754164934158325f, 7.9482832476496696472168f, + 8.7162081208080053329468f , 2.3821726106107234954834f , 6.5310877952724695205688f, 2.784897476434707641602f }; + float expand2 = 3.4683557949028909206390f; + float result2R[16]={13801.893971410685480805f , 9622.6108799100766191259f , 10325.586569611912636901f, 10694.791005280343597406f , + 24728.411825244897045195f , 18392.823733925368287601f , 18631.05868385956637212f , 19357.84707477861229563f , + 16169.682243927050876664f , 12258.542785024719705689f , 12630.164466338968850323f , 12827.915677254180991440f , + 13742.841851328515986097f , 10198.0420642120679986f , 10658.784670951883526868f , 10839.51135004585739807f }; + float out2[16]; + + + spowma(in1, 2, expand1, out1); + spowma(in2, 4, expand2, out2); + + for (i=0;i<4;i++) { + assert( fabs(out1[i]-result1R[i]) / fabs(out1[i]) <1e-6); + } + + + for (i=0;i<16;i++) { + + assert( fabs(out2[i]-result2R[i]) / fabs(out2[i]) <1e-6); + } + +} + +static void cpowmaTest(void){ + + + { + float inR[9]={1,2,3,4,5,6,7,8,9}; + float inI[9]={1,2,3,4,5,6,7,8,9}; + float resultR[9]={- 4.7115011361608578610571f,- 2.0782061409646632732517f,0.5550888542315330909105f, + - 2.3202132490900626571317f,- 2.4412168031527574640904f,- 2.5622203572154611528333f, + 0.0710746379807356554181f,- 2.80422746534086453352f,- 5.6795295686624518438634f}; + float resultI[9]={- 12.188702380084603049681f,- 4.0827818504168584823333f,4.0231386792508754268738f, + - 3.0919079733956360556135f,- 2.5964710348850239540752f,- 2.1010340963744131848046f, + 6.0048864332933264975622f,- 1.1101602193531934226201f,- 8.2252068719997026846613f}; + floatComplex *in,out[9]; + int i; + + in=FloatComplexMatrix(inR,inI,9); + + cpowma(in, 3, FloatComplex(1,1), out); + + for (i=0;i<9;i++) printf("out[%d] = %f+%f*i\n",i,creals(out[i]),cimags(out[i])); + + for (i=0;i<9;i++){ + assert( (fabs(creals(out[i])-resultR[i])/ fabs(creals(out[i])) ) <3e-5); + assert( (fabs(cimags(out[i])-resultI[i])/ fabs(cimags(out[i])) ) <1e-6); + } + } + + + { + + float in1R[4]={1,5,4,2}; + float in1I[4]={0}; + float expand1=2.2f; + float result1R[4]={ 27.93459280052221771484f , 23.580294119266994812278f , + 18.864235295413593007652f , 32.650651624375619519469f }; + float result1I[4]={ 3.6611113731522362257920f , - 3.6611113731522362257920f , + - 2.9288890985217883589087f , 2.9288890985217883589087f }; + floatComplex out1[4]; + int i; + + float in2R[16]={ 2.5358983855694532394409f , 9.0725262500345706939697f, 0.0026536155492067337036f, 3.9639251008629798889160f , + 7.9845732506364583969116f, 7.5407014600932598114014f, 10.196942830458283424377f , 8.2287722378969192504883f , + 10.538597775623202323914f, 0.8204884417355060577393f, 6.7301832754164934158325f, 7.9482832476496696472168f, + 8.7162081208080053329468f , 2.3821726106107234954834f , 6.5310877952724695205688f, 2.784897476434707641602f }; + float in2I[16]={0}; + float expand2 = 3.4683557949028909206390f; + float result2R[16]={13801.893971410685480805f , 9622.6108799100766191259f , 10325.586569611912636901f, 10694.791005280343597406f , + 24728.411825244897045195f , 18392.823733925368287601f , 18631.05868385956637212f , 19357.84707477861229563f , + 16169.682243927050876664f , 12258.542785024719705689f , 12630.164466338968850323f , 12827.915677254180991440f , + 13742.841851328515986097f , 10198.0420642120679986f , 10658.784670951883526868f , 10839.51135004585739807f }; + float result2I[16]={ - 7.1981835972120027378196f , 1.9386514637886893552832f, - 17.692616672339234185074f , 24.561537532538231687340f , + - 2.2418859631076406557781f , 0.6037961445855435371755f, - 5.5103941755046683681485f, 7.649730724813480264857f , + - 4.865855522250573272913f , 1.310496989059492634056f , - 11.95992230200565309417f , 16.603201547139228466676f , + 16.00935601900000193609f , - 4.3117212921047043394651f , 39.34984366402868971591f , - 54.626892107189902958453f }; + floatComplex out2[16]; + floatComplex *in1,*in2; + + in1=FloatComplexMatrix(in1R,in1I,4); + in2=FloatComplexMatrix(in2R,in2I,16); + + + cpowma(in1, 2, FloatComplex(expand1,0), out1); + cpowma(in2, 4, FloatComplex(expand2,0), out2); + + for (i=0;i<4;i++) { + assert( fabs(creals(out1[i])-result1R[i]) / fabs(creals(out1[i])) <1e-6); + assert( fabs(cimags(out1[i])-result1I[i]) / fabs(cimags(out1[i])) <1e-6); + } + + + for (i=0;i<16;i++) { + assert( fabs(creals(out2[i])-result2R[i]) / fabs(creals(out2[i])) <1e-6); + assert( fabs(cimags(out2[i])-result2I[i]) / fabs(cimags(out2[i])) <1e-6); + } + } +} + + +int main(void){ + spowmaTest(); + cpowmaTest(); + return 0; +} diff --git a/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj b/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj new file mode 100644 index 0000000..354d990 --- /dev/null +++ b/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D83A0994-57A0-4C17-89DF-EDE84450C202} + testDoublePowm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters b/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters new file mode 100644 index 0000000..9f939c4 --- /dev/null +++ b/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj b/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj new file mode 100644 index 0000000..38e4637 --- /dev/null +++ b/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8594ACB2-D3C8-4D3A-B905-794354A8A0CC} + testFloatPowm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters b/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters new file mode 100644 index 0000000..d06b1ae --- /dev/null +++ b/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/powm/zpowma.c b/src/c/matrixOperations/powm/zpowma.c new file mode 100644 index 0000000..0de5647 --- /dev/null +++ b/src/c/matrixOperations/powm/zpowma.c @@ -0,0 +1,64 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void zpowma(doubleComplex* in, int rows, doubleComplex power, doubleComplex* out){ + int i=0, j=0; + int hermitian=0; + doubleComplex *eigenvalues,*eigenvectors,*tmp; + + /* Data initialization */ + eigenvalues = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + eigenvectors = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + tmp = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + /* hermitian test*/ + for(i=0;i +#include "spec.h" + + + +void cspeca(floatComplex* in, int rows, floatComplex* out){ + /* As we use Lapack to find the eigenvalues, we must cast the floatComplex input into doubleComplex + and the doubleComplex output of dspeca into floatComplex*/ + + int i; + doubleComplex* dblin; + doubleComplex* dblout; + + dblin=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + dblout=(doubleComplex*)malloc((unsigned int)rows*sizeof(doubleComplex)); + + for (i=0;i +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "max.h" + +void dspeca(double* in, int rows,double* out){ + int i=0, j=0; + int symmetric=0; + int INFO=0; + int iWorkSize = 0; + double* pdblWork; + double* outReal; + double* outImag; + double* pdblLeftvectors; + double* pdblRightvectors; + double* inCopy; + + inCopy = (double*)malloc((unsigned int)(rows*rows) * sizeof(double)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + + iWorkSize = 3*rows; + pdblWork = (double*)malloc((unsigned int)iWorkSize * sizeof(double)); + + for(i=0;i +#include "spec.h" + + + +void sspeca(float* in, int rows, float* out){ + /* As we use Lapack to find the eigenvalues, we must cast the float input into double + and the doubleComplex output of dspeca into floatComplex*/ + + int i; + double* dblin; + double* dblout; + + dblin=(double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + dblout=(double*)malloc((unsigned int)rows*sizeof(double)); + + for (i=0;i +#include "spec.h" +#include "stdio.h" +#include "assert.h" +#include "math.h" + +static void dspecaTest(void){ + double in[4]={1,1,1,3}; + double resultR[2]={0.5857864376269050765700,3.4142135623730949234300}; + + + double *out; + + int i; + + out=(double*)malloc((unsigned int)2*sizeof(double)); + + dspeca(in,2,out); + for(i=0;i<2;i++){ + if (out[i]>1e-16) assert( fabs(out[i]-resultR[i]) / fabs(out[i]) <3e-16); + else assert(1); + } + +} + + + + +static void zspecaTest(void){ + double inR[4]={1,1,1,3}; + double inI[4]={0,0,0,0}; + double resultR[2]={0.5857864376269050765700,3.4142135623730949234300}; + double resultI[2]={0,0}; + + double in2R[4]={1,1,-2,3}; + double in2I[4]={0,0,0,0}; + double result2R[2]={1.9999999999999997779554,1.9999999999999997779554}; + double result2I[2]={0.9999999999999997779554,-0.9999999999999997779554}; + + double in3R[16]={0.0603054538369178771973,0.631347181741148233414 ,0.0241030259057879447937,0.1527438252232968807221, + 0.9481177683919668197632,0.2744265575893223285675,0.4794727200642228126526,0.485576837789267301559, + 0.676400367170572280884,0.8321249918080866336823,0.0125875836238265037537,0.5453779897652566432953, + 0.8426716942340135574341,0.9029165101237595081329,0.4409482078626751899719,0.8332359003834426403046 }; + double in3I[16]={0.7233976423740386962891,0.4377150186337530612946,0.3080607382580637931824,0.8749813153408467769623, + 0.5355882328003644943237 ,0.3085998897440731525421,0.3354632416740059852600,0.2342486302368342876434, + 0.2589411698281764984131,0.8521509231068193912506,0.4821739485487341880798,0.6095217890106141567230, + 0.9872822705656290054321,0.9811426815576851367950,0.3303113700821995735169,0.3589145573787391185761}; + double result3R[4]={1.9486046375762748894545,0.2315060459861970343365,- 0.7694743345806510648188,- 0.2300808535483104266817}; + double result3I[4]={2.1242015857341254303492,- 0.4115101262891645017561,- 0.1980716835789462781925,0.3584662621795701720195}; + + doubleComplex *in,*in2,*in3,out[2],out2[4]; + + int i; + + in=DoubleComplexMatrix(inR,inI,4); + in2=DoubleComplexMatrix(in2R,in2I,4); + in3=DoubleComplexMatrix(in3R,in3I,16); + + zspeca(in,2,out); + for(i=0;i<2;i++){ + if (zreals(out[i])>1e-16) assert( fabs(zreals(out[i])-resultR[i]) / fabs(zreals(out[i])) <3e-16); + else assert(1); + if (zimags(out[i])>1e-16) assert( fabs(zimags(out[i])-resultI[i]) / fabs(zimags(out[i])) <1e-16); + else assert(1); + } + + + zspeca(in2,2,out); + for(i=0;i<2;i++){ + if (zreals(out[i])>1e-16) assert( fabs(zreals(out[i])-result2R[i]) / fabs(zreals(out[i])) <3e-16); + else assert(1); + if (zimags(out[i])>1e-16) assert( fabs(zimags(out[i])-result2I[i]) / fabs(zimags(out[i])) <3e-15); + else assert(1); + } + + + zspeca(in3,4,out2); + for(i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-result3R[i]) / fabs(zreals(out2[i])) <3e-15); + else assert(1); + if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-result3I[i]) / fabs(zimags(out2[i])) <3e-15); + else assert(1); + } + + +} + + +static int testSpec(void){ + printf(">>> Double Spec Tests <<<\n"); + printf(">>> Double <<<\n"); + dspecaTest(); + printf(">>> DoubleComplex <<<\n"); + zspecaTest(); + return 0; +} + + +int main(void){ + assert (testSpec()==0); + + + return 0; +} diff --git a/src/c/matrixOperations/spec/testFloatSpec.c b/src/c/matrixOperations/spec/testFloatSpec.c new file mode 100644 index 0000000..9bd46ad --- /dev/null +++ b/src/c/matrixOperations/spec/testFloatSpec.c @@ -0,0 +1,110 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "spec.h" +#include "stdio.h" +#include "assert.h" +#include "math.h" + +static void sspecaTest(void){ + float in[4]={1.0f,1.0f,1.0f,3.0f}; + float resultR[2]={0.5857864376269050765700f,3.4142135623730949234300f}; + + float in1[4]={0.0f,4.0f,1.0f,0.0f}; + float result[2]={2.0f,-2.0f}; + + float in2[4]={1.0f,1.0f,-2.0f,3.0f}; + + float *out; + + int i; + + out=(float *)malloc((unsigned int)2*sizeof(float)); + + sspeca(in,2,out); + for (i=0;i<2;i++) printf("%f\n",out[i]); + for(i=0;i<2;i++){ + if (out[i]>1e-16) assert( fabs(out[i]-resultR[i]) / fabs(out[i]) <1e-16); + else assert(1); + } + + + sspeca(in1,2,out); + for (i=0;i<2;i++) printf("%f\n",out[i]); + for(i=0;i<2;i++){ + if (out[i]>1e-16) assert( fabs(out[i]-result[i]) / fabs(out[i]) <1e-16); + else assert(1); + } + + sspeca(in2,2,out); + for (i=0;i<2;i++) printf("%f\n",out[i]); + +} + + +static void cspecaTest(void){ + float inR[4]={1.0f,1.0f,1.0f,3.0f}; + float inI[4]={0.0f,0.0f,0.0f,0.0f}; + float resultR[2]={0.5857864376269050765700f,3.4142135623730949234300f}; + float resultI[2]={0,0}; + + float in2R[4]={1.0f,1.0f,-2.0f,3.0f}; + float in2I[4]={0.0f,0.0f,0.0f,0.0f}; + float result2R[2]={1.9999999999999997779554f,1.9999999999999997779554f}; + float result2I[2]={0.9999999999999997779554f,-0.9999999999999997779554f}; + + floatComplex *in,*in2,out[4]; + + int i; + + in=FloatComplexMatrix(inR,inI,4); + in2=FloatComplexMatrix(in2R,in2I,4); + + cspeca(in,2,out); + for(i=0;i<2;i++){ + if (creals(out[i])>1e-16) assert( fabs(creals(out[i])-resultR[i]) / fabs(creals(out[i])) <1e-15); + else assert(1); + if (cimags(out[i])>1e-16) assert( fabs(cimags(out[i])-resultI[i]) / fabs(cimags(out[i])) <1e-16); + else assert(1); + } + + + cspeca(in2,2,out); + for(i=0;i<2;i++){ + if (creals(out[i])>1e-16) assert( fabs(creals(out[i])-result2R[i]) / fabs(creals(out[i])) <1e-15); + else assert(1); + if (cimags(out[i])>1e-16) assert( fabs(cimags(out[i])-result2I[i]) / fabs(cimags(out[i])) <1e-15); + else assert(1); + } + +} + + + + +static int testSpec(void){ + printf(">>> Float Spec Tests <<<\n"); + printf(">>> Float <<<\n"); + sspecaTest(); + printf(">>> FloatComplex <<<\n"); + cspecaTest(); + return 0; +} + + +int main(void){ + assert (testSpec()==0); + + + return 0; +} diff --git a/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj b/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj new file mode 100644 index 0000000..f696bff --- /dev/null +++ b/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {651B0E61-1047-4575-BE31-D9CB28062CBA} + testDoubleSpec + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters b/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters new file mode 100644 index 0000000..dcdaea5 --- /dev/null +++ b/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj b/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj new file mode 100644 index 0000000..0631bb4 --- /dev/null +++ b/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B7BEF8A2-3E42-4FA3-94A7-22618594057D} + testFloatSpec + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters b/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters new file mode 100644 index 0000000..2ba2e59 --- /dev/null +++ b/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec/zspeca.c b/src/c/matrixOperations/spec/zspeca.c new file mode 100644 index 0000000..a2b1c25 --- /dev/null +++ b/src/c/matrixOperations/spec/zspeca.c @@ -0,0 +1,80 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "conj.h" + +void zspeca(doubleComplex* in, int rows,doubleComplex* out){ + int i = 0, j = 0; + int hermitian = 0; + int INFO = 0; + int iWorkSize = 0; + doubleComplex* pdblWork; + doubleComplex* pdblLeftvectors; + doubleComplex* pdblRightvectors; + doubleComplex* pdblRWork; + double* outReal; + double* outImag; + doubleComplex* inCopy; + + inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + iWorkSize = 2*rows; + pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex)); + pdblRWork = (doubleComplex*)malloc((unsigned int)(3*rows) * sizeof(doubleComplex)); + + for(i=0;i +#include "spec.h" + + + +void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors){ + /* As we use Lapack to find the eigenvalues, we must cast the floatComplex input into doubleComplex + and the doubleComplex outputs of dspeca into floatComplex*/ + + int i; + doubleComplex* dblin; + doubleComplex* dbleigenvalues,*dbleigenvectors; + + dblin=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + dbleigenvalues=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + dbleigenvectors=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for (i=0;i +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "max.h" + +void dspec2a(double* in, int rows,double* eigenvalues,double* eigenvectors){ + int i=0, j=0, ij=0, ij1=0; + int symmetric=0; + int INFO=0; + int iWorkSize = 0; + double* pdblWork; + double* outReal; + double* outImag; + double* pdblLeftvectors; + double* pdblRightvectors; + double* inCopy; + + /* FIXME : malloc here */ + inCopy = (double*)malloc((unsigned int)(rows*rows) * sizeof(double)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = NULL; + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + + iWorkSize = 4*rows; + pdblWork = (double*)malloc((unsigned int)iWorkSize * sizeof(double)); + + for(i=0;i +#include "spec.h" + + + +void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors){ + /* As we use Lapack to find the eigenvalues, we must cast the float input into double + and the doubleComplex outputs of dspec2a into floatComplex*/ + + int i; + double* dblin; + double *dbleigenvalues,*dbleigenvectors; + + dblin=(double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + dbleigenvalues = (double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + dbleigenvectors = (double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + + for (i=0;i1e-16) assert( fabs(out3[i]-resultValues3R[i]) / fabs(out3[i]) <3e-16); + else assert(1); + } + for(i=0;i<9;i++){ + if (out4[i]>1e-16) assert( fabs(out4[i]-resultVectors3R[i]) / fabs(out4[i]) <3e-16); + else assert(1); + } + + + dspec2a(in,2,out1,out2); + for(i=0;i<4;i++) printf("%f\n",out1[i]); + for(i=0;i<4;i++){ + if (out1[i]>1e-16) assert( fabs(out1[i]-resultValuesR[i]) / fabs(out1[i]) <3e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (out2[i]>1e-16) assert( fabs(out2[i]-resultVectorsR[i]) / fabs(out2[i]) <3e-16); + else assert(1); + } + + + dspec2a(in2,2,out1,out2); + + for(i=0;i<4;i++){ + if (out1[i]>1e-16) assert( fabs(out1[i]-resultValues2R[i]) / fabs(out1[i]) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (out2[i]>1e-16) assert( fabs(out2[i]-resultVectors2R[i]) / fabs(out2[i]) <3e-16); + else assert(1); + } + +} + + + + +static void zspec2aTest(void){ + double inR[4]={1,1,1,3}; + double inI[4]={0,0,0,0}; + double resultValuesR[4]={0.5857864376269050765700,0,0,3.4142135623730949234300}; + double resultValuesI[4]={0,0,0,0}; + double resultVectorsR[4]={- 0.9238795325112867384831,0.3826834323650897817792, + 0.3826834323650897817792,0.9238795325112867384831}; + double resultVectorsI[4]={0,0,0,0}; + + double in2R[4]={1,1,-2,3}; + double in2I[4]={0,0,0,0}; + double resultValues2R[4]={1.9999999999999997779554,0,0,1.9999999999999997779554}; + double resultValues2I[4]={0.9999999999999997779554,0,0,-0.9999999999999997779554}; + double resultVectors2R[4]={0.8164965809277261454824,- 0.4082482904638631282523, + 0.8164965809277261454824,- 0.4082482904638631282523}; + double resultVectors2I[4]={0,- 0.4082482904638629062077,0,0.4082482904638629062077}; + + + double in3R[16]={ 0.4685934986919164657593, 0.4262020816095173358917, 0.4217656338587403297424, 0.1034853602759540081024 , + 0.4279759414494037628174, 0.7860729382373392581940, 0.8568082069978117942810, 0.1993437460623681545258 , + 0.7131301630288362503052, 0.5208952468819916248322, 0.9311723159626126289368, 0.4143836158327758312225, + 0.5980196148157119750977, 0.5549105503596365451813, 0.8552952585741877555847, 0.3097750707529485225678}; + double in3I[16]={0.9446128141134977340698, 0.2442680452950298786163, 0.8760446915403008460999, 0.4874215493910014629364, + 0.3844018988311290740967, 0.0922345430590212345123, 0.0705418726429343223572, 0.7338807261548936367035, + 0.7792180571705102920532, 0.7827638057060539722443, 0.2161567779257893562317, 0.3420197847299277782440, + 0.430093832314014434814 , 0.6261752569116652011871, 0.9554250938817858695984, 0.45415506651625037193 }; + double resultValues3R[16]={2.0556597713281337114211 , 0. , 0. , 0. , + 0. , - 0.3025728286579054682193 , 0. , 0. , + 0. , 0. , 0.1432776981289703988054 , 0. , + 0. , 0. , 0. , 0.59924918284561956571821}; + double resultValues3I[16]={2.0772175543447914947137 , 0. , 0. , 0. , + 0. , - 0.5223086999196728807959 , 0. , 0. , + 0. , 0. , 0.3871735516160564882782 , 0. , + 0. , 0. , 0. , - 0.2349232044266161556489 }; + double resultVectors3R[16]={ 0.5762578366606958546470 , 0.4529873647084416976583 , 0.5438116534400605495137 , 0.3599855200589946457868 , + - 0.3285074902800487195442, - 0.0923654569732548225147, 0.6473744750124794666846, - 0.1812302216765642182139 , + 0.7395301236826927748780, - 0.4588526195219964631811, 0.0997916953568371567496, - 0.3603263850824164338249 , + 0.0717862182160008133192, 0.6967198304315765922112, - 0.1153149977500917411355 , - 0.3232658081022470875077 }; + double resultVectors3I[16]={ 0. , - 0.1082260232744242933745, - 0.1403164362264210929254 , 0.0775054168635924967123 , + 0.0347047096401541868560, - 0.4780157518240965019984, 0. , 0.4493438228998393735303, + 0. , - 0.0484367977162360741072 , 0.0664282497469102783949 , - 0.3098340648435350952461 , + 0.1768623397230159322024, 0. , - 0.4621680558325051979551 , 0.3830799998945915163517}; + + + double in4R[49]={0.0292230211198329925537, 0.1069206790998578071594, 9.7463708464056253433228, 7.7042609406635165214539 , 6.3966313377022743225098, 9.5358861843124032020569, 4.1484833415597677230835, + 4.6615396952256560325623, 2.2384551353752613067627, 3.4569733263924717903137, 2.3406236339360475540161, 6.6193414805456995964050,2.6911795139312744140625,9.8302489006891846656799 , + 7.3933512251824140548706, 2.9021358629688620567322 , 3.9959496073424816131592 , 9.792278115637600421906 , 0.0755135808140039443970, 7.0210226578637957572937 , 8.9075061306357383728027 , + 6.5269742021337151527405 , 4.136228552088141441345 , 8.5816909139975905418396 , 2.3960896767675876617432 , 4.8200417729094624519348, 9.848585547879338264465 , 4.4697216479107737541199, + 2.3298137634992599487305, 2.2345139319077134132385, 8.0025654565542936325073, 7.7507343282923102378845, 4.8250066302716732025146, 7.8448831336572766304016 , 1.5346793178468942642212 , + 7.7228771103546023368835 , 8.9520217850804328918457, 9.4673257926478981971741, 6.9818257447332143783569, 9.5591608202084898948669, 0.4840173013508319854736, 5.3235206427052617073059, + 2.9468670953065156936646, 6.9771366892382502555847 , 9.3762038648128509521484 , 1.0755608463659882545471 , 7.7634243946522474288940, 6.3734178384765982627869 , 0.6630615703761577606201 }; + double in4I[49]={8.1694598542526364326477, 3.5473910067230463027954, 5.860544512979686260223, 3.4610254690051078796387, 4.4247510144487023353577, 8.8226650562137365341187, 7.6436930662021040916443 , + 7.764139864593744277954, 2.8076809318736195564270, 6.9086006004363298416138, 7.1747286943718791007996, 3.7201813608407974243164 , 9.3254965776577591896057, 2.2566775511950254440308, + 7.5211019208654761314392 , 3.0747506581246852874756 , 5.9793261485174298286438, 1.9238903466612100601196, 2.3870888305827975273132 , 7.4708331003785133361816, 9.7131536761298775672913, + 4.3703553732484579086304, 6.2248750543221831321716, 3.2913279719650745391846, 3.2963873865082859992981, 2.7686371374875307083130 , 4.8729835031554102897644, 7.7320465445518493652344 , + 9.0775218093767762184143, 5.0122931879013776779175, 5.1595458528026938438416, 5.79267887398600578308 , 1.5463936375454068183899 , 7.6111377868801355361938, 6.9079177780076861381531 , + 2.8732293471693992614746, 9.64253133628517389297 , 5.6607243325561285018921, 5.7821379369124770164490, 2.6634209789335727691650 , 4.7470985027030110359192, 6.0735465306788682937622, + 0.4097307054325938224793, 5.0125684589147567749023 , 5.2959309751167893409729, 6.2594583164900541305542, 2.2193526616320013999939 , 3.467419948428869247437, 3.9511676924303174018860 }; + double resultValues4R[49]={39.018457752476393807228 ,0,0,0,0,0,0, + 0,2.2455352415739073812517,0,0,0,0,0, + 0,0,- 8.4848591657394489828903,0,0,0,0, + 0,0,0,- 9.617033196016185669919,0,0,0, + 0,0,0,0,- 3.7815852014367528077798,0,0, + 0,0,0,0,0,- 4.44858427601393291440,0, + 0,0,0,0,0,0,- 0.3001282122401837670900}; + double resultValues4I[49]={36.525725390582877594170,0,0,0,0,0,0, + 0,- 5.9058762755733944516123,0,0,0,0,0, + 0,0,- 3.5959527108686115681735,0,0,0,0, + 0,0,0,1.8928051444081777088257,0,0,0, + 0,0,0,0,- 3.1889864758923365251064,0,0, + 0,0,0,0,0,3.2418188738592150777151,0, + 0,0,0,0,0,0,1.5279802073147508156836}; + + double resultVectors4R[49]={ 0.3499995148567048852684, 0.3131141942665225941234, 0.4518966551544936205431, 0.3429358568207974133912, 0.3073919828504245721490, 0.4236868694783915145763, 0.3928739146959387973368 , + 0.2654822689469810148566 , - 0.3607918093136298631762, 0.0473515544359270068586 , 0.5097969509656486986060 , -0.3771134435310480315096 , 0.2011534205484152293408, - 0.4415200724898113993078, + 0.5454886553461798515130, - 0.2173248800239625522224, - 0.2171708216301463378883 , - 0.2460117034233289534662 , -0.3694743444265859433351 , 0.3601018742104445391483, 0.1530612374027510713681, + 0.6385835932752577104310, - 0.0013906755423099548263, - 0.3368505708673739662551 , 0.1394203608831885433 , -0.2292783363046769218308 , -0.2740379414191142504187, 0.1926279946047058377889 , + - 0.6106238336849327819067, 0.0128604884735820379493, 0.2248434453925002574071, - 0.0955950290268089419854 , 0.6322383898844411431739 , - 0.1362122761803175874373, - 0.0030545591332723984190, + 0.5431360047322275619308, 0.1304324282476526930541, - 0.3713242513274904177401, - 0.2693820083406764376299 , - 0.1431429883314006001882 , 0.0533021313694299267438, 0.0071247423818797811501 , + - 0.156705245229635081738, 0.0034676864415526253982 , - 0.3351413975178426096768 , 0.2927797449896782921996 , 0.5714932440406852443005 , 0.0738366305178744797288, - 0.4509415569247051669422 }; + double resultVectors4I[49]={ 0.0720991445669864616796 , 0.0844739028302603361942 , 0. , 0.0173431366502564965337, -0.0428710162141596462515, 0.0695226101295536302871, 0.0999385617869267273150, + 0.2510960793336660668018 , - 0.1123901435582568414384, 0.0091069807153507792430, 0. , - 0.2545493692188907641771, 0.1149714203529902251111, 0.0762796210842419941667, + 0. , 0.0611827470444509316505, 0.2295643426501567385678, - 0.2950878328821502361024, 0.198556748820033573955, 0.0646801132828138114483, - 0.2660572521172601678785, + 0. , 0.2688905463703794573860, 0.2230635356255223633593 , - 0.2013432448241845862391, - 0.0386922946770884290668, 0.0358963301038670995480, - 0.3593711366897305303780 , + - 0.1386717901043315326337, 0.0600994116374372472356, - 0.1167558596038882207102 , 0.317965599565130263571, 0. , -0.0642522754144960878131, - 0.0853665514099945371695, + 0. , 0.2715431731544318272320, - 0.1184277560110737481658 , 0.3655618467608299226868, - 0.4598766797780974302512 , 0.0188698345957667955319, - 0.1446429340244405892246, + 0.346095581161616094867 , 0.0750882555805542639682, - 0.2494867985551498246188, - 0.2328934592128872882455, 0. , -0.0047307828167728396829, - 0.0078254955461786041004}; + + + + + doubleComplex *in,*in2,*in3,*in4,out1[4],out2[4],out3[16],out4[16],out5[49],out6[49]; + + int i; + + in=DoubleComplexMatrix(inR,inI,4); + in2=DoubleComplexMatrix(in2R,in2I,4); + in3=DoubleComplexMatrix(in3R,in3I,16); + in4=DoubleComplexMatrix(in4R,in4I,49); + zspec2a(in,2,out1,out2); + + + for(i=0;i<4;i++){ + if (zreals(out1[i])>1e-16) assert( fabs(zreals(out1[i])-resultValuesR[i]) / fabs(zreals(out1[i])) <3e-16); + else assert(1); + if (zimags(out1[i])>1e-16) assert( fabs(zimags(out1[i])-resultValuesI[i]) / fabs(zimags(out1[i])) <1e-16); + else assert(1); + } + + for(i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-resultVectorsR[i]) / fabs(zreals(out2[i])) <3e-16); + else assert(1); + if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-resultVectorsI[i]) / fabs(zimags(out2[i])) <1e-16); + else assert(1); + } + + + zspec2a(in2,2,out1,out2); + for(i=0;i<4;i++){ + if (zreals(out1[i])>1e-16) assert( fabs(zreals(out1[i])-resultValues2R[i]) / fabs(zreals(out1[i])) <3e-16); + else assert(1); + if (zimags(out1[i])>1e-16) assert( fabs(zimags(out1[i])-resultValues2I[i]) / fabs(zimags(out1[i])) <3e-15); + else assert(1); + } + + for(i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-resultVectors2R[i]) / fabs(zreals(out2[i])) <3e-16); + else assert(1); + if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-resultVectors2I[i]) / fabs(zimags(out2[i])) <3e-15); + else assert(1); + } + + + + zspec2a(in3,4,out3,out4); + for(i=0;i<16;i++){ + if (zreals(out3[i])>1e-16) assert( fabs(zreals(out3[i])-resultValues3R[i]) / fabs(zreals(out3[i])) <3e-15); + else assert(1); + if (zimags(out3[i])>1e-16) assert( fabs(zimags(out3[i])-resultValues3I[i]) / fabs(zimags(out3[i])) <3e-15); + else assert(1); + } + for(i=0;i<16;i++){ + if (zreals(out4[i])>1e-16) assert( fabs(zreals(out4[i])-resultVectors3R[i]) / fabs(zreals(out4[i])) <3e-15); + else assert(1); + if (zimags(out4[i])>1e-16) assert( fabs(zimags(out4[i])-resultVectors3I[i]) / fabs(zimags(out4[i])) <3e-14); + else assert(1); + } + + /* FIXME : assert : 3e-16 maybe du to little values like 0.001... */ + zspec2a(in4,7,out5,out6); + + for(i=0;i<49;i++){ + if (zreals(out5[i])>1e-16) assert( fabs(zreals(out5[i])-resultValues4R[i]) / fabs(zreals(out5[i])) <3e-15); + else assert(1); + if (zimags(out5[i])>1e-16) assert( fabs(zimags(out5[i])-resultValues4I[i]) / fabs(zimags(out5[i])) <3e-14); + else assert(1); + } + for(i=0;i<49;i++){ + if (zreals(out6[i])>1e-16) assert( fabs(zreals(out6[i])-resultVectors4R[i]) / fabs(zreals(out6[i])) <3e-14); + else assert(1); + if (zimags(out6[i])>1e-16) assert( fabs(zimags(out6[i])-resultVectors4I[i]) / fabs(zimags(out6[i])) <3e-13); + else assert(1); + } + + + +} + + +static int testSpec2(void){ + printf(">>> Double Spec2 Tests <<<\n"); + printf(">>> Double <<<\n"); + dspec2aTest(); + printf(">>> DoubleComplex <<<\n"); + zspec2aTest(); + return 0; +} + + +int main(void){ + assert (testSpec2()==0); + + + return 0; +} diff --git a/src/c/matrixOperations/spec2/testFloatSpec2.c b/src/c/matrixOperations/spec2/testFloatSpec2.c new file mode 100644 index 0000000..fb2bc25 --- /dev/null +++ b/src/c/matrixOperations/spec2/testFloatSpec2.c @@ -0,0 +1,134 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "spec.h" +#include "stdio.h" +#include "assert.h" +#include "math.h" + +static void sspec2aTest(void){ + float in[4]={1.0f,1.0f,1.0f,3.0f}; + float resultValuesR[4]={0.5857864376269050765700f,0,0,3.4142135623730949234300f}; + float resultVectorsR[4]={- 0.9238795325112867384831f,0.3826834323650897817792f, + 0.3826834323650897817792f,0.9238795325112867384831f}; + + float in2[4]={1.0f,1.0f,-2.0f,3.0f}; + float resultValues2R[4]={1.9999999999999997779554f,0,0,1.9999999999999997779554f}; + float resultVectors2R[4]={0.8164965809277261454824f,- 0.4082482904638631282523f, + 0.8164965809277261454824f,- 0.4082482904638631282523f}; + float eigenvalues[4],eigenvectors[4]; + + int i; + + sspec2a(in,2,eigenvalues,eigenvectors); + + for(i=0;i<4;i++){ + if (eigenvalues[i]>1e-6) assert( fabs(eigenvalues[i]-resultValuesR[i]) / fabs(eigenvalues[i]) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (eigenvectors[i]>1e-6) assert( fabs(eigenvectors[i]-resultVectorsR[i]) / fabs(eigenvectors[i]) <1e-16); + else assert(1); + } + + + sspec2a(in2,2,eigenvalues,eigenvectors); + + + + for(i=0;i<4;i++){ + if (eigenvalues[i]>1e-6) assert( fabs(eigenvalues[i]-resultValues2R[i]) / fabs(eigenvalues[i]) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (eigenvectors[i]>1e-6) assert( fabs(eigenvectors[i]-resultVectors2R[i]) / fabs(eigenvectors[i]) <1e-16); + else assert(1); + } +} + + + + +static void cspec2aTest(void){ + float inR[4]={1.0f,1.0f,1.0f,3.0f}; + float inI[4]={0.0f,0.0f,0.0f,0.0f}; + float resultValuesR[4]={0.5857864376269050765700f,0,0,3.4142135623730949234300f}; + float resultValuesI[4]={0,0,0,0}; + float resultVectorsR[4]={- 0.9238795325112867384831f,0.3826834323650897817792f, + 0.3826834323650897817792f,0.9238795325112867384831f}; + float resultVectorsI[4]={0,0,0,0}; + + float in2R[4]={1.0f,1.0f,-2.0f,3.0f}; + float in2I[4]={0.0f,0.0f,0.0f,0.0f}; + float resultValues2R[4]={1.9999999999999997779554f,0,0,1.9999999999999997779554f}; + float resultValues2I[4]={0.9999999999999997779554f,0,0,-0.9999999999999997779554f}; + float resultVectors2R[4]={0.8164965809277261454824f,- 0.4082482904638631282523f, + 0.8164965809277261454824f,- 0.4082482904638631282523f}; + float resultVectors2I[4]={0,- 0.4082482904638629062077f,0,0.4082482904638629062077f}; + + floatComplex *in,*in2,out1[4],out2[4]; + + int i; + + in=FloatComplexMatrix(inR,inI,4); + in2=FloatComplexMatrix(in2R,in2I,4); + + cspec2a(in,2,out1,out2); + for(i=0;i<4;i++){ + if (creals(out1[i])>1e-16) assert( fabs(creals(out1[i])-resultValuesR[i]) / fabs(creals(out1[i])) <1e-15); + else assert(1); + if (cimags(out1[i])>1e-16) assert( fabs(cimags(out1[i])-resultValuesI[i]) / fabs(cimags(out1[i])) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (creals(out2[i])>1e-16) assert( fabs(creals(out2[i])-resultVectorsR[i]) / fabs(creals(out2[i])) <1e-15); + else assert(1); + if (cimags(out2[i])>1e-16) assert( fabs(cimags(out2[i])-resultVectorsI[i]) / fabs(cimags(out2[i])) <1e-16); + else assert(1); + } + + + cspec2a(in2,2,out1,out2); + for(i=0;i<4;i++){ + if (creals(out1[i])>1e-16) assert( fabs(creals(out1[i])-resultValues2R[i]) / fabs(creals(out1[i])) <1e-15); + else assert(1); + if (cimags(out1[i])>1e-16) assert( fabs(cimags(out1[i])-resultValues2I[i]) / fabs(cimags(out1[i])) <1e-15); + else assert(1); + } + for(i=0;i<4;i++){ + if (creals(out2[i])>1e-16) assert( fabs(creals(out2[i])-resultVectors2R[i]) / fabs(creals(out2[i])) <1e-15); + else assert(1); + if (cimags(out2[i])>1e-16) assert( fabs(cimags(out2[i])-resultVectors2I[i]) / fabs(cimags(out2[i])) <1e-16); + else assert(1); + } +} + + + + +static int testSpec2(void){ + printf(">>> Float Spec2 Tests <<<\n"); + printf(">>> Float <<<\n"); + sspec2aTest(); + printf(">>> FloatComplex <<<\n"); + cspec2aTest(); + return 0; +} + + +int main(void){ + assert (testSpec2()==0); + + + return 0; +} diff --git a/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj b/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj new file mode 100644 index 0000000..7c36943 --- /dev/null +++ b/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FD0A4495-C372-41EF-B8EF-0A0939DA6C1E} + testDoubleSpec2 + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters b/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters new file mode 100644 index 0000000..04f409d --- /dev/null +++ b/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj b/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj new file mode 100644 index 0000000..f4154eb --- /dev/null +++ b/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E20D0BC2-B28A-412C-9715-5B93B319A4A3} + testFloatSpec2 + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters b/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters new file mode 100644 index 0000000..0c38d2f --- /dev/null +++ b/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/spec2/zspec2a.c b/src/c/matrixOperations/spec2/zspec2a.c new file mode 100644 index 0000000..e33ed89 --- /dev/null +++ b/src/c/matrixOperations/spec2/zspec2a.c @@ -0,0 +1,96 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "stdio.h" +#include "conj.h" + +void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues, doubleComplex* eigenvectors){ + int i = 0, j = 0; + int hermitian = 0; + int INFO = 0; + int iWorkSize = 0; + doubleComplex* pdblWork; + doubleComplex* pdblLeftvectors; + doubleComplex* pdblRightvectors; + doubleComplex* pdblRWork; + double* pdblRWork2; + double* outReal; + double* outImag; + doubleComplex* inCopy; + + inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + iWorkSize = 2*rows; + pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex)); + pdblRWork = NULL; + pdblRWork2 = NULL; + + for(i=0;i +#include + + +static void dsquMagnsTest(void){ +} + + +static void dsquMagnaTest(void){ +} + + +static void zsquMagnsTest(void){ +} + +static void zsquMagnaTest(void){ +} + + +static int squMagnTest(void){ + printf("\n >>> Squared Magnitude Double Tests<<<\n"); + dsquMagnsTest(); + dsquMagnaTest(); + zsquMagnsTest(); + zsquMagnaTest(); + return 0; +} + +int main (void){ + assert(squMagnTest()==0); + return 0; +} + + + + + + + + + + + + + + + + + + + diff --git a/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c b/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c new file mode 100644 index 0000000..847abeb --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c @@ -0,0 +1,52 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixSquaredMagnitude.h" +#include +#include + +static void ssquMagnsTest(void){ +} + + +static void ssquMagnaTest(void){ +} + + +static void csquMagnsTest(void){ +} + +static void csquMagnaTest(void){ +} + + +static int squMagnTest(void){ + printf("\n >>> Squared Magnitude Float Tests<<<\n"); + ssquMagnsTest(); + ssquMagnaTest(); + csquMagnsTest(); + csquMagnaTest(); + return 0; +} + +int main (void){ + assert(squMagnTest()==0); + return 0; +} + + + + + diff --git a/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj b/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj new file mode 100644 index 0000000..2531d8a --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {16744340-9DDC-4CC6-AC7D-A25DE89A3F5D} + testDoubleSquaredMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters b/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters new file mode 100644 index 0000000..17c18bd --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj b/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj new file mode 100644 index 0000000..c4c4064 --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6DBADD0B-C4C1-48CF-95EA-6CF7272A0391} + testFloatSquaredMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters b/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters new file mode 100644 index 0000000..8ee8b55 --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/squaredMagnitude/zsquMagna.c b/src/c/matrixOperations/squaredMagnitude/zsquMagna.c new file mode 100644 index 0000000..4d1eecb --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/zsquMagna.c @@ -0,0 +1,25 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixSquaredMagnitude.h" +#include "matrixMagnitude.h" + +double zsquMagna(doubleComplex* in, int rows, int cols){ + double out; + out=zmagna(in,rows,cols); + return out*out; +} + + diff --git a/src/c/matrixOperations/squaredMagnitude/zsquMagns.c b/src/c/matrixOperations/squaredMagnitude/zsquMagns.c new file mode 100644 index 0000000..e845357 --- /dev/null +++ b/src/c/matrixOperations/squaredMagnitude/zsquMagns.c @@ -0,0 +1,22 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "matrixSquaredMagnitude.h" + +double zsquMagns(doubleComplex in){ + return zreals(in)*zreals(in)+zimags(in)*zimags(in); +} + + diff --git a/src/c/matrixOperations/trace/Makefile.am b/src/c/matrixOperations/trace/Makefile.am new file mode 100644 index 0000000..ddf72b8 --- /dev/null +++ b/src/c/matrixOperations/trace/Makefile.am @@ -0,0 +1,41 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixTrace_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixTrace.la + +HEAD = ../includes/matrixTrace.h + +libMatrixTrace_la_SOURCES = $(HEAD) \ + stracea.c \ + dtracea.c \ + ctracea.c \ + ztracea.c + +check_PROGRAMS = testMatrixTrace + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixTrace.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTrace_SOURCES = testMatrixTrace.c +testMatrixTrace_LDADD = $(check_LDADD) +testMatrixTrace_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixTrace diff --git a/src/c/matrixOperations/trace/Makefile.in b/src/c/matrixOperations/trace/Makefile.in new file mode 100644 index 0000000..d930f1d --- /dev/null +++ b/src/c/matrixOperations/trace/Makefile.in @@ -0,0 +1,712 @@ +# 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 = testMatrixTrace$(EXEEXT) +TESTS = testMatrixTrace$(EXEEXT) +subdir = src/c/matrixOperations/trace +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) +libMatrixTrace_la_LIBADD = +am__objects_1 = +am_libMatrixTrace_la_OBJECTS = $(am__objects_1) \ + libMatrixTrace_la-stracea.lo libMatrixTrace_la-dtracea.lo \ + libMatrixTrace_la-ctracea.lo libMatrixTrace_la-ztracea.lo +libMatrixTrace_la_OBJECTS = $(am_libMatrixTrace_la_OBJECTS) +libMatrixTrace_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixTrace_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_testMatrixTrace_OBJECTS = \ + testMatrixTrace-testMatrixTrace.$(OBJEXT) +testMatrixTrace_OBJECTS = $(am_testMatrixTrace_OBJECTS) +testMatrixTrace_DEPENDENCIES = $(check_LDADD) +testMatrixTrace_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixTrace_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 = $(libMatrixTrace_la_SOURCES) $(testMatrixTrace_SOURCES) +DIST_SOURCES = $(libMatrixTrace_la_SOURCES) $(testMatrixTrace_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@ +libMatrixTrace_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixTrace.la +HEAD = ../includes/matrixTrace.h +libMatrixTrace_la_SOURCES = $(HEAD) \ + stracea.c \ + dtracea.c \ + ctracea.c \ + ztracea.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixTrace.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTrace_SOURCES = testMatrixTrace.c +testMatrixTrace_LDADD = $(check_LDADD) +testMatrixTrace_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/trace/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/trace/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 +libMatrixTrace.la: $(libMatrixTrace_la_OBJECTS) $(libMatrixTrace_la_DEPENDENCIES) + $(libMatrixTrace_la_LINK) -rpath $(pkglibdir) $(libMatrixTrace_la_OBJECTS) $(libMatrixTrace_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 +testMatrixTrace$(EXEEXT): $(testMatrixTrace_OBJECTS) $(testMatrixTrace_DEPENDENCIES) + @rm -f testMatrixTrace$(EXEEXT) + $(testMatrixTrace_LINK) $(testMatrixTrace_OBJECTS) $(testMatrixTrace_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-ctracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-dtracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-stracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-ztracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixTrace-testMatrixTrace.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 $@ $< + +libMatrixTrace_la-stracea.lo: stracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-stracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-stracea.Tpo -c -o libMatrixTrace_la-stracea.lo `test -f 'stracea.c' || echo '$(srcdir)/'`stracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-stracea.Tpo $(DEPDIR)/libMatrixTrace_la-stracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stracea.c' object='libMatrixTrace_la-stracea.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) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-stracea.lo `test -f 'stracea.c' || echo '$(srcdir)/'`stracea.c + +libMatrixTrace_la-dtracea.lo: dtracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-dtracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-dtracea.Tpo -c -o libMatrixTrace_la-dtracea.lo `test -f 'dtracea.c' || echo '$(srcdir)/'`dtracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-dtracea.Tpo $(DEPDIR)/libMatrixTrace_la-dtracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtracea.c' object='libMatrixTrace_la-dtracea.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) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-dtracea.lo `test -f 'dtracea.c' || echo '$(srcdir)/'`dtracea.c + +libMatrixTrace_la-ctracea.lo: ctracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-ctracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-ctracea.Tpo -c -o libMatrixTrace_la-ctracea.lo `test -f 'ctracea.c' || echo '$(srcdir)/'`ctracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-ctracea.Tpo $(DEPDIR)/libMatrixTrace_la-ctracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctracea.c' object='libMatrixTrace_la-ctracea.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) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-ctracea.lo `test -f 'ctracea.c' || echo '$(srcdir)/'`ctracea.c + +libMatrixTrace_la-ztracea.lo: ztracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-ztracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-ztracea.Tpo -c -o libMatrixTrace_la-ztracea.lo `test -f 'ztracea.c' || echo '$(srcdir)/'`ztracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-ztracea.Tpo $(DEPDIR)/libMatrixTrace_la-ztracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztracea.c' object='libMatrixTrace_la-ztracea.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) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-ztracea.lo `test -f 'ztracea.c' || echo '$(srcdir)/'`ztracea.c + +testMatrixTrace-testMatrixTrace.o: testMatrixTrace.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -MT testMatrixTrace-testMatrixTrace.o -MD -MP -MF $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo -c -o testMatrixTrace-testMatrixTrace.o `test -f 'testMatrixTrace.c' || echo '$(srcdir)/'`testMatrixTrace.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo $(DEPDIR)/testMatrixTrace-testMatrixTrace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTrace.c' object='testMatrixTrace-testMatrixTrace.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) $(testMatrixTrace_CFLAGS) $(CFLAGS) -c -o testMatrixTrace-testMatrixTrace.o `test -f 'testMatrixTrace.c' || echo '$(srcdir)/'`testMatrixTrace.c + +testMatrixTrace-testMatrixTrace.obj: testMatrixTrace.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -MT testMatrixTrace-testMatrixTrace.obj -MD -MP -MF $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo -c -o testMatrixTrace-testMatrixTrace.obj `if test -f 'testMatrixTrace.c'; then $(CYGPATH_W) 'testMatrixTrace.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTrace.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo $(DEPDIR)/testMatrixTrace-testMatrixTrace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTrace.c' object='testMatrixTrace-testMatrixTrace.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) $(testMatrixTrace_CFLAGS) $(CFLAGS) -c -o testMatrixTrace-testMatrixTrace.obj `if test -f 'testMatrixTrace.c'; then $(CYGPATH_W) 'testMatrixTrace.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTrace.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/trace/ctracea.c b/src/c/matrixOperations/trace/ctracea.c new file mode 100644 index 0000000..75b0921 --- /dev/null +++ b/src/c/matrixOperations/trace/ctracea.c @@ -0,0 +1,32 @@ +/* + * 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 "matrixTrace.h" + +floatComplex ctracea ( floatComplex* in ,int lines ){ + + + int i = 0 ; + float rout = 0.0f ; + float iout = 0.0f ; + + for ( i = 0 ; i < lines ; ++i) + { + rout += creals (in[i*lines + i] ) ; + iout += cimags (in[i*lines + i] ) ; + } + + return FloatComplex ( rout , iout ) ; + +} + + diff --git a/src/c/matrixOperations/trace/dtracea.c b/src/c/matrixOperations/trace/dtracea.c new file mode 100644 index 0000000..4938776 --- /dev/null +++ b/src/c/matrixOperations/trace/dtracea.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 "matrixTrace.h" + +double dtracea ( double* in ,int lines){ + + + int i = 0 ; + double out = 0 ; + + for ( i = 0 ; i < lines ; ++i) + out += in[i*lines + i] ; + + return out; +} + + diff --git a/src/c/matrixOperations/trace/i16tracea.c b/src/c/matrixOperations/trace/i16tracea.c new file mode 100644 index 0000000..3aeec4e --- /dev/null +++ b/src/c/matrixOperations/trace/i16tracea.c @@ -0,0 +1,28 @@ +/* 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 "matrixTrace.h" + +int16 i16tracea ( int16* in ,int lines){ + + + int i = 0 ; + //double out = 0 ; + int16 out = 0; + + for ( i = 0 ; i < lines ; ++i) + out += (int16)in[i*lines + i] ; + + return out; +} + + diff --git a/src/c/matrixOperations/trace/i8tracea.c b/src/c/matrixOperations/trace/i8tracea.c new file mode 100644 index 0000000..9158ba4 --- /dev/null +++ b/src/c/matrixOperations/trace/i8tracea.c @@ -0,0 +1,28 @@ +/* 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 "matrixTrace.h" + +int8 i8tracea ( int8* in ,int lines){ + + + int i = 0 ; + //double out = 0 ; + int8 out = 0; + + for ( i = 0 ; i < lines ; ++i) + out += (int8)in[i*lines + i] ; + + return out; +} + + diff --git a/src/c/matrixOperations/trace/stracea.c b/src/c/matrixOperations/trace/stracea.c new file mode 100644 index 0000000..06c4a8b --- /dev/null +++ b/src/c/matrixOperations/trace/stracea.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 "matrixTrace.h" + +float stracea ( float* in ,int lines ){ + + + int i = 0 ; + float out = 0 ; + + for ( i = 0 ; i < lines ; ++i) + out += in[i*lines + i] ; + + return out; +} + + diff --git a/src/c/matrixOperations/trace/testMatrixTrace.c b/src/c/matrixOperations/trace/testMatrixTrace.c new file mode 100644 index 0000000..0cbea97 --- /dev/null +++ b/src/c/matrixOperations/trace/testMatrixTrace.c @@ -0,0 +1,237 @@ +/* + * 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 +#include +#include +#include +#include "matrixTrace.h" + +#define LINES 10 +static void straceaTest ( void ) { + + float in[] = + {0.41574033396318555f,0.49111106572672725f,0.44963645050302148f,0.83262220909819007f, + 0.64995764615014195f,0.49560560984537005f,0.61533244187012315f,0.52116033947095275f, + 0.31538392649963498f,0.50222720531746745f, +0.15958226565271616f,0.34022171795368195f,0.96781380381435156f,0.74247795902192593f, + 0.23031901288777590f,0.18889334425330162f,0.89581834804266691f,0.45098419673740864f, + 0.34899875614792109f,0.05404338985681534f, +0.38831026805564761f,0.99661536002531648f,0.64890601998195052f,0.01946402387693524f, + 0.55043680546805263f,0.56412307033315301f,0.87217613449320197f,0.39612928451970220f, + 0.74138183100149035f,0.01639390224590898f, +0.94154607132077217f,0.02153958659619093f,0.25446669198572636f,0.80160319153219461f, + 0.30389970541000366f,0.85622101929038763f,0.83897679112851620f,0.72408697474747896f, + 0.97027219459414482f,0.60508118104189634f, +0.47229793528094888f,0.68768908223137259f,0.19239750178530812f,0.25545394374057651f, + 0.03710305178537965f,0.07947642868384719f,0.20409553544595838f,0.67240559635683894f, + 0.12765105674043298f,0.29538751533254981f, +0.85336526390165091f,0.00449241511523724f,0.68614923674613237f,0.26881096139550209f, + 0.17038810532540083f,0.61961987055838108f,0.31665382627397776f,0.23861460387706757f, + 0.38288621511310339f,0.64512947760522366f, +0.12077391659840941f,0.63978545414283872f,0.42314558057114482f,0.75584907690063119f, + 0.56986862560734153f,0.22410399885848165f,0.70068256510421634f,0.71248416090384126f, + 0.48824774986132979f,0.94497666554525495f, +0.89993809349834919f,0.5416147718206048f,0.67344415932893753f,0.43475896771997213f, + 0.00364112667739391f,0.85820947308093309f,0.20731051638722420f,0.32864938955754042f, + 0.51919496990740299f,0.5638650292530656f, +0.43849021615460515f,0.22476492030546069f,0.82706967229023576f,0.64259665226563811f, + 0.44915470527485013f,0.71145519940182567f,0.52225506165996194f,0.48377691349014640f, + 0.09068560274317861f,0.97863480402156711f, +0.89760566223412752f,0.73640052601695061f,0.93608058523386717f,0.69578680582344532f, + 0.05768106970936060f,0.80260276049375534f,0.94164209719747305f,0.76627670042216778f, + 0.68338975030928850f,0.93453497067093849f} +; + + float Result = 4.9177467138506472f ; + + float out = 0.0f ; + + out = stracea ( in , LINES ) ; + + assert(fabsf(out - Result) / fabsf( out )< 1e-07); + +} + +static void dtraceaTest ( void ) { + + double in[] = + {0.41574033396318555,0.49111106572672725,0.44963645050302148,0.83262220909819007, + 0.64995764615014195,0.49560560984537005,0.61533244187012315,0.52116033947095275, + 0.31538392649963498,0.50222720531746745, +0.15958226565271616,0.34022171795368195,0.96781380381435156,0.74247795902192593, + 0.23031901288777590,0.18889334425330162,0.89581834804266691,0.45098419673740864, + 0.34899875614792109,0.05404338985681534, +0.38831026805564761,0.99661536002531648,0.64890601998195052,0.01946402387693524, + 0.55043680546805263,0.56412307033315301,0.87217613449320197,0.39612928451970220, + 0.74138183100149035,0.01639390224590898, +0.94154607132077217,0.02153958659619093,0.25446669198572636,0.80160319153219461, + 0.30389970541000366,0.85622101929038763,0.83897679112851620,0.72408697474747896, + 0.97027219459414482,0.60508118104189634, +0.47229793528094888,0.68768908223137259,0.19239750178530812,0.25545394374057651, + 0.03710305178537965,0.07947642868384719,0.20409553544595838,0.67240559635683894, + 0.12765105674043298,0.29538751533254981, +0.85336526390165091,0.00449241511523724,0.68614923674613237,0.26881096139550209, + 0.17038810532540083,0.61961987055838108,0.31665382627397776,0.23861460387706757, + 0.38288621511310339,0.64512947760522366, +0.12077391659840941,0.63978545414283872,0.42314558057114482,0.75584907690063119, + 0.56986862560734153,0.22410399885848165,0.70068256510421634,0.71248416090384126, + 0.48824774986132979,0.94497666554525495, +0.89993809349834919,0.5416147718206048,0.67344415932893753,0.43475896771997213, + 0.00364112667739391,0.85820947308093309,0.20731051638722420,0.32864938955754042, + 0.51919496990740299,0.5638650292530656, +0.43849021615460515,0.22476492030546069,0.82706967229023576,0.64259665226563811, + 0.44915470527485013,0.71145519940182567,0.52225506165996194,0.48377691349014640, + 0.09068560274317861,0.97863480402156711, +0.89760566223412752,0.73640052601695061,0.93608058523386717,0.69578680582344532, + 0.05768106970936060,0.80260276049375534,0.94164209719747305,0.76627670042216778, + 0.68338975030928850,0.93453497067093849} +; + + double Result = 4.9177467138506472 ; + + double out = 0 ; + + out = dtracea ( in , LINES ) ; + + assert(fabs(out - Result) / fabs( out )< 1e-16); +} + + + +static void ctraceaTest ( void ) { + int i = 0 ; + + float tin[] = +{0.41574033396318555f,0.49111106572672725f,0.44963645050302148f,0.83262220909819007f, + 0.64995764615014195f,0.49560560984537005f,0.61533244187012315f,0.52116033947095275f, + 0.31538392649963498f,0.50222720531746745f, +0.15958226565271616f,0.34022171795368195f,0.96781380381435156f,0.74247795902192593f, + 0.23031901288777590f,0.18889334425330162f,0.89581834804266691f,0.45098419673740864f, + 0.34899875614792109f,0.05404338985681534f, +0.38831026805564761f,0.99661536002531648f,0.64890601998195052f,0.01946402387693524f, + 0.55043680546805263f,0.56412307033315301f,0.87217613449320197f,0.39612928451970220f, + 0.74138183100149035f,0.01639390224590898f, +0.94154607132077217f,0.02153958659619093f,0.25446669198572636f,0.80160319153219461f, + 0.30389970541000366f,0.85622101929038763f,0.83897679112851620f,0.72408697474747896f, + 0.97027219459414482f,0.60508118104189634f, +0.47229793528094888f,0.68768908223137259f,0.19239750178530812f,0.25545394374057651f, + 0.03710305178537965f,0.07947642868384719f,0.20409553544595838f,0.67240559635683894f, + 0.12765105674043298f,0.29538751533254981f, +0.85336526390165091f,0.00449241511523724f,0.68614923674613237f,0.26881096139550209f, + 0.17038810532540083f,0.61961987055838108f,0.31665382627397776f,0.23861460387706757f, + 0.38288621511310339f,0.64512947760522366f, +0.12077391659840941f,0.63978545414283872f,0.42314558057114482f,0.75584907690063119f, + 0.56986862560734153f,0.22410399885848165f,0.70068256510421634f,0.71248416090384126f, + 0.48824774986132979f,0.94497666554525495f, +0.89993809349834919f,0.5416147718206048f,0.67344415932893753f,0.43475896771997213f, + 0.00364112667739391f,0.85820947308093309f,0.20731051638722420f,0.32864938955754042f, + 0.51919496990740299f,0.5638650292530656f, +0.43849021615460515f,0.22476492030546069f,0.82706967229023576f,0.64259665226563811f, + 0.44915470527485013f,0.71145519940182567f,0.52225506165996194f,0.48377691349014640f, + 0.09068560274317861f,0.97863480402156711f, +0.89760566223412752f,0.73640052601695061f,0.93608058523386717f,0.69578680582344532f, + 0.05768106970936060f,0.80260276049375534f,0.94164209719747305f,0.76627670042216778f, + 0.68338975030928850f,0.93453497067093849f} +; + floatComplex in [LINES*LINES] ; + + floatComplex Result = FloatComplex ( 4.9177467138506472f, 4.9177467138506472f); + + floatComplex out ; + + for ( i = 0 ; i < LINES*LINES ; i++ ) + in[i] = FloatComplex ( tin[i] , tin[i] ) ; + + out = ctracea ( in , LINES ) ; + + assert ( fabs( creals(out) - creals (Result) )/ fabs (creals (out)) < 1e-07 ); + assert ( fabs( cimags(out) - cimags (Result) )/ fabs (cimags (out)) < 1e-07 ); + +} + + + + + +static void ztraceaTest ( void ) { + + int i = 0 ; + + double tin[] = + {0.41574033396318555,0.49111106572672725,0.44963645050302148,0.83262220909819007, + 0.64995764615014195,0.49560560984537005,0.61533244187012315,0.52116033947095275, + 0.31538392649963498,0.50222720531746745, +0.15958226565271616,0.34022171795368195,0.96781380381435156,0.74247795902192593, + 0.23031901288777590,0.18889334425330162,0.89581834804266691,0.45098419673740864, + 0.34899875614792109,0.05404338985681534, +0.38831026805564761,0.99661536002531648,0.64890601998195052,0.01946402387693524, + 0.55043680546805263,0.56412307033315301,0.87217613449320197,0.39612928451970220, + 0.74138183100149035,0.01639390224590898, +0.94154607132077217,0.02153958659619093,0.25446669198572636,0.80160319153219461, + 0.30389970541000366,0.85622101929038763,0.83897679112851620,0.72408697474747896, + 0.97027219459414482,0.60508118104189634, +0.47229793528094888,0.68768908223137259,0.19239750178530812,0.25545394374057651, + 0.03710305178537965,0.07947642868384719,0.20409553544595838,0.67240559635683894, + 0.12765105674043298,0.29538751533254981, +0.85336526390165091,0.00449241511523724,0.68614923674613237,0.26881096139550209, + 0.17038810532540083,0.61961987055838108,0.31665382627397776,0.23861460387706757, + 0.38288621511310339,0.64512947760522366, +0.12077391659840941,0.63978545414283872,0.42314558057114482,0.75584907690063119, + 0.56986862560734153,0.22410399885848165,0.70068256510421634,0.71248416090384126, + 0.48824774986132979,0.94497666554525495, +0.89993809349834919,0.5416147718206048,0.67344415932893753,0.43475896771997213, + 0.00364112667739391,0.85820947308093309,0.20731051638722420,0.32864938955754042, + 0.51919496990740299,0.5638650292530656, +0.43849021615460515,0.22476492030546069,0.82706967229023576,0.64259665226563811, + 0.44915470527485013,0.71145519940182567,0.52225506165996194,0.48377691349014640, + 0.09068560274317861,0.97863480402156711, +0.89760566223412752,0.73640052601695061,0.93608058523386717,0.69578680582344532, + 0.05768106970936060,0.80260276049375534,0.94164209719747305,0.76627670042216778, + 0.68338975030928850,0.93453497067093849}; + + doubleComplex in [LINES*LINES] ; + + doubleComplex Result = DoubleComplex ( 4.9177467138506472, 4.9177467138506472); + + doubleComplex out ; + + + + for ( i = 0 ; i < LINES*LINES ; i++ ) + in[i] = DoubleComplex ( tin[i] , tin[i] ) ; + + out = ztracea ( in , LINES ) ; + + assert ( fabs( zreals(out) - zreals (Result) )/ fabs (zreals (out)) < 1e-16 ); + assert ( fabs( zimags(out) - zimags (Result) )/ fabs (zimags (out)) < 1e-16 ); + +} + +static int testTrace(void) { + + printf("\n>>>> Matrix Trace Tests\n"); + straceaTest(); + dtraceaTest(); + ctraceaTest(); + ztraceaTest(); + + return 0; +} + + + +int main(void) { + assert(testTrace() == 0); + return 0; +} + diff --git a/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj b/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj new file mode 100644 index 0000000..3f33a6c --- /dev/null +++ b/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {21E5E59A-7E4E-4F65-9042-9C67C713D51C} + testMatrixTrace + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters b/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters new file mode 100644 index 0000000..e2b1b64 --- /dev/null +++ b/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/trace/u16tracea.c b/src/c/matrixOperations/trace/u16tracea.c new file mode 100644 index 0000000..2a85fa3 --- /dev/null +++ b/src/c/matrixOperations/trace/u16tracea.c @@ -0,0 +1,28 @@ +/* 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 "matrixTrace.h" + +uint16 u16tracea ( uint16* in ,int lines){ + + + int i = 0 ; + //double out = 0 ; + uint16 out = 0; + + for ( i = 0 ; i < lines ; ++i) + out += (uint16)in[i*lines + i] ; + + return out; +} + + diff --git a/src/c/matrixOperations/trace/u8tracea.c b/src/c/matrixOperations/trace/u8tracea.c new file mode 100644 index 0000000..2823f6d --- /dev/null +++ b/src/c/matrixOperations/trace/u8tracea.c @@ -0,0 +1,28 @@ +/* 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 "matrixTrace.h" + +uint8 u8tracea ( uint8* in ,int lines){ + + + int i = 0 ; + //double out = 0 ; + uint8 out = 0; + + for ( i = 0 ; i < lines ; ++i) + out += (uint8)in[i*lines + i] ; + + return out; +} + + diff --git a/src/c/matrixOperations/trace/ztracea.c b/src/c/matrixOperations/trace/ztracea.c new file mode 100644 index 0000000..12154f4 --- /dev/null +++ b/src/c/matrixOperations/trace/ztracea.c @@ -0,0 +1,31 @@ +/* + * 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 "matrixTrace.h" + +doubleComplex ztracea ( doubleComplex* in ,int lines ){ + + + int i = 0 ; + double rout = 0 ; + double iout = 0 ; + + for ( i = 0 ; i < lines ; ++i) + { + rout += zreals (in[i*lines + i] ) ; + iout += zimags (in[i*lines + i] ) ; + } + + return DoubleComplex ( rout , iout ) ; +} + + 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 +#include + +#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 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8D483B26-A264-4BA6-BB6A-36306BCFA8E3} + testMatrixTranspose + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ 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 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ 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]; + } + +} diff --git a/src/c/matrixOperations/tril/dtrila.c b/src/c/matrixOperations/tril/dtrila.c new file mode 100644 index 0000000..b45c85f --- /dev/null +++ b/src/c/matrixOperations/tril/dtrila.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "tril.h" + +void dtrila (double *in, int row, int column, double diag, double *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) >= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/tril/i16trila.c b/src/c/matrixOperations/tril/i16trila.c new file mode 100644 index 0000000..98174d9 --- /dev/null +++ b/src/c/matrixOperations/tril/i16trila.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "tril.h" + +void i16trila (int16 *in, int row, int column, double diag, int16 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) >= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/tril/i8trila.c b/src/c/matrixOperations/tril/i8trila.c new file mode 100644 index 0000000..d06b2aa --- /dev/null +++ b/src/c/matrixOperations/tril/i8trila.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "tril.h" + +void i8trila (int8 *in, int row, int column, double diag, int8 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) >= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/tril/strila.c b/src/c/matrixOperations/tril/strila.c new file mode 100644 index 0000000..bc7f1f2 --- /dev/null +++ b/src/c/matrixOperations/tril/strila.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "tril.h" + +void strila (float *in, int row, int column, double diag, float *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) >= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/tril/u16trila.c b/src/c/matrixOperations/tril/u16trila.c new file mode 100644 index 0000000..418a595 --- /dev/null +++ b/src/c/matrixOperations/tril/u16trila.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "tril.h" + +void u16trila (uint16 *in, int row, int column, double diag, uint16 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) >= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/tril/u8trila.c b/src/c/matrixOperations/tril/u8trila.c new file mode 100644 index 0000000..5c21d88 --- /dev/null +++ b/src/c/matrixOperations/tril/u8trila.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "tril.h" + +void u8trila (uint8 *in, int row, int column, double diag, uint8 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) >= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/triu/dtriua.c b/src/c/matrixOperations/triu/dtriua.c new file mode 100644 index 0000000..80db14b --- /dev/null +++ b/src/c/matrixOperations/triu/dtriua.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "triu.h" + +void dtriua (double *in, int row, int column, double diag, double *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) <= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/triu/i16triua.c b/src/c/matrixOperations/triu/i16triua.c new file mode 100644 index 0000000..a4a0e9f --- /dev/null +++ b/src/c/matrixOperations/triu/i16triua.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "triu.h" + +void i16triua (int16 *in, int row, int column, double diag, int16 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) <= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/triu/i8triua.c b/src/c/matrixOperations/triu/i8triua.c new file mode 100644 index 0000000..c5dcee5 --- /dev/null +++ b/src/c/matrixOperations/triu/i8triua.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "triu.h" + +void i8triua (int8 *in, int row, int column, double diag, int8 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) <= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/triu/striua.c b/src/c/matrixOperations/triu/striua.c new file mode 100644 index 0000000..8ec779e --- /dev/null +++ b/src/c/matrixOperations/triu/striua.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "triu.h" + +void striua (float *in, int row, int column, double diag, float *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) <= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/triu/u16triua.c b/src/c/matrixOperations/triu/u16triua.c new file mode 100644 index 0000000..6341881 --- /dev/null +++ b/src/c/matrixOperations/triu/u16triua.c @@ -0,0 +1,35 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + +#include "triu.h" + +void u16triua (uint16 *in, int row, int column, double diag, uint16 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) <= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/triu/u8triua.c b/src/c/matrixOperations/triu/u8triua.c new file mode 100644 index 0000000..4637e87 --- /dev/null +++ b/src/c/matrixOperations/triu/u8triua.c @@ -0,0 +1,36 @@ +/* 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 +*/ + +/*Function to extract lower triagular entries from given matrix*/ + + +#include "triu.h" + +void u8triua (uint8 *in, int row, int column, double diag, uint8 *out) +{ + int row_counter, col_counter = 0; + + for(row_counter=0; row_counter < row; row_counter++) + { + for(col_counter=0; col_counter < column; col_counter++) + { + if((double)(row_counter + diag) <= (double)col_counter) + { + out[col_counter*row+row_counter] = in[col_counter*row+row_counter]; + } + else + { + out[col_counter*row+row_counter] = 0; + } + } + } +} \ No newline at end of file diff --git a/src/c/matrixOperations/zeros/Makefile.am b/src/c/matrixOperations/zeros/Makefile.am new file mode 100644 index 0000000..7d310af --- /dev/null +++ b/src/c/matrixOperations/zeros/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 +## +## + +libMatrixZeros_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixZeros.la + +HEAD = ../includes/matrixZeros.h + +libMatrixZeros_la_SOURCES = $(HEAD) \ + szerosa.c \ + dzerosa.c \ + czerosa.c \ + zzerosa.c + +check_PROGRAMS = testMatrixZeros + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixZeros.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixZeros_SOURCES = testMatrixZeros.c +testMatrixZeros_LDADD = $(check_LDADD) +testMatrixZeros_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixZeros diff --git a/src/c/matrixOperations/zeros/Makefile.in b/src/c/matrixOperations/zeros/Makefile.in new file mode 100644 index 0000000..f5fbabc --- /dev/null +++ b/src/c/matrixOperations/zeros/Makefile.in @@ -0,0 +1,712 @@ +# 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 = testMatrixZeros$(EXEEXT) +TESTS = testMatrixZeros$(EXEEXT) +subdir = src/c/matrixOperations/zeros +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) +libMatrixZeros_la_LIBADD = +am__objects_1 = +am_libMatrixZeros_la_OBJECTS = $(am__objects_1) \ + libMatrixZeros_la-szerosa.lo libMatrixZeros_la-dzerosa.lo \ + libMatrixZeros_la-czerosa.lo libMatrixZeros_la-zzerosa.lo +libMatrixZeros_la_OBJECTS = $(am_libMatrixZeros_la_OBJECTS) +libMatrixZeros_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixZeros_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_testMatrixZeros_OBJECTS = \ + testMatrixZeros-testMatrixZeros.$(OBJEXT) +testMatrixZeros_OBJECTS = $(am_testMatrixZeros_OBJECTS) +testMatrixZeros_DEPENDENCIES = $(check_LDADD) +testMatrixZeros_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixZeros_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 = $(libMatrixZeros_la_SOURCES) $(testMatrixZeros_SOURCES) +DIST_SOURCES = $(libMatrixZeros_la_SOURCES) $(testMatrixZeros_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@ +libMatrixZeros_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixZeros.la +HEAD = ../includes/matrixZeros.h +libMatrixZeros_la_SOURCES = $(HEAD) \ + szerosa.c \ + dzerosa.c \ + czerosa.c \ + zzerosa.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixZeros.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixZeros_SOURCES = testMatrixZeros.c +testMatrixZeros_LDADD = $(check_LDADD) +testMatrixZeros_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/zeros/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/zeros/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 +libMatrixZeros.la: $(libMatrixZeros_la_OBJECTS) $(libMatrixZeros_la_DEPENDENCIES) + $(libMatrixZeros_la_LINK) -rpath $(pkglibdir) $(libMatrixZeros_la_OBJECTS) $(libMatrixZeros_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 +testMatrixZeros$(EXEEXT): $(testMatrixZeros_OBJECTS) $(testMatrixZeros_DEPENDENCIES) + @rm -f testMatrixZeros$(EXEEXT) + $(testMatrixZeros_LINK) $(testMatrixZeros_OBJECTS) $(testMatrixZeros_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-czerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-dzerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-szerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-zzerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixZeros-testMatrixZeros.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 $@ $< + +libMatrixZeros_la-szerosa.lo: szerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-szerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-szerosa.Tpo -c -o libMatrixZeros_la-szerosa.lo `test -f 'szerosa.c' || echo '$(srcdir)/'`szerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-szerosa.Tpo $(DEPDIR)/libMatrixZeros_la-szerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='szerosa.c' object='libMatrixZeros_la-szerosa.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) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-szerosa.lo `test -f 'szerosa.c' || echo '$(srcdir)/'`szerosa.c + +libMatrixZeros_la-dzerosa.lo: dzerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-dzerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-dzerosa.Tpo -c -o libMatrixZeros_la-dzerosa.lo `test -f 'dzerosa.c' || echo '$(srcdir)/'`dzerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-dzerosa.Tpo $(DEPDIR)/libMatrixZeros_la-dzerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dzerosa.c' object='libMatrixZeros_la-dzerosa.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) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-dzerosa.lo `test -f 'dzerosa.c' || echo '$(srcdir)/'`dzerosa.c + +libMatrixZeros_la-czerosa.lo: czerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-czerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-czerosa.Tpo -c -o libMatrixZeros_la-czerosa.lo `test -f 'czerosa.c' || echo '$(srcdir)/'`czerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-czerosa.Tpo $(DEPDIR)/libMatrixZeros_la-czerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='czerosa.c' object='libMatrixZeros_la-czerosa.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) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-czerosa.lo `test -f 'czerosa.c' || echo '$(srcdir)/'`czerosa.c + +libMatrixZeros_la-zzerosa.lo: zzerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-zzerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-zzerosa.Tpo -c -o libMatrixZeros_la-zzerosa.lo `test -f 'zzerosa.c' || echo '$(srcdir)/'`zzerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-zzerosa.Tpo $(DEPDIR)/libMatrixZeros_la-zzerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zzerosa.c' object='libMatrixZeros_la-zzerosa.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) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-zzerosa.lo `test -f 'zzerosa.c' || echo '$(srcdir)/'`zzerosa.c + +testMatrixZeros-testMatrixZeros.o: testMatrixZeros.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixZeros_CFLAGS) $(CFLAGS) -MT testMatrixZeros-testMatrixZeros.o -MD -MP -MF $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo -c -o testMatrixZeros-testMatrixZeros.o `test -f 'testMatrixZeros.c' || echo '$(srcdir)/'`testMatrixZeros.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo $(DEPDIR)/testMatrixZeros-testMatrixZeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixZeros.c' object='testMatrixZeros-testMatrixZeros.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) $(testMatrixZeros_CFLAGS) $(CFLAGS) -c -o testMatrixZeros-testMatrixZeros.o `test -f 'testMatrixZeros.c' || echo '$(srcdir)/'`testMatrixZeros.c + +testMatrixZeros-testMatrixZeros.obj: testMatrixZeros.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixZeros_CFLAGS) $(CFLAGS) -MT testMatrixZeros-testMatrixZeros.obj -MD -MP -MF $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo -c -o testMatrixZeros-testMatrixZeros.obj `if test -f 'testMatrixZeros.c'; then $(CYGPATH_W) 'testMatrixZeros.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixZeros.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo $(DEPDIR)/testMatrixZeros-testMatrixZeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixZeros.c' object='testMatrixZeros-testMatrixZeros.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) $(testMatrixZeros_CFLAGS) $(CFLAGS) -c -o testMatrixZeros-testMatrixZeros.obj `if test -f 'testMatrixZeros.c'; then $(CYGPATH_W) 'testMatrixZeros.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixZeros.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/zeros/czerosa.c b/src/c/matrixOperations/zeros/czerosa.c new file mode 100644 index 0000000..3a4bf0a --- /dev/null +++ b/src/c/matrixOperations/zeros/czerosa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "zeros.h" + +void czerosa ( floatComplex* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = FloatComplex ( 0 , 0); + + } + +} diff --git a/src/c/matrixOperations/zeros/dzerosa.c b/src/c/matrixOperations/zeros/dzerosa.c new file mode 100644 index 0000000..3d4ac5f --- /dev/null +++ b/src/c/matrixOperations/zeros/dzerosa.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "zeros.h" + +void dzerosa ( double* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 0 ; + + } + +} + diff --git a/src/c/matrixOperations/zeros/dzerosh.c b/src/c/matrixOperations/zeros/dzerosh.c new file mode 100644 index 0000000..87e7e93 --- /dev/null +++ b/src/c/matrixOperations/zeros/dzerosh.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - DIGITEO - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "zeros.h" + +void dzerosh ( double* in , int rows ,int cols, int levels) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols*levels ; i++) + { + in[i] = 0 ; + + } + +} + diff --git a/src/c/matrixOperations/zeros/i16zerosa.c b/src/c/matrixOperations/zeros/i16zerosa.c new file mode 100644 index 0000000..13ff62b --- /dev/null +++ b/src/c/matrixOperations/zeros/i16zerosa.c @@ -0,0 +1,28 @@ +/* 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 "zeros.h" + +void i16zerosa ( int16* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (int16)0 ; + + } + +} + + + diff --git a/src/c/matrixOperations/zeros/i8zerosa.c b/src/c/matrixOperations/zeros/i8zerosa.c new file mode 100644 index 0000000..f8808c0 --- /dev/null +++ b/src/c/matrixOperations/zeros/i8zerosa.c @@ -0,0 +1,28 @@ +/* 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 "zeros.h" + +void i8zerosa ( int8* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (int8)0 ; + + } + +} + + + diff --git a/src/c/matrixOperations/zeros/szerosa.c b/src/c/matrixOperations/zeros/szerosa.c new file mode 100644 index 0000000..22be734 --- /dev/null +++ b/src/c/matrixOperations/zeros/szerosa.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "zeros.h" + +void szerosa ( float* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 0.0f ; + + } + +} + + + diff --git a/src/c/matrixOperations/zeros/testMatrixZeros.c b/src/c/matrixOperations/zeros/testMatrixZeros.c new file mode 100644 index 0000000..b6ebe36 --- /dev/null +++ b/src/c/matrixOperations/zeros/testMatrixZeros.c @@ -0,0 +1,137 @@ +/* + * 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 +#include +#include + +#include "zeros.h" + +#define ROWS 20 +#define COLS 50 + +static void dzerosaTest ( void ) +{ + int i = 0 ; + + double result = 0 ; + + double in [ROWS*COLS] ; + + dzerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = 0 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + + assert ( fabs ( in[i] - result) == 0 ) ; + } +} + + +static void szerosaTest ( void ) +{ + int i = 0 ; + + float result = 0 ; + + float in[ROWS*COLS] ; + + szerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = 0.0f ; + + + assert ( fabs ( in[i] - result) == 0 ) ; + } +} + + +static void zzerosaTest ( void ) +{ + int i = 0 ; + + doubleComplex result = DoubleComplex ( 0 , 0) ; + + doubleComplex in[ROWS*COLS] ; + + zzerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = DoubleComplex ( 0 , 0 ) ; + + + assert ( fabs ( zreals(in[i]) - zreals(result)) == 0 ) ; + assert ( fabs ( zimags(in[i]) - zimags(result)) == 0 ) ; + + } +} + + + + + +static void czerosaTest ( void ) +{ + int i = 0 ; + + floatComplex result = FloatComplex ( 0 , 0 ) ; + + floatComplex in[ROWS*COLS] ; + + czerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = FloatComplex ( 0.0f , 0 ) ; + + + assert ( fabs ( creals(in[i]) - creals(result)) == 0 ) ; + assert ( fabs ( cimags(in[i]) - cimags(result)) == 0 ) ; + + } +} + + + +static int testZeros(void) { + + printf("\n>>>> Matrix ZEROS Tests\n"); + printf("\t>>>> Matrix Double Real Tests\n"); + dzerosaTest(); + + printf("\n\n\t>>>> Matrix Float Real Tests\n"); + szerosaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + czerosaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zzerosaTest(); + + return 0; +} + + + +int main(void) { + assert(testZeros() == 0); + return 0; +} + diff --git a/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj b/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj new file mode 100644 index 0000000..6eac1a4 --- /dev/null +++ b/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D55BC043-1853-4E4C-A8A8-2756682E4B23} + testMatrixZeros + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters b/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters new file mode 100644 index 0000000..c99a596 --- /dev/null +++ b/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/src/c/matrixOperations/zeros/u16zerosa.c b/src/c/matrixOperations/zeros/u16zerosa.c new file mode 100644 index 0000000..3db1ac5 --- /dev/null +++ b/src/c/matrixOperations/zeros/u16zerosa.c @@ -0,0 +1,28 @@ +/* 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 "zeros.h" + +void u16zerosa ( uint16* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (uint16)0 ; + + } + +} + + + diff --git a/src/c/matrixOperations/zeros/u8zerosa.c b/src/c/matrixOperations/zeros/u8zerosa.c new file mode 100644 index 0000000..ee239a6 --- /dev/null +++ b/src/c/matrixOperations/zeros/u8zerosa.c @@ -0,0 +1,28 @@ +/* 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 "zeros.h" + +void u8zerosa ( uint8* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = (uint8)0 ; + + } + +} + + + diff --git a/src/c/matrixOperations/zeros/zzerosa.c b/src/c/matrixOperations/zeros/zzerosa.c new file mode 100644 index 0000000..8d9de66 --- /dev/null +++ b/src/c/matrixOperations/zeros/zzerosa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 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 "zeros.h" + +void zzerosa ( doubleComplex* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = DoubleComplex ( 0 , 0); + + } + +} -- cgit