MCPcopy
hub / github.com/thampiman/reverse-geocoder / num_cpus

Function num_cpus

reverse_geocoder/cKDTree_MP.py:38–46  ·  view source on GitHub ↗

Function to get the number of CPUs / cores. This is used to determine the number of processes to spawn. Default (if not implemented) = 2

()

Source from the content-addressed store, hash-verified

36 ierr.value += 1
37
38def num_cpus():
39 """
40 Function to get the number of CPUs / cores. This is used to determine the number of processes to spawn.
41 Default (if not implemented) = 2
42 """
43 try:
44 return mp.cpu_count()
45 except NotImplementedError:
46 return 2
47
48class cKDTree_MP(cKDTree):
49 """

Callers 1

pqueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected