MCPcopy Create free account

hub / github.com/ashvardanian/ForkUnion / functions

Functions446 in github.com/ashvardanian/ForkUnion

↓ 40 callersMethodlen
Returns the number of elements in the vector.
rust/lib.rs:1389
↓ 36 callersMethodas_ptr
Returns the raw pointer to the allocated memory.
rust/lib.rs:941
↓ 30 callersMethodreset
include/fork_union.hpp:2092
↓ 26 callersMethodsize
include/fork_union.hpp:1959
↓ 23 callersMethodget
Returns a reference to the protected data. This method is rarely needed since the guard implements `Deref`.
rust/lib.rs:261
↓ 22 callersMethodthreads_count
* @brief Returns the number of threads in the thread-pool, including the main thread. * @retval 0 if the thread-pool is not initialized, 1 if o
include/fork_union.hpp:1095
↓ 21 callersMethodpush
Appends an element to the back of the vector. # Arguments `value` - The element to append # Errors Returns an error if allocation fails when growi
rust/lib.rs:1487
↓ 20 callersMethoditer
Returns an iterator over the vector.
rust/lib.rs:1591
↓ 20 callersMethodtry_spawn
Creates a new thread pool with the specified number of threads. By default, uses `CallerExclusivity::Inclusive`, meaning the calling thread participa
rust/lib.rs:635
↓ 19 callersMethodas_mut_ptr
Returns a mutable raw pointer to the vector's buffer.
rust/lib.rs:1561
↓ 18 callersMethoddata
include/fork_union.hpp:574
↓ 17 callersMethodfor_threads
Executes a function on each thread of the pool, returning a closure object. This operation provides explicit control over broadcast and join phases,
rust/lib.rs:789
↓ 16 callersMethodget_mut
Gets a mutable reference to the protected data. Since this requires a mutable reference to the mutex, no locking is needed as we have exclusive acces
rust/lib.rs:240
↓ 15 callersMethodfor_n
Distributes `n` similar duration calls between threads by individual indices. Uses static load balancing where each thread gets a predetermined set o
rust/lib.rs:819
↓ 14 callersFunctionspawn
Spawns a pool with the specified number of threads.
rust/lib.rs:3612
↓ 14 callersFunctionupcast_pool
@brief Safely cast `fu_pool_t*` to `opaque_pool_t*` avoiding alignment violation warnings. */
c/lib.cpp:476
↓ 14 callersFunctionvisit
c/lib.cpp:148
↓ 13 callersMethodfor_n_dynamic
Executes `n` uneven tasks on all threads, greedily stealing work. Uses dynamic load balancing with work-stealing. Threads that finish their assigned
rust/lib.rs:856
↓ 13 callersMethodscope
scripts/test.cpp:90
↓ 12 callersMethodas_mut_slice
Returns the allocated memory as a mutable byte slice.
rust/lib.rs:931
↓ 12 callersMethodas_slice
Returns the allocated memory as an immutable byte slice.
rust/lib.rs:936
↓ 12 callersMethodconstruct
scripts/test.cpp:89
↓ 12 callersFunctionhw_threads
()
rust/lib.rs:3731
↓ 10 callersFunctioncontains_iota
scripts/test.cpp:251
↓ 10 callersMethoddim
include/fork_union.hpp:3746
↓ 9 callersMethodcolocations_count
Returns the number of colocations (and thus the number of `PinnedVec`s).
rust/lib.rs:1987
↓ 9 callersMethodnodes_count
include/fork_union.hpp:2104
↓ 8 callersMethoddeallocate
include/fork_union.hpp:504
↓ 8 callersMethodfor_each
(self, function: F)
rust/lib.rs:2824
↓ 8 callersMethodmap
(self, mapper: M)
rust/lib.rs:2765
↓ 8 callersMethodreserve
Reserves capacity for at least `additional` more elements. # Arguments `additional` - The number of additional elements to reserve space for # Erro
rust/lib.rs:1428
↓ 7 callersFunctionapply_force
(b: &mut Body, f: &Vector3)
scripts/nbody.rs:108
↓ 7 callersMethoddispatch
(&self, pool: &mut ThreadPool, tasks: usize, function: F)
rust/lib.rs:2689
↓ 7 callersMethoddrive
(self, pool: &mut ThreadPool, schedule: S, consumer: &F)
rust/lib.rs:2962
↓ 7 callersFunctionglobals_initialize
c/lib.cpp:238
↓ 7 callersFunctiongravitational_force
(bi: &Body, bj: &Body)
scripts/nbody.rs:92
↓ 7 callersMethoditer_mut
Returns a mutable iterator over the vector.
rust/lib.rs:1596
↓ 7 callersMethodunsafe_for_threads
include/fork_union.hpp:1183
↓ 7 callersMethodwith_pool
( self, pool: &'pool mut ThreadPool, )
rust/lib.rs:2784
↓ 6 callersFunctionapply_force
scripts/nbody.cpp:119
↓ 6 callersMethodbold_green
include/fork_union.hpp:3760
↓ 6 callersMethodfor_each_with_prong
(self, function: F)
rust/lib.rs:2840
↓ 6 callersFunctiongravitational_force
scripts/nbody.cpp:108
↓ 6 callersMethodinto_par_iter
(self)
rust/lib.rs:2896
↓ 6 callersMethodunsafe_join
@brief Blocks the calling thread until the currently broadcasted task finishes. */
include/fork_union.hpp:1211
↓ 6 callersMethodzip
(self, other: ParallelSlice<'b, U>)
rust/lib.rs:3043
↓ 5 callersMethodallocate
* @brief Allocates a memory for `size` elements of `value_type`. * @param[in] size The number of elements to allocate. * @param[in] page_
include/fork_union.hpp:2404
↓ 5 callersMethodcount_threads_in
Returns the number of threads in a specific colocation. This method is useful for NUMA-aware load balancing, allowing you to understand how many thre
rust/lib.rs:697
↓ 5 callersMethodjoin
Wait for all threads to complete their work. If broadcast() hasn't been called yet, this will call it first.
rust/lib.rs:3470
↓ 5 callersMethodlocate_thread_in
Converts a global thread index to a local thread index within a colocation. This is useful for distributed thread pools where threads are grouped int
rust/lib.rs:715
↓ 5 callersMethodterminate
* @brief Stops all threads and deallocates the thread-pool after the last call finishes. * @note Can be called from @b any thread at any time.
include/fork_union.hpp:1239
↓ 5 callersMethodthread_colocation
include/fork_union.hpp:3684
↓ 4 callersMethodallocate
Allocates exactly the requested number of bytes on this allocator's NUMA node. # Arguments `bytes` - The exact number of bytes to allocate # Errors
rust/lib.rs:1167
↓ 4 callersMethodbold_yellow
include/fork_union.hpp:3761
↓ 4 callersMethodcapacity
Returns the number of elements the vector can hold without reallocating.
rust/lib.rs:1399
↓ 4 callersFunctioncount_colocations
Returns the number of distinct thread colocations available. A "colocation" represents a group of threads that share the same: - **NUMA memory domain
rust/lib.rs:480
↓ 4 callersFunctioncount_numa_nodes
Returns the number of NUMA nodes available on the system.
rust/lib.rs:464
↓ 4 callersMethodget_mut_at
(&self, index: usize)
rust/lib.rs:2542
↓ 4 callersMethodis_empty
Returns `true` if the vector contains no elements.
rust/lib.rs:1394
↓ 4 callersMethodlock
Acquires the lock, returning a guard that provides access to the protected data. This method will spin until the lock is acquired. If the lock is alr
rust/lib.rs:139
↓ 4 callersMethodpar_iter_mut
Creates a mutable parallel slice view over the vector.
rust/lib.rs:1606
↓ 4 callersMethodthread_local_index
* @brief Converts a @p `global_thread_index` to a local thread index within a @b colocation. * @return Same value as `global_thread_index`, as
include/fork_union.hpp:1364
↓ 3 callersFunctionallocate_at_least
()
rust/lib.rs:3957
↓ 3 callersMethodallocate_at_least
Allocates memory with at least the requested size on this allocator's NUMA node. Returns both the actual allocated size and page size information, wh
rust/lib.rs:1109
↓ 3 callersMethodbegin
include/fork_union.hpp:1961
↓ 3 callersMethodbold_cyan
include/fork_union.hpp:3764
↓ 3 callersMethodclear
Clears the vector, removing all values. # Examples ```rust use fork_union::*; let allocator = PinnedAllocator::new(0).expect("Failed to create allo
rust/lib.rs:1542
↓ 3 callersMethodcyan
include/fork_union.hpp:3754
↓ 3 callersMethodfirst_thread
* @brief Returns the first thread index in the thread-pool. * @retval 0 as this pool isn't intended for colocated/distributed topologies.
include/fork_union.hpp:1083
↓ 3 callersFunctionfor_each_prong_mut
Helper function to visit every element exactly once with mutable access.
rust/lib.rs:3649
↓ 3 callersMethodfor_slices
Distributes `n` similar duration calls between threads in slices. Instead of individual task assignment, this method groups tasks into contiguous sli
rust/lib.rs:899
↓ 3 callersMethodfor_threads
include/fork_union.hpp:1172
↓ 3 callersMethodis_lock_free
@brief Checks if the thread-pool's core synchronization points are lock-free. */
include/fork_union.hpp:1071
↓ 3 callersMethodtry_harvest
* @brief Harvests CPU-memory topology. * @retval false if the kernel lacks NUMA support or the harvest failed. * @retval true if the harv
include/fork_union.hpp:2116
↓ 3 callersMethodtry_resize
include/fork_union.hpp:544
↓ 3 callersMethodwith_schedule
(self, schedule: S2)
rust/lib.rs:2869
↓ 2 callersFunctionbenchmark_search
Benchmark search performance
scripts/search.rs:254
↓ 2 callersMethodbold_white
include/fork_union.hpp:3765
↓ 2 callersMethodbroadcast
Broadcast the work to all threads without waiting for completion. This is safe to call multiple times - subsequent calls are no-ops.
rust/lib.rs:3448
↓ 2 callersMethodbytes_per_page
Returns the page size used for this allocation.
rust/lib.rs:951
↓ 2 callersMethodcolocations_count
* @brief Number of individual sub-pool with the same NUMA-locality and QoS. * @retval 1 constant for compatibility. */
include/fork_union.hpp:1349
↓ 2 callersFunctioncount_logical_cores
Returns the number of logical CPU cores available on the system.
rust/lib.rs:459
↓ 2 callersFunctioncpu_capabilities
* @brief Represents the CPU capabilities for hardware-friendly yielding. * @note Combine with @b `ram_capabilities()` to get the full set of librar
include/fork_union.hpp:1601
↓ 2 callersMethoddrive_dynamic
(self, pool: &mut ThreadPool, consumer: F)
rust/lib.rs:2758
↓ 2 callersMethoddrive_static
(self, pool: &mut ThreadPool, consumer: F)
rust/lib.rs:2751
↓ 2 callersFunctionfor_each_prong_mut_dynamic
Helper function to visit every element exactly once with dynamic work-stealing.
rust/lib.rs:3664
↓ 2 callersFunctionfu_capabilities_string
c/lib.cpp:279
↓ 2 callersFunctionfu_pool_delete
c/lib.cpp:480
↓ 2 callersMethodget_colocation
Gets a reference to the `PinnedVec` at the specified colocation. # Arguments `colocation_index` - The colocation index # Returns A reference to th
rust/lib.rs:2041
↓ 2 callersMethodjoin
include/fork_union.hpp:330
↓ 2 callersMethodlocal_to_global_index
Converts a local index within a specific NUMA node to the global round-robin index. This is useful when you have a reference to an element within a s
rust/lib.rs:2237
↓ 2 callersMethodpar_iter
Creates a read-only parallel slice view over the vector.
rust/lib.rs:1601
↓ 2 callersFunctionram_capabilities
* @brief Represents the memory-system capabilities, retrieved from the Linux Sysfs. * @note Combine with @b `cpu_capabilities()` to get the full se
include/fork_union.hpp:1659
↓ 2 callersMethodswap
Swaps two elements in the vector.
rust/lib.rs:1734
↓ 2 callersMethodtruncate
Shortens the vector, keeping the first `len` elements and dropping the rest.
rust/lib.rs:1752
↓ 2 callersMethodtry_assign
* @brief Copy-assigns the topology from @p other. * * Instead of a copy-constructor we expose an explicit operation that can * FAIL
include/fork_union.hpp:2214
↓ 2 callersMethodtry_spawn
* @brief Creates a thread-pool with the given number of threads. * @param[in] threads The number of threads to be used. * @param[in] excl
include/fork_union.hpp:1111
↓ 2 callersMethodupdate_if_better
(&mut self, similarity: Distance, index: usize)
scripts/search.rs:50
↓ 1 callersMethodallocate_at_least
* @brief Allocates memory for at least `size` elements of `value_type`. * @param[in] size The number of elements to allocate. * @param[in
include/fork_union.hpp:2385
↓ 1 callersMethodblue
include/fork_union.hpp:3752
next →1–100 of 446, ranked by callers