diff options
Diffstat (limited to 'libgfortran/generated/bessel_r16.c')
-rw-r--r-- | libgfortran/generated/bessel_r16.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/libgfortran/generated/bessel_r16.c b/libgfortran/generated/bessel_r16.c index 28c35c10438..ae23dbced72 100644 --- a/libgfortran/generated/bessel_r16.c +++ b/libgfortran/generated/bessel_r16.c @@ -1,6 +1,6 @@ /* Implementation of the BESSEL_JN and BESSEL_YN transformational function using a recurrence algorithm. - Copyright 2010 Free Software Foundation, Inc. + Copyright 2010, 2012 Free Software Foundation, Inc. Contributed by Tobias Burnus <burnus@net-b.de> This file is part of the GNU Fortran runtime library (libgfortran). @@ -55,11 +55,11 @@ bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, GFC_REAL_16 x stride = GFC_DESCRIPTOR_STRIDE(ret,0); - if (ret->data == NULL) + if (ret->base_addr == NULL) { size_t size = n2 < n1 ? 0 : n2-n1+1; GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1); - ret->data = internal_malloc_size (sizeof (GFC_REAL_16) * size); + ret->base_addr = internal_malloc_size (sizeof (GFC_REAL_16) * size); ret->offset = 0; } @@ -76,21 +76,20 @@ bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, GFC_REAL_16 x if (unlikely (x == 0)) { - ret->data[0] = 1; + ret->base_addr[0] = 1; for (i = 1; i <= n2-n1; i++) - ret->data[i*stride] = 0; + ret->base_addr[i*stride] = 0; return; } - ret->data = ret->data; last1 = MATHFUNC(jn) (n2, x); - ret->data[(n2-n1)*stride] = last1; + ret->base_addr[(n2-n1)*stride] = last1; if (n1 == n2) return; last2 = MATHFUNC(jn) (n2 - 1, x); - ret->data[(n2-n1-1)*stride] = last2; + ret->base_addr[(n2-n1-1)*stride] = last2; if (n1 + 1 == n2) return; @@ -99,9 +98,9 @@ bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, GFC_REAL_16 x for (i = n2-n1-2; i >= 0; i--) { - ret->data[i*stride] = x2rev * (i+1+n1) * last2 - last1; + ret->base_addr[i*stride] = x2rev * (i+1+n1) * last2 - last1; last1 = last2; - last2 = ret->data[i*stride]; + last2 = ret->base_addr[i*stride]; } } @@ -123,11 +122,11 @@ bessel_yn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, stride = GFC_DESCRIPTOR_STRIDE(ret,0); - if (ret->data == NULL) + if (ret->base_addr == NULL) { size_t size = n2 < n1 ? 0 : n2-n1+1; GFC_DIMENSION_SET(ret->dim[0], 0, size-1, 1); - ret->data = internal_malloc_size (sizeof (GFC_REAL_16) * size); + ret->base_addr = internal_malloc_size (sizeof (GFC_REAL_16) * size); ret->offset = 0; } @@ -146,22 +145,22 @@ bessel_yn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, { for (i = 0; i <= n2-n1; i++) #if defined(GFC_REAL_16_INFINITY) - ret->data[i*stride] = -GFC_REAL_16_INFINITY; + ret->base_addr[i*stride] = -GFC_REAL_16_INFINITY; #else - ret->data[i*stride] = -GFC_REAL_16_HUGE; + ret->base_addr[i*stride] = -GFC_REAL_16_HUGE; #endif return; } - ret->data = ret->data; + ret->base_addr = ret->base_addr; last1 = MATHFUNC(yn) (n1, x); - ret->data[0] = last1; + ret->base_addr[0] = last1; if (n1 == n2) return; last2 = MATHFUNC(yn) (n1 + 1, x); - ret->data[1*stride] = last2; + ret->base_addr[1*stride] = last2; if (n1 + 1 == n2) return; @@ -173,14 +172,14 @@ bessel_yn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, #if defined(GFC_REAL_16_INFINITY) if (unlikely (last2 == -GFC_REAL_16_INFINITY)) { - ret->data[i*stride] = -GFC_REAL_16_INFINITY; + ret->base_addr[i*stride] = -GFC_REAL_16_INFINITY; } else #endif { - ret->data[i*stride] = x2rev * (i-1+n1) * last2 - last1; + ret->base_addr[i*stride] = x2rev * (i-1+n1) * last2 - last1; last1 = last2; - last2 = ret->data[i*stride]; + last2 = ret->base_addr[i*stride]; } } } |