~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to tune/blas/gemv/mvsearch.c

  • Committer: Bazaar Package Importer
  • Author(s): Sylvestre Ledru
  • Date: 2009-09-17 23:31:54 UTC
  • mto: (2.2.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090917233154-9esw88ub02twbuab
Tags: upstream-3.8.3
ImportĀ upstreamĀ versionĀ 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *             Automatically Tuned Linear Algebra Software v3.6.0
 
2
 *             Automatically Tuned Linear Algebra Software v3.8.3
3
3
 *                    (C) Copyright 1999 R. Clint Whaley
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
94
94
{
95
95
   char ln[256];
96
96
   if (cc[0] != '\0' && ccflags[0] != '\0')
97
 
      sprintf(ln, "make %cmvtstcase%c mvrout=%s MVCC=\"%s\" MVFLAGS=\"%s\"\n",
98
 
              pre, TA, mvnam, cc, ccflags);
 
97
      sprintf(ln,
 
98
              "make %cmvtstcase%c mvrout=%s %cMVCC=\"%s\" %cMVFLAGS=\"%s\"\n",
 
99
              pre, TA, mvnam, pre, cc, pre, ccflags);
99
100
   else if (cc[0] == '\0' && ccflags[0] != '\0')
100
101
      sprintf(ln, "make %cmvtstcase%c mvrout=%s EXTFLAGS=\"%s\"\n",
101
102
              pre, TA, mvnam, ccflags);
120
121
      i = sprintf(ln, "make %csvcase mvrout=%s svrout=%s cas=%d xu=%d yu=%d l1mul=%d iflag=%d gmvout=\"-o %s\"",
121
122
              pre, mvnamT, mvnamN, cas, nu, mu, imul, flag, fnam);
122
123
      if (ccN[0] != '\0' && ccflagsN[0] != '\0')
123
 
         i += sprintf(ln+i, " SVCC=\"%s\" SVFLAGS=\"%s\"", ccN, ccflagsN);
 
124
         i += sprintf(ln+i, " %cSVCC=\"%s\" %cSVFLAGS=\"%s\"",
 
125
                      pre, ccN, pre, ccflagsN);
124
126
      else if (ccN[0] == '\0' && ccflagsN[0] != '\0')
125
127
      {
126
128
         i += sprintf(ln+i,
129
131
      else i += sprintf(ln+i,
130
132
           " SEXTFLAGS=\"-DATL_NOL1PREFETCH -DATL_NOL2PREFETCH\"");
131
133
      if (ccT[0] != '\0' && ccflagsT[0] != '\0')
132
 
         i += sprintf(ln+i, " MVCC=\"%s\" MVFLAGS=\"%s\"", ccT, ccflagsT);
 
134
         i += sprintf(ln+i, " %cMVCC=\"%s\" %cMVFLAGS=\"%s\"",
 
135
                      pre, ccT, pre, ccflagsT);
133
136
      else if (ccT[0] == '\0' && ccflagsT[0] != '\0')
134
137
         i += sprintf(ln+i, " SEXTFLAGS=\"%s\"", ccflagsT);
135
138
      sprintf(ln+i, "\n");
178
181
      i = sprintf(ln, "make %cmvcase%c mvrout=%s cas=%d xu=%d yu=%d l1mul=%d iflag=%d gmvout=\"-o %s\"",
179
182
              pre, TA, mvnam, cas, nu, mu, imul, flag, fnam);
180
183
      if (cc[0] != '\0' && ccflags[0] != '\0')
181
 
         i += sprintf(ln+i, " MVCC=\"%s\" MVFLAGS=\"%s\"", cc, ccflags);
 
184
         i += sprintf(ln+i, " %cMVCC=\"%s\" %cMVFLAGS=\"%s\"",
 
185
                      pre, cc, pre, ccflags);
182
186
      else if (cc[0] == '\0' && ccflags[0] != '\0')
183
187
      {
184
188
         if (SY) i += sprintf(ln+i,
492
496
   char *tts[6] = {"N", "T", "S", "N",  "T"};
493
497
   char *TAs[6] = {"N", "T", "S", "Nc", "C"};
494
498
   char *typ, *ct;
 
499
   char UPR;
495
500
   FILE *fp;
496
501
   int i, j, nbet=3, ntran=3;
497
502
 
500
505
   else if (pre == 'c') typ = "SCPLX";
501
506
   else if (pre == 'z') typ = "DCPLX";
502
507
   else assert(0);
 
508
   UPR = (pre == 's' || pre == 'c') ? 'S' : 'D';
503
509
   sprintf(ln, "Make_%cmv", pre);
504
510
   fp = fopen(ln, "w");
505
511
   assert(fp);
506
512
   fprintf(fp, "include Make.inc\n\n");
507
513
 
508
 
   if (ccN[0] == '\0') fprintf(fp, "MVNCC = $(CC)\n");
 
514
   if (ccN[0] == '\0') fprintf(fp, "MVNCC = $(%cKC)\n", UPR);
509
515
   else fprintf(fp, "MVNCC = %s\n", ccN);
510
516
   if (ccN[0] == '\0' && ccflagsN[0] != '\0')
511
 
      fprintf(fp, "MVNFLAGS = $(CCFLAGS) %s -D%s\n", ccflagsN, typ);
 
517
      fprintf(fp, "MVNFLAGS = $(CDEFS) $(%cKCFLAGS) %s -D%s\n",
 
518
              UPR, ccflagsN, typ);
512
519
   else if (ccflagsN[0] != '\0')
513
520
      fprintf(fp, "MVNFLAGS = $(CDEFS) %s -D%s\n", ccflagsN, typ);
514
 
   else fprintf(fp, "MVNFLAGS = $(CCFLAGS) -D%s\n", typ);
 
521
   else fprintf(fp, "MVNFLAGS = $(CDEFS) $(%cKCFLAGS) -D%s\n", UPR, typ);
515
522
   if (pre == 'c' || pre == 'z')
516
523
   {
517
524
      fprintf(fp, "MVNcCC = $(MVNCC)\n");
518
525
      fprintf(fp, "MVNcFLAGS = $(MVNFLAGS) -DConj_\n\n");
519
526
   }
520
527
 
521
 
   if (ccT[0] == '\0') fprintf(fp, "MVTCC = $(CC)\n");
 
528
   if (ccT[0] == '\0') fprintf(fp, "MVTCC = $(%cKC)\n", UPR);
522
529
   else fprintf(fp, "MVTCC = %s\n", ccT);
523
530
   if (ccT[0] == '\0' && ccflagsT[0] != '\0')
524
 
      fprintf(fp, "MVTFLAGS = $(CCFLAGS) %s -D%s\n", ccflagsT, typ);
 
531
      fprintf(fp, "MVTFLAGS = $(CDEFS) $(%cKCFLAGS) %s -D%s\n",
 
532
              UPR, ccflagsT, typ);
525
533
   else if (ccflagsT[0] != '\0')
526
534
      fprintf(fp, "MVTFLAGS = $(CDEFS) %s -D%s\n", ccflagsT, typ);
527
 
   else fprintf(fp, "MVTFLAGS = $(CCFLAGS) -D%s\n", typ);
 
535
   else fprintf(fp, "MVTFLAGS = $(CDEFS) $(%cKCFLAGS) -D%s\n", UPR, typ);
528
536
   if (pre == 'c' || pre == 'z')
529
537
   {
530
538
      fprintf(fp, "MVCCC = $(MVTCC)\n");
531
539
      fprintf(fp, "MVCFLAGS = $(MVTFLAGS) -DConj_\n\n");
532
540
   }
533
541
 
534
 
   if (ccS[0] == '\0') fprintf(fp, "MVSCC = $(CC)\n");
 
542
   if (ccS[0] == '\0') fprintf(fp, "MVSCC = $(%cKC)\n", UPR);
535
543
   else fprintf(fp, "MVSCC = %s\n", ccS);
536
544
   if (ccS[0] == '\0' && ccflagsS[0] != '\0')
537
 
      fprintf(fp, "MVSFLAGS = $(CCFLAGS) %s -D%s", ccflagsS, typ);
 
545
      fprintf(fp, "MVSFLAGS = $(CDEFS) $(%cKCFLAGS) %s -D%s",
 
546
              UPR, ccflagsS, typ);
538
547
   else if (ccflagsS[0] != '\0')
539
548
      fprintf(fp, "MVSFLAGS = $(CDEFS) %s -D%s", ccflagsS, typ);
540
 
   else fprintf(fp, "MVSFLAGS = $(CCFLAGS) -D%s", typ);
 
549
   else fprintf(fp, "MVSFLAGS = $(CDEFS) $(%cKCFLAGS) -D%s", UPR, typ);
541
550
   fprintf(fp, " -DATL_NOL1PREFETCH -DATL_NOL2PREFETCH\n\n");
542
551
 
543
552
   if (pre == 's' || pre == 'd')