alantech / alan

Autoscalable Programming Language
https://alan-lang.org
MIT License
306 stars 10 forks source link

Implement GPU `add` and GPU vector `.i`, `.j`, `.k`, and `.l` aliases #831

Closed dfellis closed 2 months ago

dfellis commented 2 months ago

Also implementing auto-casting of add and mul when mixing convertible types, so you don't have to write + 1.gi32 and can instead just write + 1. Currently implemented with generics to convert any type as needed, but may switch that to just i64 and f64 where appropriate to prevent auto-casting of GPU types into each other in potentially unpredictable ways.