BatchSampler

class BatchSampler : public madspace::FunctionGenerator

Concatenates the per-channel tensors of a multi-channel batch.

Given one tensor set per channel and the per-channel batch sizes, it packs them into a single contiguous batch (the inverse of the split done inside MultiChannelMapping). Used to assemble a mixed batch for the shared integrand evaluation (see Sec. 3.1 of [1]).

batch is the leading batch dimension. i indexes the channels.

Arguments

  • channel<i>_in_<key> – the per-channel input tensors.

  • batch_sizes – the number of entries in each channel.

Returns

  • channel<i>_out_<key> – the concatenated tensors.

References

Public Functions

BatchSampler(const std::vector<NamedVector<Type>> &types)
Parameters:

types – One tensor-type set per channel.