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
OpenDAS
dlib
Commits
cb9cb4e0
"...csrc/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "4b040a652b675c0416c40367a5fa8fe73366b3ba"
Commit
cb9cb4e0
authored
Jan 30, 2017
by
Davis King
Browse files
Made matrix literal assignment faster for column major matrices.
parent
601d1612
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
dlib/matrix/matrix.h
dlib/matrix/matrix.h
+3
-7
No files found.
dlib/matrix/matrix.h
View file @
cb9cb4e0
...
@@ -1812,13 +1812,9 @@ namespace dlib
...
@@ -1812,13 +1812,9 @@ namespace dlib
)
)
{
{
// assign the given value to every spot in this matrix
// assign the given value to every spot in this matrix
for
(
long
r
=
0
;
r
<
nr
();
++
r
)
const
long
size
=
nr
()
*
nc
();
{
for
(
long
i
=
0
;
i
<
size
;
++
i
)
for
(
long
c
=
0
;
c
<
nc
();
++
c
)
data
(
i
)
=
val
;
{
data
(
r
,
c
)
=
val
;
}
}
// Now return the literal_assign_helper so that the user
// Now return the literal_assign_helper so that the user
// can use the overloaded comma notation to initialize
// can use the overloaded comma notation to initialize
...
...
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