summaryrefslogtreecommitdiff
path: root/benchmark/cula_wrapper.c
blob: 05dbcc231a0f18fcbcb5ab5094b3430ce8705f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include "culapack.h"

static int initialized = 0;

int sgetrf_(int *m, int *n, float  *a, int *lda, int *ipiv, int *info) {

  if (!initialized)  {
    culaInitialize();
    initialized = 1;
  }

  *info = culaSgetrf(*m, *m, a, *lda, ipiv);

  return 0;
}

int cgetrf_(int *m, int *n, float  *a, int *lda, int *ipiv, int *info) {

  if (!initialized)  {
    culaInitialize();
    initialized = 1;
  }

  *info = culaCgetrf(*m, *m, (culaFloatComplex *)a, *lda, ipiv);

  return 0;
}