Skip to content

Commit

Permalink
Update num. threads (testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
issakomi committed May 17, 2024
1 parent 9b94e6f commit 966d3eb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GUI/graphicswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,10 @@ template<typename T> void load_image(
//
const bool global_flip_x = widget->graphicsview->global_flip_x;
const bool global_flip_y = widget->graphicsview->global_flip_y;
int num_threads = QThread::idealThreadCount();
#if 1
const int num_threads = QThread::idealThreadCount();
#else
int num_threads = QThread::idealThreadCount();
if (num_threads > 1)
{
--num_threads;
Expand Down
4 changes: 4 additions & 0 deletions GUI/studygraphicswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,11 +882,15 @@ template<typename T> void load_image2(
//
const bool global_flip_x = widget->graphicsview->global_flip_x;
const bool global_flip_y = widget->graphicsview->global_flip_y;
#if 1
const int num_threads = QThread::idealThreadCount();
#else
int num_threads = QThread::idealThreadCount();
if (num_threads > 1)
{
--num_threads;
}
#endif
const int tmp99 = size[1] % num_threads;
std::vector<QThread*> threadsLUT_;
if (tmp99 == 0)
Expand Down
4 changes: 4 additions & 0 deletions dicom/srutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,15 @@ template<typename T> SRImage li3(
}
//
std::vector<QThread*> threadsLUT_;
#if 1
const int num_threads = QThread::idealThreadCount();
#else
int num_threads = QThread::idealThreadCount();
if (num_threads > 1)
{
--num_threads;
}
#endif
const int tmp99 = size[1] % num_threads;
const double center = ivariant->di->us_window_center;
const double width = ivariant->di->us_window_width;
Expand Down

0 comments on commit 966d3eb

Please sign in to comment.