summaryrefslogtreecommitdiff
path: root/src/c/matrixOperations/transpose
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/matrixOperations/transpose')
-rw-r--r--src/c/matrixOperations/transpose/i16transposea.c27
-rw-r--r--src/c/matrixOperations/transpose/i8transposea.c27
-rw-r--r--src/c/matrixOperations/transpose/u16transposea.c27
-rw-r--r--src/c/matrixOperations/transpose/u8transposea.c27
4 files changed, 108 insertions, 0 deletions
diff --git a/src/c/matrixOperations/transpose/i16transposea.c b/src/c/matrixOperations/transpose/i16transposea.c
new file mode 100644
index 00000000..e370c636
--- /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 00000000..a05ee064
--- /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/u16transposea.c b/src/c/matrixOperations/transpose/u16transposea.c
new file mode 100644
index 00000000..8bf659df
--- /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 00000000..54b53324
--- /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];
+ }
+
+}