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
MIGraphX
Commits
972cfffe
Commit
972cfffe
authored
Aug 27, 2018
by
Paul
Browse files
Formatting
parent
1692db3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
+7
-7
No files found.
src/targets/gpu/device/include/migraph/gpu/device/nary.hpp
View file @
972cfffe
...
@@ -10,11 +10,11 @@ namespace migraph {
...
@@ -10,11 +10,11 @@ namespace migraph {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
template
<
class
T
>
template
<
class
T
>
using
vec4
=
T
__attribute__
((
ext_vector_type
(
4
)));
using
vec4
=
T
__attribute__
((
ext_vector_type
(
4
)));
template
<
class
T
>
template
<
class
T
>
vec4
<
T
>*
as_vec4
(
T
*
x
)
vec4
<
T
>*
as_vec4
(
T
*
x
)
{
{
return
reinterpret_cast
<
vec4
<
T
>*>
(
x
);
return
reinterpret_cast
<
vec4
<
T
>*>
(
x
);
}
}
...
@@ -77,13 +77,13 @@ inline auto binary_broadcast(argument result, argument arg1, argument arg2)
...
@@ -77,13 +77,13 @@ inline auto binary_broadcast(argument result, argument arg1, argument arg2)
{
{
vec4
<
type
>
x
=
xp
[
i
];
vec4
<
type
>
x
=
xp
[
i
];
vec4
<
type
>
out
=
outp
[
i
];
vec4
<
type
>
out
=
outp
[
i
];
for
(
std
::
size_t
j
=
0
;
j
<
4
;
j
++
)
{
for
(
std
::
size_t
j
=
0
;
j
<
4
;
j
++
)
{
auto
gidx
=
i
*
4
+
j
;
auto
gidx
=
i
*
4
+
j
;
auto
bidx
=
gidx
%
bdim_len
;
auto
bidx
=
gidx
%
bdim_len
;
auto
b
=
buffer
[
bidx
];
auto
b
=
buffer
[
bidx
];
out
[
j
]
=
f
(
x
[
j
],
b
);
out
[
j
]
=
f
(
x
[
j
],
b
);
}
}
}
}
});
});
});
});
...
...
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