diff --git a/samples/python/00_enumopencl/CMakeLists.txt b/samples/python/00_enumopencl/CMakeLists.txt index f95de63..5a4074f 100644 --- a/samples/python/00_enumopencl/CMakeLists.txt +++ b/samples/python/00_enumopencl/CMakeLists.txt @@ -1,22 +1,6 @@ -# Copyright (c) 2019-2021 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT add_opencl_python_sample( NUMBER 00 diff --git a/samples/python/00_enumopencl/enumopencl.ipynb b/samples/python/00_enumopencl/enumopencl.ipynb index e053117..602337e 100644 --- a/samples/python/00_enumopencl/enumopencl.ipynb +++ b/samples/python/00_enumopencl/enumopencl.ipynb @@ -17,7 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Copyright (c) 2023 Ben Ashbaugh\n", + "# Copyright (c) 2024 Ben Ashbaugh\n", "#\n", "# SPDX-License-Identifier: MIT" ] diff --git a/samples/python/00_enumopencl/enumopencl.py b/samples/python/00_enumopencl/enumopencl.py index eb2ad57..c689283 100644 --- a/samples/python/00_enumopencl/enumopencl.py +++ b/samples/python/00_enumopencl/enumopencl.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019-2023 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # # SPDX-License-Identifier: MIT diff --git a/samples/python/01_copybuffer/CMakeLists.txt b/samples/python/01_copybuffer/CMakeLists.txt index e0e15c2..47c85a8 100644 --- a/samples/python/01_copybuffer/CMakeLists.txt +++ b/samples/python/01_copybuffer/CMakeLists.txt @@ -1,22 +1,6 @@ -# Copyright (c) 2019-2021 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT add_opencl_python_sample( NUMBER 01 diff --git a/samples/python/01_copybuffer/copybuffer.ipynb b/samples/python/01_copybuffer/copybuffer.ipynb index 92b07f6..d7291bb 100644 --- a/samples/python/01_copybuffer/copybuffer.ipynb +++ b/samples/python/01_copybuffer/copybuffer.ipynb @@ -17,7 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Copyright (c) 2023 Ben Ashbaugh\n", + "# Copyright (c) 2024 Ben Ashbaugh\n", "#\n", "# SPDX-License-Identifier: MIT" ] diff --git a/samples/python/01_copybuffer/copybuffer.py b/samples/python/01_copybuffer/copybuffer.py index cf6e4de..5d7ec1e 100644 --- a/samples/python/01_copybuffer/copybuffer.py +++ b/samples/python/01_copybuffer/copybuffer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019-2023 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # # SPDX-License-Identifier: MIT diff --git a/samples/python/02_copybufferkernel/CMakeLists.txt b/samples/python/02_copybufferkernel/CMakeLists.txt index 4a929f0..1cae4bc 100644 --- a/samples/python/02_copybufferkernel/CMakeLists.txt +++ b/samples/python/02_copybufferkernel/CMakeLists.txt @@ -1,22 +1,6 @@ -# Copyright (c) 2019-2021 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT add_opencl_python_sample( NUMBER 02 diff --git a/samples/python/02_copybufferkernel/copybufferkernel.py b/samples/python/02_copybufferkernel/copybufferkernel.py index a1dc10d..0cf75ce 100644 --- a/samples/python/02_copybufferkernel/copybufferkernel.py +++ b/samples/python/02_copybufferkernel/copybufferkernel.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019-2023 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # # SPDX-License-Identifier: MIT diff --git a/samples/python/03_mandelbrot/CMakeLists.txt b/samples/python/03_mandelbrot/CMakeLists.txt index e3819c0..45afbc9 100644 --- a/samples/python/03_mandelbrot/CMakeLists.txt +++ b/samples/python/03_mandelbrot/CMakeLists.txt @@ -1,22 +1,6 @@ -# Copyright (c) 2019-2021 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT add_opencl_python_sample( NUMBER 03 diff --git a/samples/python/03_mandelbrot/mandelbrot.ipynb b/samples/python/03_mandelbrot/mandelbrot.ipynb index 9baba43..da8b67c 100644 --- a/samples/python/03_mandelbrot/mandelbrot.ipynb +++ b/samples/python/03_mandelbrot/mandelbrot.ipynb @@ -19,7 +19,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Copyright (c) 2023 Ben Ashbaugh\n", + "# Copyright (c) 2024 Ben Ashbaugh\n", "#\n", "# SPDX-License-Identifier: MIT" ] diff --git a/samples/python/03_mandelbrot/mandelbrot.py b/samples/python/03_mandelbrot/mandelbrot.py index 04bf115..188e368 100644 --- a/samples/python/03_mandelbrot/mandelbrot.py +++ b/samples/python/03_mandelbrot/mandelbrot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019-2023 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # # SPDX-License-Identifier: MIT diff --git a/samples/python/04_julia/CMakeLists.txt b/samples/python/04_julia/CMakeLists.txt index c33bfed..19f2c6b 100644 --- a/samples/python/04_julia/CMakeLists.txt +++ b/samples/python/04_julia/CMakeLists.txt @@ -1,22 +1,6 @@ -# Copyright (c) 2019-2021 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT add_opencl_python_sample( NUMBER 04 diff --git a/samples/python/04_julia/julia.ipynb b/samples/python/04_julia/julia.ipynb index 5bb7679..cbc27d7 100644 --- a/samples/python/04_julia/julia.ipynb +++ b/samples/python/04_julia/julia.ipynb @@ -17,7 +17,7 @@ "metadata": {}, "outputs": [], "source": [ - "# Copyright (c) 2023 Ben Ashbaugh\n", + "# Copyright (c) 2024 Ben Ashbaugh\n", "#\n", "# SPDX-License-Identifier: MIT" ] @@ -226,9 +226,9 @@ " lws = None\n", "\n", " print('Executing the kernel {} times'.format(iterations))\n", - " print('Global Work Size = ({}, {})'.format(width, height))\n", + " print('Global Work Size = {}'.format([width, height]))\n", " if lws:\n", - " print('Local Work Size = ({}, {})'.format(lws[0], lws[1]))\n", + " print('Local Work Size = {}'.format(lws))\n", " else:\n", " print('Local Work Size = NULL')" ] diff --git a/samples/python/04_julia/julia.py b/samples/python/04_julia/julia.py index f487930..69faab3 100644 --- a/samples/python/04_julia/julia.py +++ b/samples/python/04_julia/julia.py @@ -1,24 +1,8 @@ #!/usr/bin/env python -# Copyright (c) 2019-2023 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT from PIL import Image diff --git a/samples/python/CMakeLists.txt b/samples/python/CMakeLists.txt index 6908c34..2f09ee7 100644 --- a/samples/python/CMakeLists.txt +++ b/samples/python/CMakeLists.txt @@ -1,22 +1,6 @@ -# Copyright (c) 2019-2021 Ben Ashbaugh +# Copyright (c) 2019-2024 Ben Ashbaugh # -# 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. +# SPDX-License-Identifier: MIT function(add_opencl_python_sample) set(options )