Turning off compilation for GPU detector by default.

Compiler flag can be used to re-enable it
This commit is contained in:
Matt Hill
2015-03-11 20:40:55 -04:00
parent 524e11730a
commit 5e03e5b02f
6 changed files with 23 additions and 2 deletions

View File

@@ -20,6 +20,7 @@
#include "detectorcuda.h"
#if COMPILE_GPU
using namespace cv;
using namespace std;
@@ -137,4 +138,6 @@ namespace alpr
}
}
}
#endif

View File

@@ -20,6 +20,8 @@
#ifndef OPENALPR_DETECTORCUDA_H
#define OPENALPR_DETECTORCUDA_H
#if COMPILE_GPU
#include <stdio.h>
#include <iostream>
#include <vector>
@@ -50,6 +52,8 @@ namespace alpr
};
}
#endif
#endif /* OPENALPR_DETECTORCUDA_H */

View File

@@ -11,7 +11,13 @@ namespace alpr
}
else if (config->gpu_mode == 1)
{
#if COMPILE_GPU
return new DetectorCUDA(config);
#else
std::cerr << "Error: GPU detector requested, but GPU extensions are not compiled. " <<
"Add COMPILE_GPU=1 to the compiler definitions to enable GPU compilation." <<
std::endl;
#endif
}
}