MCPcopy Create free account
hub / github.com/numpy/numpy / _selected_real_kind_func

Function _selected_real_kind_func

numpy/f2py/crackfortran.py:2461–2477  ·  view source on GitHub ↗
(p, r=0, radix=0)

Source from the content-addressed store, hash-verified

2459
2460
2461def _selected_real_kind_func(p, r=0, radix=0):
2462 # XXX: This should be processor dependent
2463 # This is only verified for 0 <= p <= 20, possibly good for p <= 33 and above
2464 if p < 7:
2465 return 4
2466 if p < 16:
2467 return 8
2468 machine = platform.machine().lower()
2469 if machine.startswith(('aarch64', 'alpha', 'arm64', 'loongarch', 'mips', 'power', 'ppc', 'riscv', 's390x', 'sparc')):
2470 if p <= 33:
2471 return 16
2472 else:
2473 if p < 19:
2474 return 10
2475 elif p <= 33:
2476 return 16
2477 return -1
2478
2479
2480def get_parameters(vars, global_params={}):

Callers

nothing calls this directly

Calls 2

lowerMethod · 0.80
startswithMethod · 0.80

Tested by

no test coverage detected