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
a289f7b2
Commit
a289f7b2
authored
Sep 28, 2020
by
Chao Liu
Browse files
refactoring Array
parent
84bbb63e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
composable_kernel/include/kernel_algorithm/dummy_static_transform.hpp
...ernel/include/kernel_algorithm/dummy_static_transform.hpp
+1
-1
composable_kernel/include/tensor_description/multi_index.hpp
composable_kernel/include/tensor_description/multi_index.hpp
+1
-1
composable_kernel/include/utility/array.hpp
composable_kernel/include/utility/array.hpp
+1
-1
No files found.
composable_kernel/include/kernel_algorithm/dummy_static_transform.hpp
View file @
a289f7b2
...
...
@@ -99,7 +99,7 @@ struct DummyStaticTransform
#pragma unroll 1
for
(
index_t
k
=
0
;
k
<
100
;
++
k
)
{
coord
+=
Array
<
index_t
,
2
>
{{
8
,
0
}}
;
coord
+=
make_multi_index
(
8
,
0
)
;
Float
value
=
1
;
transfer_data
<
Float
,
...
...
composable_kernel/include/tensor_description/multi_index.hpp
View file @
a289f7b2
...
...
@@ -10,7 +10,7 @@ template <index_t N>
using
MultiIndex
=
Array
<
index_t
,
N
>
;
template
<
typename
...
Xs
>
__host__
__device__
constexpr
auto
make_multi_index
(
Xs
...
xs
)
__host__
__device__
constexpr
auto
make_multi_index
(
const
Xs
&
...
xs
)
{
return
make_array
<
index_t
>
(
xs
...);
}
...
...
composable_kernel/include/utility/array.hpp
View file @
a289f7b2
...
...
@@ -55,7 +55,7 @@ __host__ __device__ constexpr auto make_array(const X& x, const Xs&... xs)
template
<
typename
X
,
typename
...
Xs
>
__host__
__device__
constexpr
auto
make_array
(
X
&&
x
,
Xs
&&
...
xs
)
{
return
Array
<
remove_cv_t
<
remove_reference_t
<
X
>>
,
sizeof
...(
Xs
)
+
1
>
(
x
,
xs
...
)
;
return
Array
<
remove_cv_t
<
remove_reference_t
<
X
>>
,
sizeof
...(
Xs
)
+
1
>
{{
x
,
xs
...
}}
;
}
#endif
...
...
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