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

« back to all changes in this revision

Viewing changes to src/auxil/kernel/ATL_axpy_x1_y1.c

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2013-06-11 15:58:16 UTC
  • mfrom: (1.1.3 upstream)
  • mto: (2.2.21 experimental)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20130611155816-b72z8f621tuhbzn0
Tags: upstream-3.10.1
Import upstream version 3.10.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *             Automatically Tuned Linear Algebra Software v3.8.4
3
 
 *                    (C) Copyright 1999 R. Clint Whaley
 
2
 *             Automatically Tuned Linear Algebra Software v3.10.1
 
3
 * Copyright (C) 2009, 1999 R. Clint Whaley
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
6
6
 * modification, are permitted provided that the following conditions
32
32
 
33
33
#if (defined(ATL_MULADD) && ATL_mmnreg >= 29) || \
34
34
    (defined(ATL_NOMULADD) && ATL_mmnreg >= 25)
35
 
static void axpy_lt16(const int N, const SCALAR alpha, const TYPE *x, TYPE *y)
 
35
static void axpy_lt16(ATL_CINT N, const SCALAR alpha, const TYPE *x, TYPE *y)
36
36
{
37
37
   const register TYPE alp = alpha;
38
 
   int i;
 
38
   ATL_INT i;
39
39
   switch(N)
40
40
   {
41
41
   case 1:
215
215
#endif
216
216
 
217
217
#if defined(ATL_MULADD) && ATL_mmnreg >= 29
218
 
static void axpy_16(const int N, const SCALAR alpha, const TYPE *x, TYPE *y)
 
218
static void axpy_16(ATL_CINT N, const SCALAR alpha, const TYPE *x, TYPE *y)
219
219
/*
220
220
 * 4 register prefetch on X (assumed to be in L1), 16 register prefetch on
221
221
 * Y (L2 or main), with 8-cycle muladd.  Unrolled by 16 to ensure multiple
222
222
 * cacheline usage for both single and double.
223
223
 */
224
224
{
225
 
   const int N16 = (N>>4)<<4;
226
 
   int i, j;
 
225
   ATL_CINT N16 = (N>>4)<<4;
 
226
   ATL_INT i, j;
227
227
   const TYPE *stX = x + N16 - 32;
228
228
   const register TYPE alp = alpha;
229
229
   register TYPE m0, m1, m2, m3, m4, m5, m6, m7;
318
318
   else axpy_lt16(N, alpha, x, y);
319
319
}
320
320
#elif defined(ATL_NOMULADD) && ATL_mmnreg >= 25
321
 
static void axpy_16(const int N, const SCALAR alpha, const TYPE *x, TYPE *y)
 
321
static void axpy_16(ATL_CINT N, const SCALAR alpha, const TYPE *x, TYPE *y)
322
322
/*
323
323
 * 8 register prefetch on X & Y, with 4 cycle multiply & 4 cycle add,
324
324
 * unrolled by 16 to ensure multiple cacheline usage for both singe & double
401
401
}
402
402
 
403
403
#endif
404
 
void Mjoin(PATL,axpy_x1_y1)(const int N, const SCALAR alpha, const TYPE *x,
405
 
                            const int incX, TYPE *y, const int incY)
 
404
void Mjoin(PATL,axpy_x1_y1)(ATL_CINT N, const SCALAR alpha, const TYPE *x,
 
405
                            ATL_CINT incX, TYPE *y, ATL_CINT incY)
406
406
/*
407
407
 * y <- alpha * x + y
408
408
 */
412
412
#elif defined(ATL_NOMULADD) && (ATL_mmnreg >= 25)
413
413
   const int inb =
414
414
             ATL_DivBySize(((size_t)y)) - ((ATL_DivBySize(((size_t)y))>>4)<<4);
415
 
   int n16, nr;
 
415
   ATL_INT n16, nr;
416
416
 
417
417
   if (inb < N)
418
418
   {