Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel
Commits
fac152d2
Commit
fac152d2
authored
Nov 27, 2023
by
muozturk
Browse files
fp32 and fp64 are done
parent
89f5d30a
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
928 deletions
+0
-928
example/complex_contraction_3/Complex.hpp
example/complex_contraction_3/Complex.hpp
+0
-83
example/complex_contraction_3/contraction_bilinear_xdl_fp64.cpp
...e/complex_contraction_3/contraction_bilinear_xdl_fp64.cpp
+0
-293
example/complex_contraction_3/contraction_scale_xdl_fp32.cpp
example/complex_contraction_3/contraction_scale_xdl_fp32.cpp
+0
-276
example/complex_contraction_3/contraction_scale_xdl_fp64.cpp
example/complex_contraction_3/contraction_scale_xdl_fp64.cpp
+0
-276
No files found.
example/complex_contraction_3/Complex.hpp
deleted
100755 → 0
View file @
89f5d30a
#include <iostream>
#include <vector>
using
namespace
std
;
class
Complex
{
private:
float
real
;
float
imag
;
public:
Complex
(){
this
->
real
=
0
;
this
->
imag
=
0
;
}
Complex
(
float
real
,
float
imag
)
{
this
->
real
=
real
;
this
->
imag
=
imag
;
}
void
setReal
(
float
real
)
{
this
->
real
=
real
;
}
void
setImag
(
float
imag
)
{
this
->
imag
=
imag
;
}
float
getReal
()
const
{
return
this
->
real
;
}
float
getImag
()
const
{
return
this
->
imag
;
}
Complex
operator
+
(
Complex
const
&
obj
)
{
Complex
res
;
res
.
real
=
this
->
real
+
obj
.
real
;
res
.
imag
=
this
->
imag
+
obj
.
imag
;
return
res
;
}
Complex
operator
-
(
Complex
const
&
obj
)
{
Complex
res
;
res
.
real
=
this
->
real
-
obj
.
real
;
res
.
imag
=
this
->
imag
-
obj
.
imag
;
return
res
;
}
Complex
operator
*
(
Complex
const
&
obj
)
{
Complex
res
;
res
.
real
=
this
->
real
*
obj
.
real
-
this
->
imag
*
obj
.
imag
;
res
.
imag
=
this
->
real
*
obj
.
imag
+
this
->
imag
*
obj
.
real
;
return
res
;
}
friend
bool
operator
!=
(
Complex
const
&
obj1
,
Complex
const
&
obj2
)
{
return
(
obj1
.
real
!=
obj2
.
real
||
obj1
.
imag
!=
obj2
.
imag
);
}
friend
bool
operator
==
(
Complex
const
&
obj1
,
Complex
const
&
obj2
)
{
return
(
obj1
.
real
==
obj2
.
real
&&
obj1
.
imag
==
obj2
.
imag
);
}
friend
ostream
&
operator
<<
(
ostream
&
os
,
const
Complex
&
obj
)
{
os
<<
obj
.
real
<<
" + "
<<
obj
.
imag
<<
"i"
;
return
os
;
}
Complex
complex_mult
(
Complex
const
&
obj
)
const
{
return
Complex
(
this
->
real
*
obj
.
real
-
this
->
imag
*
obj
.
imag
,
this
->
real
*
obj
.
imag
+
this
->
imag
*
obj
.
real
);
}
};
\ No newline at end of file
example/complex_contraction_3/contraction_bilinear_xdl_fp64.cpp
deleted
100644 → 0
View file @
89f5d30a
This diff is collapsed.
Click to expand it.
example/complex_contraction_3/contraction_scale_xdl_fp32.cpp
deleted
100644 → 0
View file @
89f5d30a
This diff is collapsed.
Click to expand it.
example/complex_contraction_3/contraction_scale_xdl_fp64.cpp
deleted
100644 → 0
View file @
89f5d30a
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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