Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
30c62962
Commit
30c62962
authored
Nov 17, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made non-const alias tensors convertible to const alias tensors.
parent
b19e139d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
tensor.h
dlib/dnn/tensor.h
+2
-0
tensor_abstract.h
dlib/dnn/tensor_abstract.h
+3
-0
No files found.
dlib/dnn/tensor.h
View file @
30c62962
...
...
@@ -566,6 +566,8 @@ namespace dlib
const
tensor
&
get
()
const
{
return
inst
;
}
operator
const
tensor
&
()
{
return
inst
;
}
alias_tensor_const_instance
(
const
alias_tensor_instance
&
item
)
:
inst
(
item
)
{}
private
:
alias_tensor_instance
inst
;
...
...
dlib/dnn/tensor_abstract.h
View file @
30c62962
...
...
@@ -601,6 +601,9 @@ namespace dlib
public
:
// non-const alias tensors are convertible to const ones.
alias_tensor_const_instance
(
const
alias_tensor_instance
&
item
);
// Methods that cast the alias to a tensor.
const
tensor
&
get
()
const
;
operator
const
tensor
&
();
...
...
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