From 9224a46894beec01ed0cd13e812a315691eb4424 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Thu, 15 Dec 2016 22:47:55 +0100
Subject: [PATCH] Add compilation of the kernels

---
 coreblas/compute/CMakeLists.txt | 2 ++
 coreblas/compute/core_ztpmqrt.c | 5 ++---
 coreblas/compute/core_ztpqrt.c  | 8 +-------
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/coreblas/compute/CMakeLists.txt b/coreblas/compute/CMakeLists.txt
index 82813231b..d24bc295a 100644
--- a/coreblas/compute/CMakeLists.txt
+++ b/coreblas/compute/CMakeLists.txt
@@ -73,6 +73,8 @@ set(ZSRC
     core_zsyrk.c
     core_zsyssq.c
     core_zsytf2_nopiv.c
+    core_ztpqrt.c
+    core_ztpmqrt.c
     core_ztradd.c
     core_ztrasm.c
     core_ztrmm.c
diff --git a/coreblas/compute/core_ztpmqrt.c b/coreblas/compute/core_ztpmqrt.c
index 571da630a..ee44b8cf8 100644
--- a/coreblas/compute/core_ztpmqrt.c
+++ b/coreblas/compute/core_ztpmqrt.c
@@ -148,8 +148,7 @@ int CORE_ztpmqrt( MORSE_enum side, MORSE_enum trans,
                   MORSE_Complex64_t *B, int LDB,
                   MORSE_Complex64_t *WORK )
 {
-    int m1;
-    int n1;
+    int m1, n1, ldwork;
 
     /* Check input arguments */
     if ((side != MorseLeft) && (side != MorseRight)) {
@@ -160,7 +159,7 @@ int CORE_ztpmqrt( MORSE_enum side, MORSE_enum trans,
     if ( side == MorseLeft ) {
         m1 = K;
         n1 = N;
-        ldwork = ib;
+        ldwork = IB;
     }
     else {
         m1 = M;
diff --git a/coreblas/compute/core_ztpqrt.c b/coreblas/compute/core_ztpqrt.c
index 76a94fc2c..504951a0c 100644
--- a/coreblas/compute/core_ztpqrt.c
+++ b/coreblas/compute/core_ztpqrt.c
@@ -102,12 +102,6 @@ int CORE_ztpqrt( int M, int N, int L, int IB,
                  MORSE_Complex64_t *T, int LDT,
                  MORSE_Complex64_t *WORK )
 {
-    static MORSE_Complex64_t zone  = 1.0;
-    static MORSE_Complex64_t zzero = 0.0;
-
-    MORSE_Complex64_t alpha;
-    int i, ii, sb;
-
 #if !defined(NDEBUG)
      /* Check input arguments */
     if (M < 0) {
@@ -144,7 +138,7 @@ int CORE_ztpqrt( int M, int N, int L, int IB,
     if ((M == 0) || (N == 0) || (IB == 0))
         return MORSE_SUCCESS;
 
-    if ( L == O ) {
+    if ( L == 0 ) {
         CORE_ztsqrt( M, N, IB, A, LDA, B, LDB, T, LDT, WORK, WORK+N );
     }
     else if (L == M) {
-- 
GitLab