Skip to content

Commit 17ea62a

Browse files
committed
chore: bump version to 0.27.0; use int OpenMP induction vars for MSVC
MSVC's OpenMP 2.0 implementation is strict about parallel-for loop index types; the two mask-build loops now use int (2^31 words covers 137G events). Minor version bump for the bitmask-primary CLSM representation and the fused analysis products.
1 parent 250fa8d commit 17ea62a

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
version = "0.26.2"
2+
version = "0.27.0"
33
name = "tttrlib"
44
requires-python = ">=3.9"
55
description = "Read, write & process time-tagged time-resolved (TTTR) data."

src/CLSMImage.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,8 +1556,10 @@ void CLSMImage::fill(
15561556

15571557
// Word-per-thread build: each thread owns whole 64-bit words of every
15581558
// mask, so the read-modify-writes are race-free.
1559+
// 'int' induction variable: MSVC's OpenMP 2.0 is strict about the
1560+
// loop index type (n_words fits: 2^31 words = 137G events)
15591561
#pragma omp parallel for schedule(static) if(use_openmp && n_events >= ACCEPT_MASK_MIN_EVENTS)
1560-
for (int64_t wi = 0; wi < static_cast<int64_t>(n_words); ++wi) {
1562+
for (int wi = 0; wi < static_cast<int>(n_words); ++wi) {
15611563
const size_t base = static_cast<size_t>(wi) << 6;
15621564
const int lim = static_cast<int>(std::min<size_t>(64, n_events - base));
15631565
for (int b = 0; b < lim; ++b) {
@@ -2206,8 +2208,9 @@ void CLSMImage::get_intensity_masked(
22062208
// bit per event (photon type, channel, micro time)
22072209
const size_t n_words = (n_events + 63) >> 6;
22082210
std::vector<uint64_t> accept(n_words, 0);
2211+
// 'int' induction variable for MSVC OpenMP 2.0 compatibility
22092212
#pragma omp parallel for schedule(static) if(use_openmp && n_events >= (size_t(1) << 20))
2210-
for (int64_t wi = 0; wi < static_cast<int64_t>(n_words); ++wi) {
2213+
for (int wi = 0; wi < static_cast<int>(n_words); ++wi) {
22112214
const size_t base = static_cast<size_t>(wi) << 6;
22122215
const int lim = static_cast<int>(std::min<size_t>(64, n_events - base));
22132216
uint64_t bits = 0;

0 commit comments

Comments
 (0)