Skip to content

EvenlySplitDataElements

[Source]

Gives a distribution for X data_elements across Y split_across buckets.

Useful to taking things like an Array of data and dividing it up "evenly" across a number of workers.

The return value is an Array of split_across length with each bucket being the number of data_elements that would fall into that bucket. In our fork/join use case, that means that each Array bucket is the number of data_elements to give to a worker corresponding to the bucket.

primitive val EvenlySplitDataElements

Constructors

create

[Source]

new val create()
: EvenlySplitDataElements val^

Returns


Public Functions

apply

[Source]

fun box apply(
  data_elements: USize val,
  split_across: USize val)
: Array[USize val] iso^

Parameters

  • data_elements: USize val
  • split_across: USize val

Returns


eq

[Source]

fun box eq(
  that: EvenlySplitDataElements val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: EvenlySplitDataElements val)
: Bool val

Parameters

Returns