meine
meine π - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich tβ¦
A Heterogeneous Pythonic π language to practice targeting CPU & GPU in the same program on Mobile Devices Influenced bβ¦
Turtle started as a re-implementation of TurtleGraphics on Android OS with simple language, but then that simple language `Lilo` turned into a platform with Heterogeneous Pythonic like language to practice targeting CPU & GPU in the same program Influenced by Python, Mojo and CUDA.
from gpu import (
gpu,
Dim,
)
@gpu
def vec_add(a, b, out c):
i = gpu.block_dim.x * gpu.block_idx.x + gpu.thread_idx.x
c[i] = a[i] + b[i]
a = [1.0, 2.0, 3.0, 4.0]
b = [5.0, 6.0, 7.0, 8.0]
c = [0.0, 0.0, 0.0, 0.0]
blocks = Dim(1, 1, 1)
threads = Dim(4, 1, 1)
vec_add[blocks, threads](a, b, c)
print("Output: ", c)
MIT License
Copyright (c) 2022 - Present Amr Hesham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
more like this
meine π - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich tβ¦
search projects, people, and tags