For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo module
broadcast
Implements numpy-style tensor broadcasting for CPU and GPU targets.
Functionsβ
- β
broadcast: For each axis ofinput, if the dimension is 1, duplicate the data at each index of the corresponding axis inoutput, otherwise copy over the entire axis to the corresponding axis inoutput. - β
broadcast_impl: For each axis ofinputβ [axis, rank), if the dimension is 1, duplicate the data at each index of the corresponding axis inoutput, otherwise copy over the entire axis to the corresponding axis inoutput.