Correction of a little bug in the Slicer class (OpenMP) + code cleanup

This commit is contained in:
Hombre
2010-08-24 19:52:58 +02:00
parent 77d561513b
commit 57ecf0d6ba
2 changed files with 6 additions and 14 deletions

View File

@@ -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;