Calculates the proper max depth.
elements |
an estimate of the number of elements. it is negative if infinite or unknown. |
threads |
the number of threads (always >= 1) |
max depth. 0: no split, 1: one split, 2: two split, ... (a split may generate one or more child nodes). unlimited if negative |