From 06337f0dc8114c70fd0c7767083971a0d091750a Mon Sep 17 00:00:00 2001 From: Sandeep Gupta Date: Wed, 5 Jul 2017 12:41:25 +0530 Subject: LinearAlgebra and MatrixOperation Update --- src/c/string/disp/ddisph.c | 2 +- src/c/string/disp/ddisps.c | 2 +- src/c/string/disp/zdispa.c | 2 +- src/c/string/disp/zdisps.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/c/string/disp') diff --git a/src/c/string/disp/ddisph.c b/src/c/string/disp/ddisph.c index 71cda9f..b36ecb8 100644 --- a/src/c/string/disp/ddisph.c +++ b/src/c/string/disp/ddisph.c @@ -22,7 +22,7 @@ double ddisph (double* in, int rows, int columns, int levels){ { for (j=0;j +#include +#include "disp.h" + + +#define SIZE 10000 + +/* +** \float scalars displaying test +*/ +static void sdispaTest (void) { + + int i = 0 ; + float tabF[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabF[i] = (float) rand () ; + } + + sdispa ( tabF, 1, SIZE ); +} + +/* +** \double scalars displaying test +*/ + +static void ddispaTest (void) { + + int i = 0 ; + double tabD[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabD[i] = (double) rand () ; + } + + ddispa ( tabD, 1, SIZE ) ; + +} + + +/* +** \float complexes displaying test +*/ +static void cdispaTest (void) { + + int i = 0 ; + floatComplex tabF[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabF[i] = FloatComplex ((float) rand (), (float) rand()); + } + + cdispa ( tabF, 1, SIZE ) ; +} + + + +/* +** \double complexes displaying test +*/ +static void zdispaTest (void) { + + int i = 0 ; + doubleComplex tabD[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabD[i] = DoubleComplex ((double) rand (), (double) rand()); + } + + zdispa ( tabD, 1, SIZE ) ; + +} + + + +static int testDisp (void) { + + printf("\n>>>> Disp Tests\n"); + sdispaTest(); + ddispaTest(); + cdispaTest(); + zdispaTest(); + + return 0; +} + + +int main(void) { + assert(testDisp() == 0); + return 0; +} diff --git a/src/c/string/disp/test_Disp/testDisp.vcxproj b/src/c/string/disp/test_Disp/testDisp.vcxproj new file mode 100644 index 0000000..c0b76e7 --- /dev/null +++ b/src/c/string/disp/test_Disp/testDisp.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {432917E4-F042-47B2-BF43-0C376883A7E6} + testDisp + 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;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(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 + + + {38a141f2-df77-4032-a17c-0901ea1a7af1} + false + + + + + + \ No newline at end of file diff --git a/src/c/string/disp/test_Disp/testDisp.vcxproj.filters b/src/c/string/disp/test_Disp/testDisp.vcxproj.filters new file mode 100644 index 0000000..5108902 --- /dev/null +++ b/src/c/string/disp/test_Disp/testDisp.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/string/disp/u16dispa.c b/src/c/string/disp/u16dispa.c new file mode 100644 index 0000000..ad3685e --- /dev/null +++ b/src/c/string/disp/u16dispa.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 "disp.h" + +double u16dispa (uint16* in, int rows, int columns){ + int i = 0,j = 0; + + for (i = 0; i < rows; ++i) { + for (j=0;j>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 printf("\n"); } return 0; -- cgit