Commit e98c0cf8 authored by Theo Serralta's avatar Theo Serralta

Adding some comments

parent f5138a30
......@@ -4,10 +4,11 @@ import pyopencl as cl
a_np = np.random.rand(50000).astype(np.float32)
b_np = np.random.rand(50000).astype(np.float32)
ctx = cl.create_some_context()
queue = cl.CommandQueue(ctx)
ctx = cl.create_some_context()#C'est la "table de jeu". Permet aux devices de recevoir les kernels et de transferer les données
queue = cl.CommandQueue(ctx)#Permet de créer la queue de commandes dans le context
mf = cl.mem_flags
print(mf.to_string(1))
a_g = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=a_np)
b_g = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=b_np)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment