Fixed include order issue. The cuda utils headers weren't including dlib/config.h before

the asserts that DLIB_USE_CUDA must be defined.  This only matters for users who try to
install dlib and use some build system that doesn't define DLIB_USE_CUDA, and so therefore need
dlib/config.h to define it for them.
This commit is contained in:
Davis King 2018-08-23 08:00:03 -04:00
parent 2ed4c6924d
commit 148dba9733
2 changed files with 4 additions and 2 deletions

View File

@ -3,11 +3,12 @@
#ifndef DLIB_DNN_CuDA_DATA_PTR_H_
#define DLIB_DNN_CuDA_DATA_PTR_H_
#include "../assert.h"
#ifdef DLIB_USE_CUDA
#include <memory>
#include <vector>
#include "../assert.h"
namespace dlib
{

View File

@ -3,12 +3,13 @@
#ifndef DLIB_CUDA_UtILS_H_
#define DLIB_CUDA_UtILS_H_
#include "../algs.h"
#ifndef DLIB_USE_CUDA
#error "This file shouldn't be #included unless DLIB_USE_CUDA is #defined"
#endif
#include "cuda_errors.h"
#include "../algs.h"
#include <cmath>
#include <cuda_runtime.h>