From 02ed083c4c8f2d9c5edb5df52523326d13b9d7ae Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 3 Mar 2019 17:01:48 -0500 Subject: [PATCH] Work around bug in nvcc in cuda 10.1 --- dlib/matrix/matrix.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlib/matrix/matrix.h b/dlib/matrix/matrix.h index 224affb64..cdfbe891b 100644 --- a/dlib/matrix/matrix.h +++ b/dlib/matrix/matrix.h @@ -1771,7 +1771,7 @@ namespace dlib explicit literal_assign_helper(matrix* m_): m(m_), r(0), c(0),has_been_used(false) {next();} ~literal_assign_helper() noexcept(false) { - DLIB_CASSERT(!has_been_used || r == m->nr(), + DLIB_CASSERT(!has_been_used || r == (*m).nr(), "You have used the matrix comma based assignment incorrectly by failing to\n" "supply a full set of values for every element of a matrix object.\n"); } @@ -1780,14 +1780,14 @@ namespace dlib const T& val ) const { - DLIB_CASSERT(r < m->nr() && c < m->nc(), + DLIB_CASSERT(r < (*m).nr() && c < (*m).nc(), "You have used the matrix comma based assignment incorrectly by attempting to\n" << "supply more values than there are elements in the matrix object being assigned to.\n\n" << "Did you forget to call set_size()?" << "\n\t r: " << r << "\n\t c: " << c - << "\n\t m->nr(): " << m->nr() - << "\n\t m->nc(): " << m->nc()); + << "\n\t m->nr(): " << (*m).nr() + << "\n\t m->nc(): " << (*m).nc()); (*m)(r,c) = val; next(); has_been_used = true; @@ -1802,7 +1802,7 @@ namespace dlib ) const { ++c; - if (c == m->nc()) + if (c == (*m).nc()) { c = 0; ++r;