Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/MojoLlama/blob/main/src/mojollama/kernels/mojo_api_test.mojo # MojoLlama Archived Mojo/MAX quantizer and serving research repository (read-only history) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `MojoLlama / src / mojollama / kernels / mojo_api_test.mojo` 13 lines ยท 306 bytes Raw Blame History 1 from std.prelude import * 2 3 fn main() raises: 4 # SIMD with DType enum 5 var v = SIMD[DType.float32, 4](1.0) 6 v = v + SIMD[DType.float32, 4](2.0) 7 print("SIMD[0]: ", v[0]) 8 print("SIMD[3]: ", v[3]) 9 10 # Int to float 11 var i: Int = 42 12 var f = Float32(i) 13 print("Int->Float: ", f)