Commit b2f6071a authored by Davis King's avatar Davis King

Changed the matrix_data_layout types to use size_t where appropriate so that

large matrices can be handled on windows.
parent 150766bb
...@@ -1643,8 +1643,8 @@ namespace dlib ...@@ -1643,8 +1643,8 @@ namespace dlib
const T val const T val
) )
{ {
const long size = nr()*nc(); const size_t size = nr()*(size_t)nc();
for (long i = 0; i < size; ++i) for (size_t i = 0; i < size; ++i)
data(i) += val; data(i) += val;
return *this; return *this;
...@@ -1654,8 +1654,8 @@ namespace dlib ...@@ -1654,8 +1654,8 @@ namespace dlib
const T val const T val
) )
{ {
const long size = nr()*nc(); const size_t size = nr()*(size_t)nc();
for (long i = 0; i < size; ++i) for (size_t i = 0; i < size; ++i)
data(i) -= val; data(i) -= val;
return *this; return *this;
...@@ -1824,8 +1824,8 @@ namespace dlib ...@@ -1824,8 +1824,8 @@ namespace dlib
) )
{ {
// assign the given value to every spot in this matrix // assign the given value to every spot in this matrix
const long size = nr()*nc(); const size_t size = nr()*(size_t)nc();
for (long i = 0; i < size; ++i) for (size_t i = 0; i < size; ++i)
data(i) = val; data(i) = val;
// Now return the literal_assign_helper so that the user // Now return the literal_assign_helper so that the user
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment