File: pr47744-2.c

package info (click to toggle)
gcc-arm-none-eabi 15%3A14.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,099,328 kB
  • sloc: cpp: 3,627,108; ansic: 2,571,498; ada: 834,230; f90: 235,082; makefile: 79,231; asm: 74,984; xml: 51,692; exp: 39,736; sh: 33,298; objc: 15,629; python: 15,069; fortran: 14,429; pascal: 7,003; awk: 5,070; perl: 3,106; ml: 285; lisp: 253; lex: 204; haskell: 135
file content (40 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* { dg-do compile } */
/* { dg-require-effective-target int128 } */
/* { dg-options "-std=gnu99" } */

typedef long unsigned int size_t;
typedef long int ssize_t;
typedef ssize_t index_type;
typedef __int128_t GFC_INTEGER_16;
typedef struct descriptor_dimension
{
  index_type _stride;
  index_type _lbound;
  index_type _ubound;
}
descriptor_dimension;
typedef struct { GFC_INTEGER_16 *data; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_i16;
void
matmul_i16 (gfc_array_i16 * const restrict retarray,
	    gfc_array_i16 * const restrict a,
	    GFC_INTEGER_16 bbase_yn)
{
  GFC_INTEGER_16 * restrict dest;
  index_type rxstride, rystride;
  index_type x, y, n, count, xcount;
  GFC_INTEGER_16 * restrict dest_y;
  GFC_INTEGER_16 s;
  const GFC_INTEGER_16 * restrict abase_n;
  rxstride = ((retarray)->dim[0]._stride);
  rystride = ((retarray)->dim[1]._stride);
  xcount = ((a)->dim[0]._ubound + 1 - (a)->dim[0]._lbound);
  dest = retarray->data;
  dest_y = &dest[y*rystride];
  for (x = 0; x < xcount; x++)
    dest_y[x] += abase_n[x] * bbase_yn;
  for (x = 0; x < xcount; x++)
    {
      for (n = 0; n < count; n++)
	dest_y[x*rxstride] = (GFC_INTEGER_16) 0;
    }
}