From d09a4c9d91e5f6c58c6213930da4423f3cd6c334 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Tue, 2 Jun 2015 00:48:02 -0500
Subject: [PATCH] Realize license change, as allowed by Rokhlin (May 25) and
 Gimbutas (May 17) via email

---
 README.rst                               |  9 -------
 pyopencl/cl/pyopencl-bessel-j-complex.cl | 34 +++++++++++++++---------
 pyopencl/cl/pyopencl-hankel-complex.cl   | 34 +++++++++++++++---------
 pyopencl/elementwise.py                  |  4 ---
 4 files changed, 42 insertions(+), 39 deletions(-)

diff --git a/README.rst b/README.rst
index 1def3070..2f457c62 100644
--- a/README.rst
+++ b/README.rst
@@ -1,12 +1,3 @@
-WARNING: Pending a relicense, the file
-
-* `./pyopencl/cl/pyopencl-hankel-complex.cl`
-* `./pyopencl/cl/pyopencl-bessel-j-complex.cl`
-
-on this branch, unlike the rest of the software, are licensed under GPL.
-
-------------------------
-
 PyOpenCL lets you access GPUs and other massively parallel compute
 devices from Python. It tries to offer computing goodness in the
 spirit of its sister project `PyCUDA <http://mathema.tician.de/software/pycuda>`_:
diff --git a/pyopencl/cl/pyopencl-bessel-j-complex.cl b/pyopencl/cl/pyopencl-bessel-j-complex.cl
index 430c8000..40475871 100644
--- a/pyopencl/cl/pyopencl-bessel-j-complex.cl
+++ b/pyopencl/cl/pyopencl-bessel-j-complex.cl
@@ -6,22 +6,30 @@ Copyright (C) Vladimir Rokhlin
 Copyright (C) 2010-2012 Leslie Greengard and Zydrunas Gimbutas
 Copyright (C) 2015 Shidong Jiang, Andreas Kloeckner
 
-/!\ WARNING: GPL-ONLY SOFTWARE
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.  This program is distributed in
-the hope that it will be useful, but WITHOUT ANY WARRANTY; without
-even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-PARTICULAR PURPOSE.  See the GNU General Public License for more
-details. You should have received a copy of the GNU General Public
-License along with this program;
-if not, see <http://www.gnu.org/licenses/>.
-
 Manually translated from
 https://github.com/zgimbutas/fmmlib2d/blob/master/src/cdjseval2d.f
 
+Originally licensed under GPL, permission to license under MIT granted via email
+by Vladimir Rokhlin on May 25, 2015 and by Zydrunas Gimbutas on May 17, 2015.
+
+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.
+
 */
 
 void bessel_j_complex(int v, cdouble_t z, cdouble_t *j_v, cdouble_t *j_vp1)
diff --git a/pyopencl/cl/pyopencl-hankel-complex.cl b/pyopencl/cl/pyopencl-hankel-complex.cl
index 8f744f82..d5a0c53d 100644
--- a/pyopencl/cl/pyopencl-hankel-complex.cl
+++ b/pyopencl/cl/pyopencl-hankel-complex.cl
@@ -6,23 +6,31 @@ Copyright (C) Vladimir Rokhlin
 Copyright (C) 2010-2012 Leslie Greengard and Zydrunas Gimbutas
 Copyright (C) 2015 Andreas Kloeckner
 
-/!\ WARNING: GPL-ONLY SOFTWARE
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.  This program is distributed in
-the hope that it will be useful, but WITHOUT ANY WARRANTY; without
-even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-PARTICULAR PURPOSE.  See the GNU General Public License for more
-details. You should have received a copy of the GNU General Public
-License along with this program;
-if not, see <http://www.gnu.org/licenses/>.
-
 Auto-translated from
 https://github.com/zgimbutas/fmmlib2d/blob/master/src/hank103.f
 using
 https://github.com/pyopencl/pyopencl/tree/master/contrib/fortran-to-opencl
+
+Originally licensed under GPL, permission to license under MIT granted via email
+by Vladimir Rokhlin on May 25, 2015 and by Zydrunas Gimbutas on May 17, 2015.
+
+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.
 */
 
 void hank103(cdouble_t z, cdouble_t *h0, cdouble_t *h1, int ifexpon);
diff --git a/pyopencl/elementwise.py b/pyopencl/elementwise.py
index 80ef4f4f..285c3e93 100644
--- a/pyopencl/elementwise.py
+++ b/pyopencl/elementwise.py
@@ -965,10 +965,6 @@ def get_hankel_01_kernel(context, out_dtype, x_dtype):
     if x_dtype != out_dtype:
         raise NotImplementedError("different input/output types")
 
-    from warnings import warn
-    warn("Your program is now GPL-licensed through use of the complex "
-            "Hankel function")
-
     return get_elwise_kernel(context, [
         VectorArg(out_dtype, "h0", with_offset=True),
         VectorArg(out_dtype, "h1", with_offset=True),
-- 
GitLab