예제 #1
0
static void ati128DrawRectangle( void *drv, void *dev, DFBRectangle *rect )
{
     ATI128DriverData *adrv = (ATI128DriverData*) drv;
     ATI128DeviceData *adev = (ATI128DeviceData*) dev;
     volatile __u8    *mmio = adrv->mmio_base;

     ati128_waitfifo( adrv, adev, 3 );
     /* set the destination datatype */
     ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | BRUSH_SOLIDCOLOR );
     /* set direction */
     ati128_out32( mmio, DP_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
     /* set the drawing command */
     ati128_out32( mmio, DP_MIX, ROP3_PATCOPY | DP_SRC_RECT );

     ati128_waitfifo( adrv, adev, 7 );
     /* first line */
     ati128_out32( mmio, DST_Y_X, (S14(rect->y) << 16) | S12(rect->x));
     ati128_out32( mmio, DST_HEIGHT_WIDTH, (rect->h << 16) | 1);
     /* second line */
     ati128_out32( mmio, DST_HEIGHT_WIDTH, (1 << 16) | rect->w );
     /* third line */
     ati128_out32( mmio, DST_Y_X, (S14(rect->y+rect->h-1) << 16) | S12(rect->x));
     ati128_out32( mmio, DST_HEIGHT_WIDTH, (1 << 16) | rect->w );
     /* fourth line */
     ati128_out32( mmio, DST_Y_X, (S14(rect->y) << 16) | S12(rect->x+rect->w-1));
     ati128_out32( mmio, DST_HEIGHT_WIDTH, rect->h << 16 | 1);
}
예제 #2
0
void mach64_set_clip( Mach64DriverData *mdrv,
                      Mach64DeviceData *mdev,
                      CardState        *state )
{
     volatile u8 *mmio = mdrv->mmio_base;

     mach64_waitfifo( mdrv, mdev, 2 );
     mach64_out32( mmio, SC_LEFT_RIGHT, (S13( state->clip.x2 ) << 16) | S13( state->clip.x1 ) );
     mach64_out32( mmio, SC_TOP_BOTTOM, (S14( state->clip.y2 ) << 16) | S14( state->clip.y1 ) );
}
예제 #3
0
static bool ati128DrawBlendRectangle( void *drv, void *dev, DFBRectangle *rect )
{
     ATI128DriverData *adrv = (ATI128DriverData*) drv;
     ATI128DeviceData *adev = (ATI128DeviceData*) dev;
     volatile u8      *mmio = adrv->mmio_base;

     u32 fts = adev->ATI_fake_texture_src + (adev->fake_texture_number & 7)*4;

     ati128_waitidle( adrv, adev );
     *((u32*)  dfb_gfxcard_memory_virtual(NULL,fts)  ) = adev->fake_texture_color;
     ati128_waitidle( adrv, adev );

     ati128_out32( mmio, SCALE_3D_DATATYPE, DST_32BPP );
     ati128_out32( mmio, SCALE_PITCH,  1 );

     /* enable scaling with filtering */
     ati128_out32( mmio, SCALE_3D_CNTL, adev->ATI_blend_function );
     ati128_out32( mmio, TEX_CNTL, TEX_CNTL_ALPHA_EN_ON | TEX_CNTL_TEX_CACHE_FLUSH_ON);
     ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | SRC_DSTCOLOR );
     ati128_out32( mmio, DP_MIX, ROP3_SRCCOPY | DP_SRC_RECT );
     /* set source offset */
     ati128_out32( mmio, SCALE_OFFSET_0, adev->ATI_fake_texture_src );
     /* set height and width of the source */
     ati128_out32( mmio, SCALE_SRC_HEIGHT_WIDTH, (8 << 16) | 8);
     /* set the scaling increment registers */
     ati128_out32( mmio, SCALE_X_INC, 0 );
     ati128_out32( mmio, SCALE_Y_INC, 0 );
     /* reset accumulator regs */
     ati128_out32( mmio, SCALE_HACC, 0x00000000 );
     ati128_out32( mmio, SCALE_VACC, 0x00000000 );
     /* set the destination coordinates */

     /*-----------------------*/
     /* first line */
     ati128_out32( mmio, SCALE_DST_X_Y, (S12(rect->x) << 16) | S14(rect->y) );
     ati128_out32( mmio, SCALE_DST_HEIGHT_WIDTH, (rect->h << 16) | 1);
     /* second line */
     ati128_out32( mmio, SCALE_DST_HEIGHT_WIDTH, (1 << 16) | rect->w );
     /* third line */
     ati128_out32( mmio, SCALE_DST_X_Y, (S12(rect->x) << 16) | S14(rect->y+rect->h-1));
     ati128_out32( mmio, SCALE_DST_HEIGHT_WIDTH, (1 << 16) | rect->w );
     /* fourth line */
     ati128_out32( mmio, SCALE_DST_X_Y, (S12(rect->x+rect->w-1) << 16) | S14(rect->y));
     ati128_out32( mmio, SCALE_DST_HEIGHT_WIDTH, rect->h << 16 | 1);
     /*-----------------------*/

     /* reset scaling and texture control register */
     ati128_out32( mmio, SCALE_3D_CNTL, 0x00000000 );
     ati128_out32( mmio, TEX_CNTL, 0 );
     adev->fake_texture_number++;

     return true;
}
예제 #4
0
static void ati128Blit( void *drv, void *dev, DFBRectangle *rect, int dx, int dy )
{
     ATI128DriverData *adrv = (ATI128DriverData*) drv;
     ATI128DeviceData *adev = (ATI128DeviceData*) dev;
     volatile __u8    *mmio = adrv->mmio_base;

     __u32 dir_cmd = 0;

     if ((adev->source->format != adev->destination->format) ||
         adev->blittingflags == DSBLIT_BLEND_ALPHACHANNEL)
     {
          DFBRectangle sr = { rect->x, rect->y, rect->w, rect->h };
          DFBRectangle dr = { dx, dy, rect->w, rect->h };
          ati128StretchBlit( adrv, adev, &sr, &dr );
          return;
     }

     /* check which blitting direction should be used */
     if (rect->x <= dx) {
          dir_cmd |= DST_X_RIGHT_TO_LEFT;
          rect->x += rect->w-1;
          dx += rect->w-1;
     }
     else {
          dir_cmd |= DST_X_LEFT_TO_RIGHT;
     }
     if (rect->y <= dy) {
          dir_cmd |= DST_Y_BOTTOM_TO_TOP;
          rect->y += rect->h-1;
          dy += rect->h-1;
     }
     else {
          dir_cmd |= DST_Y_TOP_TO_BOTTOM;
     }

     ati128_waitfifo( adrv, adev, 9 );

     /* make sure that color compare register is restored to last state */
     ati128_out32( mmio, CLR_CMP_CNTL, adev->ATI_color_compare );

     /* set blitting direction */
     ati128_out32( mmio, DP_CNTL, dir_cmd );

     ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | SRC_DSTCOLOR );
     ati128_out32( mmio, DP_MIX, ROP3_SRCCOPY | DP_SRC_RECT );

     ati128_out32( mmio, SRC_Y_X, (rect->y << 16) | rect->x);
     ati128_out32( mmio, DST_Y_X, (S14(dy) << 16) | S12(dx) );
     ati128_out32( mmio, DST_HEIGHT_WIDTH, (rect->h << 16) | rect->w);

     /* set CLR_CMP_CNTL to zero, to insure that drawing funcions work corrently */
     if (adev->ATI_color_compare)
          ati128_out32( mmio, CLR_CMP_CNTL, 0 );

     if (dir_cmd != (DST_Y_TOP_TO_BOTTOM | DST_X_LEFT_TO_RIGHT)) {
          ati128_out32( mmio, DP_CNTL, DST_X_LEFT_TO_RIGHT |
                                       DST_Y_TOP_TO_BOTTOM );
     }
}
예제 #5
0
static bool ati128FillRectangle( void *drv, void *dev, DFBRectangle *rect )
{
     ATI128DriverData *adrv = (ATI128DriverData*) drv;
     ATI128DeviceData *adev = (ATI128DeviceData*) dev;
     volatile u8      *mmio = adrv->mmio_base;

     ati128_waitfifo( adrv, adev, 5 );
     /* set the destination datatype */
     ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | BRUSH_SOLIDCOLOR );
     /* set direction */
     ati128_out32( mmio, DP_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
     /* set the drawing command */
     ati128_out32( mmio, DP_MIX, ROP3_PATCOPY | DP_SRC_RECT );
     /* set parameters */
     ati128_out32( mmio, DST_Y_X, (S14(rect->y) << 16) | S12(rect->x) );
     /* this executes the drawing command */
     ati128_out32( mmio, DST_HEIGHT_WIDTH, (rect->h << 16) | rect->w );

     return true;
}
예제 #6
0
static void ati128StretchBlit( void *drv, void *dev, DFBRectangle *sr, DFBRectangle *dr )
{
     ATI128DriverData *adrv = (ATI128DriverData*) drv;
     ATI128DeviceData *adev = (ATI128DeviceData*) dev;
     volatile __u8    *mmio = adrv->mmio_base;

     __u32 src = 0;

     __u32 scalex = (__u32)(((double)sr->w/(double)dr->w) * 65536);
     __u32 scaley = (__u32)(((double)sr->h/(double)dr->h) * 65536);

     ati128_waitfifo( adrv, adev, 9 );

     /* make sure that color compare register is restored to last state */

     ati128_out32( mmio, CLR_CMP_CNTL, adev->ATI_color_compare );

     switch (adev->source->format) {
          case DSPF_RGB15:
               ati128_out32( mmio, SCALE_3D_DATATYPE, DST_15BPP );

               ati128_out32( mmio, SCALE_PITCH,
                             adev->source->front_buffer->video.pitch >>4);

               src = adev->source->front_buffer->video.offset +
                     sr->y *
                     adev->source->front_buffer->video.pitch + sr->x*2;

               ati128_out32( mmio, TEX_CNTL, 0);


          case DSPF_RGB16:
               ati128_out32( mmio, SCALE_3D_DATATYPE, DST_16BPP );

               ati128_out32( mmio, SCALE_PITCH,
                             adev->source->front_buffer->video.pitch >>4);

               src = adev->source->front_buffer->video.offset +
                     sr->y *
                     adev->source->front_buffer->video.pitch + sr->x*2;

               ati128_out32( mmio, TEX_CNTL, 0);

               break;
          case DSPF_RGB24:
               ati128_out32( mmio, SCALE_3D_DATATYPE, DST_24BPP );

               ati128_out32( mmio, SCALE_PITCH,
                             adev->source->front_buffer->video.pitch >>3);

               src = adev->source->front_buffer->video.offset +
                     sr->y *
                     adev->source->front_buffer->video.pitch + sr->x*3;

               ati128_out32( mmio, TEX_CNTL, 0);

               break;
          case DSPF_RGB32:
               ati128_out32( mmio, SCALE_3D_DATATYPE, DST_32BPP );

               ati128_out32( mmio, SCALE_PITCH,
                             adev->source->front_buffer->video.pitch >>5);

               src = adev->source->front_buffer->video.offset +
                     sr->y *
                     adev->source->front_buffer->video.pitch + sr->x*4;

               ati128_out32( mmio, TEX_CNTL, 0);

               break;
          case DSPF_ARGB:
               ati128_out32( mmio, SCALE_3D_DATATYPE, DST_32BPP );

               ati128_out32( mmio, SCALE_PITCH,
                             adev->source->front_buffer->video.pitch >>5);

               src = adev->source->front_buffer->video.offset +
                     sr->y *
                     adev->source->front_buffer->video.pitch + sr->x*4;

               if (adev->blittingflags & DSBLIT_BLEND_ALPHACHANNEL)
                    ati128_out32( mmio, TEX_CNTL, TEX_CNTL_ALPHA_EN_ON );
               else
                    ati128_out32( mmio, TEX_CNTL, 0 );
               break;
          default:
               BUG( "unexpected pixelformat!" );
               return;
     }

     ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | SRC_DSTCOLOR );
     /* set the blend function */
     ati128_out32( mmio, SCALE_3D_CNTL, adev->ATI_blend_function );
     /* set up source data and copy type */
     ati128_out32( mmio, DP_MIX, ROP3_SRCCOPY | DP_SRC_RECT );
     /* set source offset */
     ati128_out32( mmio, SCALE_OFFSET_0, src);
     /* set height and width of the source */
     ati128_out32( mmio, SCALE_SRC_HEIGHT_WIDTH, (sr->h << 16) | sr->w);

     ati128_waitfifo( adrv, adev, 9 );
     /* set the scaling increment registers */
     ati128_out32( mmio, SCALE_X_INC, scalex );
     ati128_out32( mmio, SCALE_Y_INC, scaley );
     /* reset accumulator regs */
     ati128_out32( mmio, SCALE_HACC, 0x00000000 );
     ati128_out32( mmio, SCALE_VACC, 0x00000000 );
     /* set the destination coordinates */
     ati128_out32( mmio, SCALE_DST_X_Y, (S12(dr->x) << 16) | S14(dr->y) );
     /* set destination height and width and perform the blit */
     ati128_out32( mmio, SCALE_DST_HEIGHT_WIDTH, (dr->h << 16) | dr->w );
     /*reset scaling and texture control register */
     ati128_out32( mmio, SCALE_3D_CNTL, 0x00000000 );
     ati128_out32( mmio, TEX_CNTL, 0x00000000 );

     /* set CLR_CMP_CNTL to zero, to insure that drawing funcions work corrently */
     if (adev->ATI_color_compare)
          ati128_out32( mmio, CLR_CMP_CNTL, 0 );
}
예제 #7
0
static void ati128DrawLine( void *drv, void *dev, DFBRegion *line )
{
     ATI128DriverData *adrv = (ATI128DriverData*) drv;
     ATI128DeviceData *adev = (ATI128DeviceData*) dev;
     volatile __u8    *mmio = adrv->mmio_base;

     int dx, dy;
     int small, large;
     int x_dir, y_dir, y_major;
     int err, inc, dec;

     /* Determine x & y deltas and x & y direction bits. */
     if (line->x1 < line->x2) {
          dx = line->x2 - line->x1;
          x_dir = 1 << 31;
     }
     else {
          dx = line->x1 - line->x2;
          x_dir = 0 << 31;
     }

     if (line->y1 < line->y2) {
          dy = line->y2 - line->y1;
          y_dir = 1 << 15;
     }
     else {
          dy = line->y1 - line->y2;
          y_dir = 0 << 15;
     }

     /* Determine x & y min and max values; also determine y major bit. */
     if (dx < dy) {
          small = dx;
          large = dy;
          y_major = 1 << 2;
     }
     else {
          small = dy;
          large = dx;
          y_major = 0 << 2;
     }

     /* Calculate Bresenham parameters and draw line. */
     err = -large;
     inc = small * 2;
     dec = large *(-2);

     ati128_waitfifo( adrv, adev, 7 );
     /* set the destination datatype */
     ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | BRUSH_SOLIDCOLOR | ROP3_SRCCOPY );
     /* set start coorinates */
     ati128_out32( mmio, DST_Y_X, (S14(line->y1) << 16) | S12(line->x1));
     /* allow setting of last pel bit and polygon
        outline bit for line drawing */
     ati128_out32( mmio, DP_CNTL_XDIR_YDIR_YMAJOR,
                   y_major | y_dir | x_dir );
     /* set bresenham registers and start drawing */
     ati128_out32( mmio, DST_BRES_ERR, err );
     ati128_out32( mmio, DST_BRES_INC, inc );
     ati128_out32( mmio, DST_BRES_DEC, dec );
     ati128_out32( mmio, DST_BRES_LNTH, large + 1 );
}
예제 #8
0
#include <string.h>
#include "SDL.h"

#define X2(a) a a
#define X4(a) a a a a
#define S1(a,b,c) #a".."#b".."#c"."
#define S14(a,b,c) X4(S1(a,b,c))
#define S2(a) #a"."#a"....."
#define S24(a) X4(S2(a))
#define S4(a) #a#a#a#a
#define S3(a,b,c) S1(a,b,c)S4(..)
#define SE X4(X4(S4(..)))

char l[]=SE SE X2(S3(J,H,M)S3(J,H,E)S3(F,E,A)S3(F,E,J)S3(H,E,O)S3(H,E,C)S3(H,F,
x)S3(H,F,L)),b[]=SE X2(S4(j.jv.j.v)S4(f.fr.f.r)S4(e.eq.e.q)S4(h.ht.h.t))SE,*r[3
]={S14(v,v,q)S14(r,r,m)S14(q,q,l)S14(t,t,o),S24(J)S24(F)S24(E)S24(H),S24(M)S24(
J)S24(H)S24(L)};

#define B int
#define C double
#define S static
#define I(a,b,c,d,f,g) a=(f-d)/10.,b=1e-2*(d*(28-g)-f),c=1e-2*(d*f-8*g/3);\
d+=a,f+=b,g+=c;
S C T;typedef float A;S B D,R,U,p=0;S A F[5][0100000]={{0},{0}};

void AA(void*u,Uint8*_,B L){u=u;while(L>0){B M=p&037777,s=p>>12,u=(s%R)[
l],J=(s%U)[b],w=0,a=0,n;A v,q,m,E=(0x2000-(p&017777))/8192e0f;v=q=0;
#define EF_(x) F[w][1638##x+M
#define EF(l,s,ms) ((s*ms+EF_(4)-l]*(1-ms))/2.f+EF_(3)]/2.f)
#define FQ(s) (A)sin((0.12*pow(2,n/12.))*p*s)
#define IZ(v,c) v*=v c?v:0;
예제 #9
0
파일: swim.good.c 프로젝트: Ced/cloog
void test(int M, int N, int O, int P, int Q, int R)
{
  /* Scattering iterators. */
  int p1, p3, p5;
  /* Original iterators. */
  int i, j, k;
  if (M == 1) {
    S1() ;
    S2() ;
    S3() ;
    S4() ;
    S5() ;
    S6() ;
    S7() ;
    S8() ;
    S9() ;
    S10() ;
    S11() ;
    S12() ;
    S13() ;
    S14() ;
    S15() ;
    S16() ;
    S17() ;
    S18() ;
    S19() ;
    S20() ;
    S21() ;
    S22() ;
    S23() ;
    S24() ;
    S25() ;
    S26() ;
    S27() ;
  }
  if (M == 1) {
    for (p1=1;p1<=N;p1++) {
      for (p3=1;p3<=N;p3++) {
        S28(p1,p3) ;
        S29(p1,p3) ;
        S30(p1,p3) ;
      }
      S31(p1) ;
    }
  }
  if (M == 1) {
    S32() ;
    S33() ;
    S34() ;
  }
  if ((M == 1) && (O <= 1)) {
    S35() ;
  }
  if (M == 1) {
    S36() ;
    S37() ;
  }
  if ((M == 1) && (N >= 1) && (Q >= 1) && (R >= 1)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      for (p3=1;p3<=Q;p3++) {
        for (p5=1;p5<=R;p5++) {
          S40(p1,p3,p5) ;
          S41(p1,p3,p5) ;
          S42(p1,p3,p5) ;
          S43(p1,p3,p5) ;
        }
      }
      for (p3=1;p3<=Q;p3++) {
        S44(p1,p3) ;
        S45(p1,p3) ;
        S46(p1,p3) ;
        S47(p1,p3) ;
      }
      for (p3=1;p3<=R;p3++) {
        S48(p1,p3) ;
        S49(p1,p3) ;
        S50(p1,p3) ;
        S51(p1,p3) ;
      }
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      for (p3=1;p3<=Q;p3++) {
        for (p5=1;p5<=R;p5++) {
          S59(p1,p3,p5) ;
          S60(p1,p3,p5) ;
          S61(p1,p3,p5) ;
        }
      }
      for (p3=1;p3<=Q;p3++) {
        S62(p1,p3) ;
        S63(p1,p3) ;
        S64(p1,p3) ;
      }
      for (p3=1;p3<=R;p3++) {
        S65(p1,p3) ;
        S66(p1,p3) ;
        S67(p1,p3) ;
      }
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      for (p3=1;p3<=N;p3++) {
        for (p5=1;p5<=N;p5++) {
          S95(p1,p3,p5) ;
          S96(p1,p3,p5) ;
          S97(p1,p3,p5) ;
        }
        S98(p1,p3) ;
      }
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      for (p3=1;p3<=Q;p3++) {
        for (p5=1;p5<=R;p5++) {
          S102(p1,p3,p5) ;
          S103(p1,p3,p5) ;
          S104(p1,p3,p5) ;
          S105(p1,p3,p5) ;
          S106(p1,p3,p5) ;
          S107(p1,p3,p5) ;
        }
      }
      for (p3=1;p3<=Q;p3++) {
        S108(p1,p3) ;
        S109(p1,p3) ;
        S110(p1,p3) ;
        S111(p1,p3) ;
        S112(p1,p3) ;
        S113(p1,p3) ;
      }
      for (p3=1;p3<=R;p3++) {
        S114(p1,p3) ;
        S115(p1,p3) ;
        S116(p1,p3) ;
        S117(p1,p3) ;
        S118(p1,p3) ;
        S119(p1,p3) ;
      }
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N <= 0) && (Q >= 1) && (R >= 1)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      for (p3=1;p3<=Q;p3++) {
        for (p5=1;p5<=R;p5++) {
          S40(p1,p3,p5) ;
          S41(p1,p3,p5) ;
          S42(p1,p3,p5) ;
          S43(p1,p3,p5) ;
        }
      }
      for (p3=1;p3<=Q;p3++) {
        S44(p1,p3) ;
        S45(p1,p3) ;
        S46(p1,p3) ;
        S47(p1,p3) ;
      }
      for (p3=1;p3<=R;p3++) {
        S48(p1,p3) ;
        S49(p1,p3) ;
        S50(p1,p3) ;
        S51(p1,p3) ;
      }
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      for (p3=1;p3<=Q;p3++) {
        for (p5=1;p5<=R;p5++) {
          S59(p1,p3,p5) ;
          S60(p1,p3,p5) ;
          S61(p1,p3,p5) ;
        }
      }
      for (p3=1;p3<=Q;p3++) {
        S62(p1,p3) ;
        S63(p1,p3) ;
        S64(p1,p3) ;
      }
      for (p3=1;p3<=R;p3++) {
        S65(p1,p3) ;
        S66(p1,p3) ;
        S67(p1,p3) ;
      }
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      for (p3=1;p3<=Q;p3++) {
        for (p5=1;p5<=R;p5++) {
          S102(p1,p3,p5) ;
          S103(p1,p3,p5) ;
          S104(p1,p3,p5) ;
          S105(p1,p3,p5) ;
          S106(p1,p3,p5) ;
          S107(p1,p3,p5) ;
        }
      }
      for (p3=1;p3<=Q;p3++) {
        S108(p1,p3) ;
        S109(p1,p3) ;
        S110(p1,p3) ;
        S111(p1,p3) ;
        S112(p1,p3) ;
        S113(p1,p3) ;
      }
      for (p3=1;p3<=R;p3++) {
        S114(p1,p3) ;
        S115(p1,p3) ;
        S116(p1,p3) ;
        S117(p1,p3) ;
        S118(p1,p3) ;
        S119(p1,p3) ;
      }
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N >= 1) && (Q <= 0) && (R >= 1)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      for (p3=1;p3<=R;p3++) {
        S48(p1,p3) ;
        S49(p1,p3) ;
        S50(p1,p3) ;
        S51(p1,p3) ;
      }
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      for (p3=1;p3<=R;p3++) {
        S65(p1,p3) ;
        S66(p1,p3) ;
        S67(p1,p3) ;
      }
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      for (p3=1;p3<=N;p3++) {
        for (p5=1;p5<=N;p5++) {
          S95(p1,p3,p5) ;
          S96(p1,p3,p5) ;
          S97(p1,p3,p5) ;
        }
        S98(p1,p3) ;
      }
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      for (p3=1;p3<=R;p3++) {
        S114(p1,p3) ;
        S115(p1,p3) ;
        S116(p1,p3) ;
        S117(p1,p3) ;
        S118(p1,p3) ;
        S119(p1,p3) ;
      }
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N <= 0) && (Q <= 0) && (R >= 1)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      for (p3=1;p3<=R;p3++) {
        S48(p1,p3) ;
        S49(p1,p3) ;
        S50(p1,p3) ;
        S51(p1,p3) ;
      }
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      for (p3=1;p3<=R;p3++) {
        S65(p1,p3) ;
        S66(p1,p3) ;
        S67(p1,p3) ;
      }
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      for (p3=1;p3<=R;p3++) {
        S114(p1,p3) ;
        S115(p1,p3) ;
        S116(p1,p3) ;
        S117(p1,p3) ;
        S118(p1,p3) ;
        S119(p1,p3) ;
      }
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N >= 1) && (Q <= 0) && (R <= 0)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      for (p3=1;p3<=N;p3++) {
        for (p5=1;p5<=N;p5++) {
          S95(p1,p3,p5) ;
          S96(p1,p3,p5) ;
          S97(p1,p3,p5) ;
        }
        S98(p1,p3) ;
      }
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N <= 0) && (Q <= 0) && (R <= 0)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N >= 1) && (Q >= 1) && (R <= 0)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      for (p3=1;p3<=Q;p3++) {
        S44(p1,p3) ;
        S45(p1,p3) ;
        S46(p1,p3) ;
        S47(p1,p3) ;
      }
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      for (p3=1;p3<=Q;p3++) {
        S62(p1,p3) ;
        S63(p1,p3) ;
        S64(p1,p3) ;
      }
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      for (p3=1;p3<=N;p3++) {
        for (p5=1;p5<=N;p5++) {
          S95(p1,p3,p5) ;
          S96(p1,p3,p5) ;
          S97(p1,p3,p5) ;
        }
        S98(p1,p3) ;
      }
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      for (p3=1;p3<=Q;p3++) {
        S108(p1,p3) ;
        S109(p1,p3) ;
        S110(p1,p3) ;
        S111(p1,p3) ;
        S112(p1,p3) ;
        S113(p1,p3) ;
      }
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
  if ((M == 1) && (N <= 0) && (Q >= 1) && (R <= 0)) {
    for (p1=2;p1<=P;p1++) {
      S38(p1) ;
      S39(p1) ;
      for (p3=1;p3<=Q;p3++) {
        S44(p1,p3) ;
        S45(p1,p3) ;
        S46(p1,p3) ;
        S47(p1,p3) ;
      }
      S52(p1) ;
      S53(p1) ;
      S54(p1) ;
      S55(p1) ;
      S56(p1) ;
      S57(p1) ;
      S58(p1) ;
      for (p3=1;p3<=Q;p3++) {
        S62(p1,p3) ;
        S63(p1,p3) ;
        S64(p1,p3) ;
      }
      S68(p1) ;
      S69(p1) ;
      S70(p1) ;
      S71(p1) ;
      S72(p1) ;
      S73(p1) ;
      S74(p1) ;
      S75(p1) ;
      S76(p1) ;
      S77(p1) ;
      S78(p1) ;
      S79(p1) ;
      S80(p1) ;
      S81(p1) ;
      S82(p1) ;
      S83(p1) ;
      S84(p1) ;
      S85(p1) ;
      S86(p1) ;
      S87(p1) ;
      S88(p1) ;
      S89(p1) ;
      S90(p1) ;
      S91(p1) ;
      S92(p1) ;
      S93(p1) ;
      S94(p1) ;
      S99(p1) ;
      S100(p1) ;
      S101(p1) ;
      for (p3=1;p3<=Q;p3++) {
        S108(p1,p3) ;
        S109(p1,p3) ;
        S110(p1,p3) ;
        S111(p1,p3) ;
        S112(p1,p3) ;
        S113(p1,p3) ;
      }
      S120(p1) ;
      S121(p1) ;
      S122(p1) ;
      S123(p1) ;
      S124(p1) ;
      S125(p1) ;
    }
  }
}
예제 #10
0
파일: AST_bool.c 프로젝트: phyrrus9/lang
enum parseType S()
{
	char *save = next;
	if (!S01()) {
		next = save;
		if (!S02()) {
			next = save;
			if (!S03()) {
				next = save;
				if (!S04()) {
					next = save;
					if (!S05()) {
						next = save;
						goto S06_above;
					} else return tS05;
				} else return tS04;
			} else return tS03;
		} else return tS02;
	} else return tS01;
S06_above:
	if (!S06()) {
		next = save;
		if (!S07()) {
			next = save;
			if (!S08()) {
				next = save;
				if (!S09()) {
					next = save;
					if (!S10()) {
						next = save;
						goto S11_above;
					} else return tS10;
				} else return tS09;
			} else return tS08;
		} else return tS07;
	} else return tS06;
S11_above:
	if (!S11()) {
		next = save;
		if (!S12()) {
			next = save;
			if (!S13()) {
				next = save;
				if (!S14()) {
					next = save;
					if (!S15()) {
						next = save;
						goto S16_above;
					} else return tS15;
				} else return tS14;
			} else return tS13;
		} else return tS12;
	} else return tS11;
S16_above:
	if (!S16()) {
		next = save;
		if (!S17()) {
			next = save;
			if (!S18()) {
				next = save;
				if (!S19()) {
					next = save;
					if (!S20()) {
						goto S21_above;
					} else return tS20;
				} else return tS19;
			} else return tS18;
		} else return tS17;
	} else return tS16;
S21_above:
	if (!S21()) {
		return tERR;
	} else return tS21;
	return tERR;
}
예제 #11
0
파일: mg-interp.good.c 프로젝트: Ced/cloog
void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U)
{
  /* Scattering iterators. */
  int c2, c4, c6;
  /* Original iterators. */
  int i, j, k;
  if ((M >= 2) && (N >= 4)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c6=1;c6<=M;c6++) {
        S1(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S6(c2,1,c6) ;
        S7(c2,1,c6) ;
      }
      for (c6=1;c6<=M;c6++) {
        S3(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S1(c2,2,c6) ;
      }
      S1(c2,2,M) ;
      for (c6=1;c6<=M-1;c6++) {
        S6(c2,2,c6) ;
        S7(c2,2,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S11(c2,1,c6) ;
      }
      for (c4=3;c4<=2*N-5;c4++) {
        for (c6=1;c6<=M-1;c6++) {
          if ((c4+1)%2 == 0) {
            j = (c4-1)/2 ;
            S10(c2,(c4-1)/2,c6) ;
          }
        }
        for (c6=1;c6<=M;c6++) {
          if ((c4+1)%2 == 0) {
            j = (c4+1)/2 ;
            S3(c2,(c4+1)/2,c6) ;
          }
        }
        for (c6=1;c6<=M-1;c6++) {
          if (c4%2 == 0) {
            j = (c4+2)/2 ;
            S6(c2,(c4+2)/2,c6) ;
            S7(c2,(c4+2)/2,c6) ;
          }
          if ((c4+1)%2 == 0) {
            j = (c4+3)/2 ;
            S1(c2,(c4+3)/2,c6) ;
          }
        }
        if ((c4+1)%2 == 0) {
          j = (c4+3)/2 ;
          S1(c2,(c4+3)/2,M) ;
        }
        for (c6=1;c6<=M-1;c6++) {
          if (c4%2 == 0) {
            S11(c2,c4/2,c6) ;
          }
        }
      }
      c4 = 2*N-4 ;
      for (c6=1;c6<=M-1;c6++) {
        j = N-1 ;
        S6(c2,N-1,c6) ;
        S7(c2,N-1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        j = N-2 ;
        S11(c2,N-2,c6) ;
      }
      c4 = 2*N-3 ;
      for (c6=1;c6<=M-1;c6++) {
        j = N-2 ;
        S10(c2,N-2,c6) ;
      }
      for (c6=1;c6<=M;c6++) {
        j = N-1 ;
        S3(c2,N-1,c6) ;
      }
      c4 = 2*N-2 ;
      for (c6=1;c6<=M-1;c6++) {
        j = N-1 ;
        S11(c2,N-1,c6) ;
      }
      c4 = 2*N-1 ;
      for (c6=1;c6<=M-1;c6++) {
        j = N-1 ;
        S10(c2,N-1,c6) ;
      }
    }
  }
  if ((M >= 2) && (N == 3)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c6=1;c6<=M;c6++) {
        S1(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S6(c2,1,c6) ;
        S7(c2,1,c6) ;
      }
      for (c6=1;c6<=M;c6++) {
        S3(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S1(c2,2,c6) ;
      }
      S1(c2,2,M) ;
      for (c6=1;c6<=M-1;c6++) {
        S6(c2,2,c6) ;
        S7(c2,2,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S11(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S10(c2,1,c6) ;
      }
      for (c6=1;c6<=M;c6++) {
        S3(c2,2,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S11(c2,2,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S10(c2,2,c6) ;
      }
    }
  }
  if ((M >= 2) && (N == 2)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c6=1;c6<=M;c6++) {
        S1(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S6(c2,1,c6) ;
        S7(c2,1,c6) ;
      }
      for (c6=1;c6<=M;c6++) {
        S3(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S11(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S10(c2,1,c6) ;
      }
    }
  }
  if ((M == 1) && (N >= 3)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c4=-1;c4<=0;c4++) {
        if ((c4+1)%2 == 0) {
          j = (c4+3)/2 ;
          S1(c2,(c4+3)/2,1) ;
        }
      }
      for (c4=1;c4<=2*N-5;c4++) {
        if ((c4+1)%2 == 0) {
          j = (c4+1)/2 ;
          S3(c2,(c4+1)/2,1) ;
        }
        if ((c4+1)%2 == 0) {
          j = (c4+3)/2 ;
          S1(c2,(c4+3)/2,1) ;
        }
      }
      for (c4=2*N-4;c4<=2*N-3;c4++) {
        if ((c4+1)%2 == 0) {
          j = (c4+1)/2 ;
          S3(c2,(c4+1)/2,1) ;
        }
      }
    }
  }
  if ((M == 1) && (N == 2)) {
    for (c2=1;c2<=O-1;c2++) {
      S1(c2,1,1) ;
      S3(c2,1,1) ;
    }
  }
  if ((M >= 2) && (N >= 3)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c6=1;c6<=M;c6++) {
        S2(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S8(c2,1,c6) ;
      }
      for (c4=3;c4<=2*N-2;c4++) {
        for (c6=1;c6<=M;c6++) {
          if (c4%2 == 0) {
            S2(c2,c4/2,c6) ;
          }
        }
        for (c6=1;c6<=M-1;c6++) {
          if (c4%2 == 0) {
            S8(c2,c4/2,c6) ;
          }
        }
        for (c6=1;c6<=M-1;c6++) {
          if ((c4+1)%2 == 0) {
            j = (c4-1)/2 ;
            S9(c2,(c4-1)/2,c6) ;
          }
        }
      }
      c4 = 2*N-1 ;
      for (c6=1;c6<=M-1;c6++) {
        j = N-1 ;
        S9(c2,N-1,c6) ;
      }
    }
  }
  if ((M >= 2) && (N == 2)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c6=1;c6<=M;c6++) {
        S2(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S8(c2,1,c6) ;
      }
      for (c6=1;c6<=M-1;c6++) {
        S9(c2,1,c6) ;
      }
    }
  }
  if ((M == 1) && (N >= 2)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c4=2;c4<=2*N-2;c4++) {
        if (c4%2 == 0) {
          S2(c2,c4/2,1) ;
        }
      }
    }
  }
  if ((M >= 2) && (N >= 2)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c4=1;c4<=N-1;c4++) {
        for (c6=1;c6<=M-1;c6++) {
          S4(c2,c4,c6) ;
        }
      }
    }
  }
  if ((M >= 2) && (N >= 2)) {
    for (c2=1;c2<=O-1;c2++) {
      for (c4=1;c4<=N-1;c4++) {
        for (c6=1;c6<=M-1;c6++) {
          S5(c2,c4,c6) ;
        }
      }
    }
  }
  if ((M >= P+1) && (N >= Q+1)) {
    for (c2=R;c2<=O-1;c2++) {
      for (c4=Q;c4<=N-1;c4++) {
        for (c6=P;c6<=M-1;c6++) {
          S12(c2,c4,c6) ;
        }
      }
    }
  }
  if ((M >= 2) && (N >= Q+1)) {
    for (c2=R;c2<=O-1;c2++) {
      for (c4=Q;c4<=N-1;c4++) {
        for (c6=1;c6<=M-1;c6++) {
          S13(c2,c4,c6) ;
        }
      }
    }
  }
  if ((M >= P+1) && (N >= 2)) {
    for (c2=R;c2<=O-1;c2++) {
      for (c4=1;c4<=N-1;c4++) {
        for (c6=P;c6<=M-1;c6++) {
          S14(c2,c4,c6) ;
        }
      }
    }
  }
  if ((M >= 2) && (N >= 2)) {
    for (c2=R;c2<=O-1;c2++) {
      for (c4=1;c4<=N-1;c4++) {
        for (c6=1;c6<=M-1;c6++) {
          S15(c2,c4,c6) ;
        }
      }
    }
  }
}