star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.fr/star-line.git
Log | Files | Refs | README | LICENSE

commit a18b7b206480fc086260e1be30364f7c6efca030
parent dfa5deae6526586f0a3b4687fe0c1da79a869907
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 30 Apr 2026 12:21:07 +0200

Fix the validation of tree creation parameters

Return an error if the number of threads to use is zero.

Diffstat:
Msrc/sln_tree.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/sln_tree.c b/src/sln_tree.c @@ -237,6 +237,12 @@ check_sln_tree_create_args return RES_BAD_ARG; } + if(args->nthreads_hint == 0) { + ERROR(sln, "%s: invalid number of threads %u\n", + caller, args->nthreads_hint); + return RES_BAD_ARG; + } + res = check_molecules(sln, caller, args); if(res != RES_OK) return res;