gpseq-1.0
Description:
A parallelism library for Vala and GObject.
- Home: https://gitlab.com/kosmospredanie/gpseq/
- C-Documentation: https://gitlab.com/kosmospredanie/gpseq/-/jobs/artifacts/master/file/gtkdoc/html/index.html?job=build
- Devhelp-Package download
Content:
Namespaces:
- Gpseq
- Channel - Multi-producer multi-consumer channels. Channels are the pipes that provide communication between threads.
- ChannelBase - A base interface for senders and receivers.
- Collector - An object for mutable reduction operation that accumulates input elements into a mutable accumulator, and transforms it into a final result.
- Executor - An object that executes tasks. the execution is performed sequentially or in parallel, depending on the executor implementation.
- Receiver - The receiver side of a channel.
- Result - A result object that holds a value or an error.
- Sender - The sender side of a channel.
- Spliterator - An object for traversing and partitioning elements of a data source.
- Supplier - An object that supplies results.
- Task - A task that will be executed by a Executor.
- ThreadFactory - An object that creates new worker threads.
- ArraySpliterator - A spliterator of an array.
- ForkJoinTask - A base class for fork -join tasks that run within a worker pool.
- FuncTask - A function task.
- Future - A value which might not yet be available, but will be available at some point.
- GenericArraySpliterator - A spliterator of a generic array.
- IteratorSpliterator - A spliterator of an iterator.
- ListSpliterator - A spliterator of a list.
- Optional - A container object which may or may not contain a value.
- Promise - A promise allows to set a value or an exception with an associated future.
- Seq - A sequence of elements, supporting sequential and parallel operations.
- SpliteratorTask - A base class for spliterator based fork-join tasks.
- SubArray - An unowned slice of an array.
- SubArraySpliterator - A spliterator of a sub array.
- SupplierSpliterator - An infinite unordered spliterator, which each element is generated by a supplier.
- TaskEnv - An object to configure the environment of execution of tasks
- WaitGroup
- WorkerPool - A thread pool for executing tasks in parallel.
- WorkerThread - A worker thread.
- Wrapper - A wrapper object containing a value.
- CollectorFeatures - Hints that can be used to optimize collect operations.
- public delegate G CombineFunc<G> (owned G a, owned G b) throws Error
Combines two values and returns the result.
- public delegate bool EachChunkFunc<G> (G[] chunk) throws Error
- public delegate Iterator<A> FlatMapFunc<A,G> (owned G g) throws Error
- public delegate A FoldFunc<A,G> (owned G g, owned A a) throws Error
- public delegate void Func<G> (G g) throws Error
- public delegate A MapFunc<A,G> (owned G g) throws Error
- public delegate bool Predicate<G> (G g) throws Error
- public delegate G SupplyFunc<G> ()
A delegate that supplies results.
- public delegate G TaskFunc<G> () throws Error
- public delegate A TeeMergeFunc<A> (Object[] results) throws Error
Merges the given results and returns the final result.
- public delegate void VoidFunc ()
- public delegate void VoidTaskFunc () throws Error
- public int64 atomic_int64_add (ref int64 atomic, int64 val)
Atomically adds val to the value of atomic.
- public uint64 atomic_int64_and (ref uint64 atomic, uint64 val)
Performs an atomic bitwise 'and' of the value of atomic and val , storing the result back in atomic.
- public bool atomic_int64_compare_and_exchange (ref int64 atomic, int64 oldval, int64 newval)
Compares atomic to oldval and, if equal, sets it to newval. If atomic was not equal to oldval then no change occurs.
- public bool atomic_int64_dec_and_test (ref int64 atomic)
Decrements the value of atomic by 1.
- public int64 atomic_int64_get (ref int64 atomic)
Gets the current value of atomic.
- public void atomic_int64_inc (ref int64 atomic)
Increments the value of atomic by 1.
- public uint64 atomic_int64_or (ref uint64 atomic, uint64 val)
Performs an atomic bitwise 'or' of the value of atomic and val , storing the result back in atomic.
- public void atomic_int64_set (ref int64 atomic, int64 newval)
Sets the value of atomic to newval.
- public uint64 atomic_int64_xor (ref uint64 atomic, uint64 val)
Performs an atomic bitwise 'xor' of the value of atomic and val , storing the result back in atomic.
- public void blocking (VoidTaskFunc func) throws Error
Runs the given blocking task.
- public G blocking_get<G> (TaskFunc<G> func) throws Error
Runs the given blocking task and returns the result.
- public G[] join<G> (owned TaskFunc<G> left, owned TaskFunc<G> right) throws Error
Runs the subtasks and returns the results.
- public Future<void*> parallel_sort<G> (G[] array, owned CompareDataFunc<G>? compare = null)
Sorts the given array by comparing with the specified compare function, in parallel. The sort is stable.
- public Future<void*> run (owned VoidTaskFunc func)
Schedules the given function to execute asynchronously.
- public Future<G> task<G> (owned TaskFunc<G> func)
Schedules the given function to execute asynchronously.
- Collectors - Various collector implementations.
- public Collector<double?,Object,G> average_double<G> (owned MapFunc<double?,G> mapper)
Returns a collector that produces the arithmetic mean of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<float?,Object,G> average_float<G> (owned MapFunc<float?,G> mapper)
Returns a collector that produces the arithmetic mean of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<int64?,Object,G> count<G> ()
Returns a collector that counts the number of elements.
- public Collector<A,Object,G> filter<A,G> (owned Predicate<G> pred, Collector<A,Object,G> downstream)
Returns a collector that only accumulates the elements matching the given predicate.
- public Collector<A,Object,G> fold<A,G> (owned FoldFunc<A,G> accumulator, owned CombineFunc<A> combiner, A identity)
Returns a collector that performs a reduction operation on the elements.
- public Collector<Map<K,List<G>>,Object,G> group_by<K,G> (owned MapFunc<K,G> classifier)
Returns a collector that groups the elements based on the classifier function.
- public Collector<Map<K,V>,Object,G> group_by_with<K,V,G> (owned MapFunc<K,G> classifier, Collector<V,Object,G> downstream)
Returns a collector that groups the elements based on the classifier function, and performs a reduction operation on the values of each key using the downstream collector.
- public Collector<string,Object,string> join (owned string delimiter = "")
Returns a collector that concatenates the elements into a string, in encounter order.
- public Collector<R,Object,G> map<R,A,G> (owned MapFunc<A,G> mapper, Collector<R,Object,A> downstream)
Returns a collector that applies the given mapper function to the elements, and performs a reduction operation on the results using the downstream collector.
- public Collector<Optional<G>,Object,G> max<G> (owned CompareDataFunc<G>? compare = null)
Returns a collector that produces the maximum element based on the given compare function.
- public Collector<Optional<G>,Object,G> min<G> (owned CompareDataFunc<G>? compare = null)
Returns a collector that produces the minimum element based on the given compare function.
- public Collector<Map<bool,List<G>>,Object,G> partition<G> (owned Predicate<G> pred)
Returns a collector that partitions the elements based on the pred function.
- public Collector<Map<bool,V>,Object,G> partition_with<V,G> (owned Predicate<G> pred, Collector<V,Object,G> downstream)
Returns a collector that partitions the elements based on the pred function, and performs a reduction operation on the values of each partition using the downstream collector.
- public Collector<Optional<G>,Object,G> reduce<G> (owned CombineFunc<G> accumulator)
Returns a collector that performs a reduction operation on the elements.
- public Collector<double?,Object,G> sum_double<G> (owned MapFunc<double?,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<float?,Object,G> sum_float<G> (owned MapFunc<float?,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<int,Object,G> sum_int<G> (owned MapFunc<int,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<int32,Object,G> sum_int32<G> (owned MapFunc<int32,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<int64?,Object,G> sum_int64<G> (owned MapFunc<int64?,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<long,Object,G> sum_long<G> (owned MapFunc<long,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<uint,Object,G> sum_uint<G> (owned MapFunc<uint,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<uint32,Object,G> sum_uint32<G> (owned MapFunc<uint32,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<uint64?,Object,G> sum_uint64<G> (owned MapFunc<uint64?,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<ulong,Object,G> sum_ulong<G> (owned MapFunc<ulong,G> mapper)
Returns a collector that produces the sum of the given function applied to the elements. If there are no elements, the result is 0.
- public Collector<A,Object,G> tee<A,G> (owned Collector<Object,Object,G>[] downstreams, owned TeeMergeFunc<A> merger)
Returns a collector that consists of multiple downstream collectors. The elements are processed by all the downstream collectors, and then their results are merged using the merger function into the final result.
- public Collector<Collection<G>,Object,G> to_collection<G> (Supplier<Collection<G>> factory)
Returns a collector that accumulates the elements into a new collection, in encounter order.
- public Collector<GenericArray<G>,Object,G> to_generic_array<G> ()
Returns a collector that accumulates the elements into a new generic array, in encounter order.
- public Collector<List<G>,Object,G> to_list<G> ()
Returns a collector that accumulates the elements into a new list, in encounter order.
- public Collector<Map<K,V>,Object,G> to_map<K,V,G> (owned MapFunc<K,G> key_mapper, owned MapFunc<V,G> val_mapper, owned CombineFunc<V>? merger = null, owned HashDataFunc<K>? key_hash = null, owned EqualDataFunc<K>? key_equal = null, owned EqualDataFunc<V>? value_equal = null)
Returns a collector that accumulates the elements into a new map.
- public Collector<Set<G>,Object,G> to_set<G> (owned HashDataFunc<G>? hash = null, owned EqualDataFunc<G>? equal = null)
Returns a collector that accumulates the elements into a new set.
- public Collector<Wrapper<A>,Object,G> wrap<A,G> (Collector<A,Object,G> collector)
Returns a collector wrapping the given collector. The returned collector will produce a wrapper object containing the result of the given collector.
- Compares
- public CompareDataFunc<G> join<G> (owned CompareDataFunc<G> cmp, owned CompareDataFunc<G> cmp2)
Joins the given two compare functions and returns the combined compare function.
- public CompareDataFunc<G> reverse<G> (owned CompareDataFunc<G>? cmp = null)
Returns a compare function which is a reversed version of the given function.
- Overflow
- public bool int32_add (int32 a, int32 b, out int32 result = null)
Performs an operation that adds a and b and returns the result, with checking whether the operation overflowed.
- public bool int32_mul (int32 a, int32 b, out int32 result = null)
Performs an operation that multiplies a and b and returns the result, with checking whether the operation overflowed.
- public bool int32_sub (int32 a, int32 b, out int32 result = null)
Performs an operation that subtracts b from a and returns the result, with checking whether the operation overflowed.
- public bool int64_add (int64 a, int64 b, out int64 result = null)
Performs an operation that adds a and b and returns the result, with checking whether the operation overflowed.
- public bool int64_mul (int64 a, int64 b, out int64 result = null)
Performs an operation that multiplies a and b and returns the result, with checking whether the operation overflowed.
- public bool int64_sub (int64 a, int64 b, out int64 result = null)
Performs an operation that subtracts b from a and returns the result, with checking whether the operation overflowed.
- public bool int_add (int a, int b, out int result = null)
Performs an operation that adds a and b and returns the result, with checking whether the operation overflowed.
- public bool int_mul (int a, int b, out int result = null)
Performs an operation that multiplies a and b and returns the result, with checking whether the operation overflowed.
- public bool int_sub (int a, int b, out int result = null)
Performs an operation that subtracts b from a and returns the result, with checking whether the operation overflowed.
- public bool long_add (long a, long b, out long result = null)
Performs an operation that adds a and b and returns the result, with checking whether the operation overflowed.
- public bool long_mul (long a, long b, out long result = null)
Performs an operation that multiplies a and b and returns the result, with checking whether the operation overflowed.
- public bool long_sub (long a, long b, out long result = null)
Performs an operation that subtracts b from a and returns the result, with checking whether the operation overflowed.