diff --git a/doc/howto.rst b/doc/howto.rst index 5ea67f7df91ae40a44e4a4b8fe78957512aa8b4e..92b3243ba6c9250da6aa0aabf03f1432d599e32a 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -65,10 +65,10 @@ the device: >>> ary_host["field2"].fill(1000) >>> ary_host[13]["field2"] = 12 >>> print(ary_host) - [(217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 12.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0)] + [(217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 12.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.)] >>> ary = cl.array.to_device(queue, ary_host) @@ -85,10 +85,10 @@ We can then operate on the array with our own kernels: >>> evt = prg.set_to_1(queue, ary.shape, None, ary.data) >>> print(ary) - [(1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 12.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 1000.0)] + [(1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 12.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.)] as well as with PyOpenCL's built-in operations: @@ -99,7 +99,7 @@ as well as with PyOpenCL's built-in operations: ... preamble=my_struct_c_decl) >>> evt = elwise(ary) >>> print(ary) - [(2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 12.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 1000.0)] + [(2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 12.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.)]