Correction of a little bug in the Slicer class (OpenMP) + code cleanup
This commit is contained in:
@@ -18,8 +18,11 @@
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include <slicer.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
using namespace rtengine;
|
||||
|
||||
@@ -67,9 +70,9 @@ Slicer::Slicer(unsigned int imageWidth, unsigned int imageHeight, Block *subRegi
|
||||
|
||||
//total number of core/processor
|
||||
#ifdef _OPENMP
|
||||
procNumber = omp_get_num_procs();
|
||||
unsigned int procNumber = omp_get_num_procs();
|
||||
#else
|
||||
procNumber = 1;
|
||||
unsigned int procNumber = 1;
|
||||
#endif
|
||||
|
||||
//calculate the number of block
|
||||
@@ -88,9 +91,6 @@ Slicer::Slicer(unsigned int imageWidth, unsigned int imageHeight, Block *subRegi
|
||||
|
||||
}
|
||||
|
||||
Slicer::~Slicer() {
|
||||
}
|
||||
|
||||
// return the absolute position and size of the requested block
|
||||
void Slicer::get_block(unsigned int numBlock, Block *block) {
|
||||
double roundingTradeOff = (hBlockNumber - (double)((int)hBlockNumber)) == 0.5 ? 2.1 : 2.0;
|
||||
|
Reference in New Issue
Block a user