Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
5fb1e359
"docs-source/vscode:/vscode.git/clone" did not exist on "87a70daf1753105594cc8996aabdc66daddfcd6f"
Commit
5fb1e359
authored
May 29, 2020
by
yanyan
Browse files
fix lambda capture problem in gcc 5
parent
02eb1d56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/tensorview/tensor.h
include/tensorview/tensor.h
+5
-5
No files found.
include/tensorview/tensor.h
View file @
5fb1e359
...
@@ -833,13 +833,13 @@ struct Tensor {
...
@@ -833,13 +833,13 @@ struct Tensor {
auto
tensor
=
Tensor
();
auto
tensor
=
Tensor
();
Dispatch
<
detail
::
all_tensor_types_t
>
()(
dtype
,
[
&
](
auto
Idst
)
{
Dispatch
<
detail
::
all_tensor_types_t
>
()(
dtype
,
[
&
](
auto
Idst
)
{
using
Tdst
=
decltype
(
Idst
);
using
Tdst
=
decltype
(
Idst
);
Dispatch
<
detail
::
all_tensor_types_t
>
()(
dtype_
,
[
&
](
auto
Icur
)
{
Dispatch
<
detail
::
all_tensor_types_t
>
()(
this
->
dtype_
,
[
&
](
auto
Icur
)
{
using
Tcur
=
decltype
(
Icur
);
using
Tcur
=
decltype
(
Icur
);
if
(
std
::
is_convertible
<
Tcur
,
Tdst
>::
value
)
{
if
(
std
::
is_convertible
<
Tcur
,
Tdst
>::
value
)
{
auto
ptr
=
data
<
Tcur
>
();
auto
ptr
=
this
->
data
<
Tcur
>
();
tensor
=
Tensor
(
shape_
,
stride_
,
dtype
,
device
(),
pinned
(),
tensor
=
Tensor
(
this
->
shape_
,
this
->
stride_
,
dtype
,
this
->
device
(),
this
->
pinned
(),
storage_
->
managed
());
this
->
storage_
->
managed
());
std
::
copy
(
ptr
,
ptr
+
size
(),
tensor
.
data
<
Tdst
>
());
std
::
copy
(
ptr
,
ptr
+
this
->
size
(),
tensor
.
data
<
Tdst
>
());
}
else
{
}
else
{
TV_THROW_INVALID_ARG
(
"not convertable from"
,
type_s
<
Tcur
>
,
"to"
,
TV_THROW_INVALID_ARG
(
"not convertable from"
,
type_s
<
Tcur
>
,
"to"
,
type_s
<
Tdst
>
);
type_s
<
Tdst
>
);
...
...
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