Skip to main content
Log in

Mojo function

foreach

foreach[type: DType, rank: Int, //, func: fn[Int](IndexList[$1|1]) capturing -> SIMD[$1|0, $0], synchronous: Bool = False, target: StringLiteral = "cpu", simd_width: Int = get_kernel_simd_width[::DType,::StringLiteral]()](tensor: ManagedTensorSlice[type, rank])

foreach[type: DType, rank: Int, //, func: fn[Int](IndexList[$1|1]) capturing -> SIMD[$1|0, $0], synchronous: Bool = False, target: StringLiteral = "cpu", simd_width: Int = get_kernel_simd_width[::DType,::StringLiteral]()](tensor: ManagedTensorSlice[type, rank], ctx: MojoCallContextPtr)