Skip to content

Commit

Permalink
finufft: use OMP-determined num threads by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarrison committed Mar 27, 2024
1 parent f6fddad commit bee05cf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/nifty_ls/finufft.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from __future__ import annotations

import os

import finufft
import numpy as np

from . import cpu_helpers

DEFAULT_NTHREAD = len(os.sched_getaffinity(0))
DEFAULT_NTHREAD = 0 # let finufft detect according to OMP

FFTW_MEASURE = 0
FFTW_ESTIMATE = 64
Expand Down Expand Up @@ -41,9 +40,6 @@ def lombscargle(
# TODO: better thread heuristics?
nthreads = 1 if Nf <= 10**5 else DEFAULT_NTHREAD

if nthreads < 1:
nthreads = DEFAULT_NTHREAD

dtype = t.dtype

if finufft_kwargs['eps'] == 'default':
Expand Down

0 comments on commit bee05cf

Please sign in to comment.