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
Commit
cb9cb4e0
authored
Jan 30, 2017
by
Davis King
Browse files
Made matrix literal assignment faster for column major matrices.
parent
601d1612
Changes
1
Hide 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