Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
eff1665e
Commit
eff1665e
authored
Mar 21, 2017
by
Pavel Kus
Browse files
fixing single precission complex on Minsky
parent
f166a683
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/cudaFunctions.cu
View file @
eff1665e
...
...
@@ -188,34 +188,45 @@ extern "C" {
return
val
;
}
void
CUBLASWINAPI
cublasCgemv_elpa_wrapper
(
char
trans
,
int
m
,
int
n
,
float
complex
alpha
,
const
cuF
loat
C
omplex
*
A
,
int
lda
,
const
cuF
loat
C
omplex
*
x
,
int
incx
,
float
complex
beta
,
cuF
loat
C
omplex
*
y
,
int
incy
)
{
void
cublasCgemv_elpa_wrapper
(
char
trans
,
int
m
,
int
n
,
float
complex
alpha
,
const
f
loat
c
omplex
*
A
,
int
lda
,
const
f
loat
c
omplex
*
x
,
int
incx
,
float
complex
beta
,
f
loat
c
omplex
*
y
,
int
incy
)
{
cuFloatComplex
alpha_casted
=
{
crealf
(
alpha
),
cimagf
(
alpha
)
}
;
cuFloatComplex
beta_casted
=
{
crealf
(
beta
),
cimagf
(
beta
)
}
;
cuFloatComplex
alpha_casted
=
*
((
cuFloatComplex
*
)(
&
alpha
)
)
;
cuFloatComplex
beta_casted
=
*
((
cuFloatComplex
*
)(
&
beta
)
)
;
cublasCgemv
(
trans
,
m
,
n
,
alpha_casted
,
A
,
lda
,
x
,
incx
,
beta_casted
,
y
,
incy
);
const
cuFloatComplex
*
A_casted
=
(
const
cuFloatComplex
*
)
A
;
const
cuFloatComplex
*
x_casted
=
(
const
cuFloatComplex
*
)
x
;
cuFloatComplex
*
y_casted
=
(
cuFloatComplex
*
)
y
;
cublasCgemv
(
trans
,
m
,
n
,
alpha_casted
,
A_casted
,
lda
,
x_casted
,
incx
,
beta_casted
,
y_casted
,
incy
);
}
void
CUBLASWINAPI
cublasCgemm_elpa_wrapper
(
char
transa
,
char
transb
,
int
m
,
int
n
,
int
k
,
float
complex
alpha
,
const
cuComplex
*
A
,
int
lda
,
const
cuComplex
*
B
,
int
ldb
,
float
complex
beta
,
cuComplex
*
C
,
int
ldc
)
{
cuFloatComplex
alpha_casted
=
{
crealf
(
alpha
),
cimagf
(
alpha
)};
cuFloatComplex
beta_casted
=
{
crealf
(
beta
),
cimagf
(
beta
)};
void
cublasCgemm_elpa_wrapper
(
char
transa
,
char
transb
,
int
m
,
int
n
,
int
k
,
float
complex
alpha
,
const
float
complex
*
A
,
int
lda
,
const
float
complex
*
B
,
int
ldb
,
float
complex
beta
,
float
complex
*
C
,
int
ldc
)
{
cuFloatComplex
alpha_casted
=
*
((
cuFloatComplex
*
)(
&
alpha
));
cuFloatComplex
beta_casted
=
*
((
cuFloatComplex
*
)(
&
beta
));
cublasCgemm
(
transa
,
transb
,
m
,
n
,
k
,
alpha_casted
,
A
,
lda
,
B
,
ldb
,
beta_casted
,
C
,
ldc
);
const
cuFloatComplex
*
A_casted
=
(
const
cuFloatComplex
*
)
A
;
const
cuFloatComplex
*
B_casted
=
(
const
cuFloatComplex
*
)
B
;
cuFloatComplex
*
C_casted
=
(
cuFloatComplex
*
)
C
;
cublasCgemm
(
transa
,
transb
,
m
,
n
,
k
,
alpha_casted
,
A_casted
,
lda
,
B_casted
,
ldb
,
beta_casted
,
C_casted
,
ldc
);
}
void
CUBLASWINAPI
cublasCtrmm_elpa_wrapper
(
char
side
,
char
uplo
,
char
transa
,
char
diag
,
int
m
,
int
n
,
float
complex
alpha
,
const
cuC
omplex
*
A
,
int
lda
,
cuC
omplex
*
B
,
int
ldb
){
void
cublasCtrmm_elpa_wrapper
(
char
side
,
char
uplo
,
char
transa
,
char
diag
,
int
m
,
int
n
,
float
complex
alpha
,
const
float
c
omplex
*
A
,
int
lda
,
float
c
omplex
*
B
,
int
ldb
){
cuFloatComplex
alpha_casted
=
{
crealf
(
alpha
),
cimagf
(
alpha
)};
cuFloatComplex
alpha_casted
=
*
((
cuFloatComplex
*
)(
&
alpha
));
const
cuFloatComplex
*
A_casted
=
(
const
cuFloatComplex
*
)
A
;
cuFloatComplex
*
B_casted
=
(
cuFloatComplex
*
)
B
;
cublasCtrmm
(
side
,
uplo
,
transa
,
diag
,
m
,
n
,
alpha_casted
,
A
,
lda
,
B
,
ldb
);
cublasCtrmm
(
side
,
uplo
,
transa
,
diag
,
m
,
n
,
alpha_casted
,
A
_casted
,
lda
,
B
_casted
,
ldb
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment