- 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.
- 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.
- 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.