Package io.github.jbellis.jvector.util
Class PhysicalCoreExecutor
java.lang.Object
io.github.jbellis.jvector.util.PhysicalCoreExecutor
- All Implemented Interfaces:
Closeable,AutoCloseable
A fork join pool which is sized to match the number of physical cores on the machine (avoiding hyper-thread count)
This is important for heavily vectorized sections of the code since it can easily saturate memory bandwidth.
- See Also:
-
Field Summary
Fields -
Method Summary
-
Field Details
-
instance
-
-
Method Details
-
pool
-
execute
-
submit
-
getPhysicalCoreCount
public static int getPhysicalCoreCount() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-