def map_with

stelliferous@0.0.2.0 · tensor_band.bend:225

import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base
import stelliferous@0.0.2.0/storage_buffer.bend as Storage

225# Parallelism is a planner decision. Sequential execution keeps the bands and
226# their owners: a small operation need not pay either a fork or a gather.
227def map_with(~Element: Data,~Context: Data,~leaf: @+context: Context -> Storage.Buffer<Element> -> Storage.Buffer<Element>,+layout: Plan,+parallel: Bool,+geometry: Geometry,
228  context: Context,bands: Bands(~Element)) -> Bands(~Element):
229  each(~Storage.Buffer<Element>,~Storage.Buffer<Element>,~Unit,~Context,~unshared,~map_band(~Element,~Context,~leaf),~same(~Storage.Buffer<Element>),
230    layout,parallel && same_image(geometry,layout),parallel,geometry,context,bands,Unit{})

Uses (12)

Used by (2)