dlartv.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /* dlartv.f -- translated by f2c (version 20061008).
  2. You must link the resulting object file with libf2c:
  3. on Microsoft Windows system, link with libf2c.lib;
  4. on Linux or Unix systems, link with .../path/to/libf2c.a -lm
  5. or, if you install libf2c.a in a standard place, with -lf2c -lm
  6. -- in that order, at the end of the command line, as in
  7. cc *.o -lf2c -lm
  8. Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
  9. http://www.netlib.org/f2c/libf2c.zip
  10. */
  11. #include "f2c.h"
  12. #include "blaswrap.h"
  13. /* Subroutine */ int _starpu_dlartv_(integer *n, doublereal *x, integer *incx,
  14. doublereal *y, integer *incy, doublereal *c__, doublereal *s, integer
  15. *incc)
  16. {
  17. /* System generated locals */
  18. integer i__1;
  19. /* Local variables */
  20. integer i__, ic, ix, iy;
  21. doublereal xi, yi;
  22. /* -- LAPACK auxiliary routine (version 3.2) -- */
  23. /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
  24. /* November 2006 */
  25. /* .. Scalar Arguments .. */
  26. /* .. */
  27. /* .. Array Arguments .. */
  28. /* .. */
  29. /* Purpose */
  30. /* ======= */
  31. /* DLARTV applies a vector of real plane rotations to elements of the */
  32. /* real vectors x and y. For i = 1,2,...,n */
  33. /* ( x(i) ) := ( c(i) s(i) ) ( x(i) ) */
  34. /* ( y(i) ) ( -s(i) c(i) ) ( y(i) ) */
  35. /* Arguments */
  36. /* ========= */
  37. /* N (input) INTEGER */
  38. /* The number of plane rotations to be applied. */
  39. /* X (input/output) DOUBLE PRECISION array, */
  40. /* dimension (1+(N-1)*INCX) */
  41. /* The vector x. */
  42. /* INCX (input) INTEGER */
  43. /* The increment between elements of X. INCX > 0. */
  44. /* Y (input/output) DOUBLE PRECISION array, */
  45. /* dimension (1+(N-1)*INCY) */
  46. /* The vector y. */
  47. /* INCY (input) INTEGER */
  48. /* The increment between elements of Y. INCY > 0. */
  49. /* C (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC) */
  50. /* The cosines of the plane rotations. */
  51. /* S (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC) */
  52. /* The sines of the plane rotations. */
  53. /* INCC (input) INTEGER */
  54. /* The increment between elements of C and S. INCC > 0. */
  55. /* ===================================================================== */
  56. /* .. Local Scalars .. */
  57. /* .. */
  58. /* .. Executable Statements .. */
  59. /* Parameter adjustments */
  60. --s;
  61. --c__;
  62. --y;
  63. --x;
  64. /* Function Body */
  65. ix = 1;
  66. iy = 1;
  67. ic = 1;
  68. i__1 = *n;
  69. for (i__ = 1; i__ <= i__1; ++i__) {
  70. xi = x[ix];
  71. yi = y[iy];
  72. x[ix] = c__[ic] * xi + s[ic] * yi;
  73. y[iy] = c__[ic] * yi - s[ic] * xi;
  74. ix += *incx;
  75. iy += *incy;
  76. ic += *incc;
  77. /* L10: */
  78. }
  79. return 0;
  80. /* End of DLARTV */
  81. } /* _starpu_dlartv_ */