mirror of https://github.com/davisking/dlib.git
Minor changes to avoid warnings in visual studio 2015
This commit is contained in:
parent
5582530bb3
commit
4a9cccb4d4
|
@ -72,7 +72,7 @@ namespace dlib
|
|||
- (*this)[x] == data[x]
|
||||
!*/
|
||||
|
||||
friend class array2d;
|
||||
friend class array2d<T,mem_manager>;
|
||||
friend class row_helper;
|
||||
|
||||
public:
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace dlib
|
|||
{
|
||||
int can_access;
|
||||
CHECK_CUDA(cudaDeviceCanAccessPeer(&can_access, device_id, peer_device_id));
|
||||
return can_access;
|
||||
return can_access != 0;
|
||||
}
|
||||
bool can_access_peer (const tensor& device, const tensor& peer_device)
|
||||
{
|
||||
|
|
|
@ -131,8 +131,8 @@ namespace dlib
|
|||
|
||||
struct max_jobs
|
||||
{
|
||||
max_jobs(size_t n) : num(n) {}
|
||||
size_t num;
|
||||
max_jobs(int n) : num(n) {}
|
||||
int num;
|
||||
};
|
||||
|
||||
template <typename Kernel, typename... T>
|
||||
|
|
|
@ -137,7 +137,7 @@ namespace dlib
|
|||
const matrix_exp<EXP>& item
|
||||
)
|
||||
{
|
||||
DLIB_CASSERT(idx < num_samples());
|
||||
DLIB_CASSERT(idx < (unsigned long)num_samples());
|
||||
DLIB_CASSERT(item.size() == nr()*nc()*k());
|
||||
static_assert((is_same_type<float, typename EXP::type>::value == true),
|
||||
"To assign a matrix to a tensor the matrix must contain float values");
|
||||
|
|
|
@ -1751,7 +1751,7 @@ namespace dlib
|
|||
|
||||
literal_assign_helper(const literal_assign_helper& item) : m(item.m), r(item.r), c(item.c), has_been_used(false) {}
|
||||
explicit literal_assign_helper(matrix* m_): m(m_), r(0), c(0),has_been_used(false) {next();}
|
||||
~literal_assign_helper() throw (std::exception)
|
||||
~literal_assign_helper() noexcept(false)
|
||||
{
|
||||
DLIB_CASSERT(!has_been_used || r == m->nr(),
|
||||
"You have used the matrix comma based assignment incorrectly by failing to\n"
|
||||
|
@ -1778,7 +1778,7 @@ namespace dlib
|
|||
|
||||
private:
|
||||
|
||||
friend class matrix;
|
||||
friend class matrix<T,num_rows,num_cols,mem_manager,layout>;
|
||||
|
||||
void next (
|
||||
) const
|
||||
|
|
Loading…
Reference in New Issue