Commit 6c18aaa3 authored by Andreas Marek's avatar Andreas Marek
Browse files

Type error when converting cpp to c files

The correct type is "float complex" for single precision, not
"complex". Double precision should be "double complex"

This closes issue #17
parent 7fc53950
......@@ -83,9 +83,9 @@
#endif
//Forward declaration
static __forceinline void hh_trafo_complex_kernel_12_AVX_1hv_single(complex* q, complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_8_AVX_1hv_single(complex* q, complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(complex* q, complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_12_AVX_1hv_single(float complex* q, float complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_8_AVX_1hv_single(float complex* q, float complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(float complex* q, float complex* hh, int nb, int ldq);
/*
!f>#ifdef HAVE_AVX
......@@ -101,7 +101,7 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(complex* q,
!f>#endif
*/
void single_hh_trafo_complex_avx_avx2_1hv_single(complex* q, complex* hh, int* pnb, int* pnq, int* pldq)
void single_hh_trafo_complex_avx_avx2_1hv_single(float complex* q, float complex* hh, int* pnb, int* pnq, int* pldq)
{
int i;
int nb = *pnb;
......@@ -142,7 +142,7 @@ void single_hh_trafo_complex_avx_avx2_1hv_single(complex* q, complex* hh, int* p
}
}
static __forceinline void hh_trafo_complex_kernel_12_AVX_1hv_single(complex* q, complex* hh, int nb, int ldq)
static __forceinline void hh_trafo_complex_kernel_12_AVX_1hv_single(float complex* q, float complex* hh, int nb, int ldq)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......@@ -343,7 +343,7 @@ void single_hh_trafo_complex_avx_avx2_1hv_single(complex* q, complex* hh, int* p
}
}
static __forceinline void hh_trafo_complex_kernel_8_AVX_1hv_single(complex* q, complex* hh, int nb, int ldq)
static __forceinline void hh_trafo_complex_kernel_8_AVX_1hv_single(float complex* q, float complex* hh, int nb, int ldq)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......@@ -494,7 +494,7 @@ static __forceinline void hh_trafo_complex_kernel_8_AVX_1hv_single(complex* q, c
}
}
static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(complex* q, complex* hh, int nb, int ldq)
static __forceinline void hh_trafo_complex_kernel_4_AVX_1hv_single(float complex* q, float complex* hh, int nb, int ldq)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......
......@@ -83,10 +83,10 @@
#endif
//Forward declaration
static __forceinline void hh_trafo_complex_kernel_8_AVX_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1);
//static __forceinline void hh_trafo_complex_kernel_6_AVX_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1);
static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1);
//static __forceinline void hh_trafo_complex_kernel_2_AVX_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1);
static __forceinline void hh_trafo_complex_kernel_8_AVX_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1);
//static __forceinline void hh_trafo_complex_kernel_6_AVX_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1);
static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1);
//static __forceinline void hh_trafo_complex_kernel_2_AVX_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1);
/*
!f>#ifdef HAVE_AVX
......@@ -103,7 +103,7 @@ static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(complex* q, c
*/
void double_hh_trafo_complex_avx_avx2_2hv_single(complex* q, complex* hh, int* pnb, int* pnq, int* pldq, int* pldh)
void double_hh_trafo_complex_avx_avx2_2hv_single(float complex* q, float complex* hh, int* pnb, int* pnq, int* pldq, int* pldh)
{
int i;
int nb = *pnb;
......@@ -111,7 +111,7 @@ void double_hh_trafo_complex_avx_avx2_2hv_single(complex* q, complex* hh, int* p
int ldq = *pldq;
int ldh = *pldh;
complex s = conj(hh[(ldh)+1])*1.0f;
float complex s = conj(hh[(ldh)+1])*1.0f;
for (i = 2; i < nb; i++)
{
s += hh[i-1] * conj(hh[(i+ldh)]);
......@@ -128,7 +128,7 @@ void double_hh_trafo_complex_avx_avx2_2hv_single(complex* q, complex* hh, int* p
}
static __forceinline void hh_trafo_complex_kernel_8_AVX_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1)
static __forceinline void hh_trafo_complex_kernel_8_AVX_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......@@ -567,7 +567,7 @@ static __forceinline void hh_trafo_complex_kernel_8_AVX_2hv_single(complex* q, c
// _mm256_store_pd(&q_dbl[(2*nb*ldq)+12], q4);
}
static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1)
static __forceinline void hh_trafo_complex_kernel_4_AVX_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......
......@@ -73,9 +73,9 @@
//Forward declaration
static __forceinline void hh_trafo_complex_kernel_6_SSE_1hv_single(complex* q, complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_4_SSE_1hv_single(complex* q, complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(complex* q, complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_6_SSE_1hv_single(float complex* q, float complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_4_SSE_1hv_single(float complex* q, float complex* hh, int nb, int ldq);
static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(float complex* q, float complex* hh, int nb, int ldq);
/*
!f>#ifdef HAVE_SSE_INTRINSICS
......@@ -91,7 +91,7 @@ static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(complex* q, c
!f>#endif
*/
void single_hh_trafo_complex_sse_1hv_single(complex* q, complex* hh, int* pnb, int* pnq, int* pldq)
void single_hh_trafo_complex_sse_1hv_single(float complex* q, float complex* hh, int* pnb, int* pnq, int* pldq)
{
int i;
int nb = *pnb;
......@@ -113,7 +113,7 @@ void single_hh_trafo_complex_sse_1hv_single(complex* q, complex* hh, int* pnb, i
}
}
static __forceinline void hh_trafo_complex_kernel_6_SSE_1hv_single(complex* q, complex* hh, int nb, int ldq)
static __forceinline void hh_trafo_complex_kernel_6_SSE_1hv_single(float complex* q, float complex* hh, int nb, int ldq)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......@@ -312,7 +312,7 @@ static __forceinline void hh_trafo_complex_kernel_6_SSE_1hv_single(complex* q, c
}
}
static __forceinline void hh_trafo_complex_kernel_4_SSE_1hv_single(complex* q, complex* hh, int nb, int ldq)
static __forceinline void hh_trafo_complex_kernel_4_SSE_1hv_single(float complex* q, float complex* hh, int nb, int ldq)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......@@ -464,7 +464,7 @@ static __forceinline void hh_trafo_complex_kernel_4_SSE_1hv_single(complex* q, c
}
}
static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(complex* q, complex* hh, int nb, int ldq)
static __forceinline void hh_trafo_complex_kernel_2_SSE_1hv_single(float complex* q, float complex* hh, int nb, int ldq)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......
......@@ -71,7 +71,7 @@
#endif
//Forward declaration
static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1);
static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1);
/*
!f>#ifdef HAVE_SSE_INTRINSICS
......@@ -86,7 +86,7 @@ static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(complex* q, c
!f> end interface
!f>#endif
*/
void double_hh_trafo_complex_sse_2hv_single(complex* q, complex* hh, int* pnb, int* pnq, int* pldq, int* pldh)
void double_hh_trafo_complex_sse_2hv_single(float complex* q, float complex* hh, int* pnb, int* pnq, int* pldq, int* pldh)
{
int i;
int nb = *pnb;
......@@ -94,7 +94,7 @@ void double_hh_trafo_complex_sse_2hv_single(complex* q, complex* hh, int* pnb, i
int ldq = *pldq;
int ldh = *pldh;
complex s = conj(hh[(ldh)+1])*1.0f;
float complex s = conj(hh[(ldh)+1])*1.0f;
for (i = 2; i < nb; i++)
{
s += hh[i-1] * conj(hh[(i+ldh)]);
......@@ -106,7 +106,7 @@ void double_hh_trafo_complex_sse_2hv_single(complex* q, complex* hh, int* pnb, i
}
}
static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(complex* q, complex* hh, int nb, int ldq, int ldh, complex s, complex s1)
static __forceinline void hh_trafo_complex_kernel_4_SSE_2hv_single(float complex* q, float complex* hh, int nb, int ldq, int ldh, float complex s, float complex s1)
{
float* q_dbl = (float*)q;
float* hh_dbl = (float*)hh;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment