| 1 |
#include <assert.h> |
| 2 |
#include <stdint.h> |
| 3 |
#include <string.h> |
| 4 |
|
| 5 |
#if BLA_SIZEOF_INTEGER == 4 |
| 6 |
typedef int32_t blas_int; |
| 7 |
#elif BLA_SIZEOF_INTEGER == 8 |
| 8 |
typedef int64_t blas_int; |
| 9 |
#else |
| 10 |
# error BLA_SIZEOF_INTEGER is not declared! |
| 11 |
#endif |
| 12 |
|
| 13 |
// declare what parts of the blas C-API we need |
| 14 |
void dswap_(blas_int* N, double* X, blas_int* incX, double* Y, blas_int* incY); |
| 15 |
|
| 16 |
int main(void) |
| 17 |
{ |
| 18 |
double x[4] = { 1, 2, 3, 4 }; |
| 19 |
double y[4] = { 8, 7, 7, 6 }; |
| 20 |
blas_int N = 4; |
| 21 |
blas_int incX = 1; |
| 22 |
blas_int incY = 1; |
| 23 |
dswap_(&N, x, &incX, y, &incY); |
| 24 |
return 0; |
| 25 |
} |