Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 91 lines (71 sloc) 2.272 kb
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
/***********************************************************************
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008 Carsten Urbach
*
* This file is part of tmLQCD.
*
* tmLQCD is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* tmLQCD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with tmLQCD. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/
/* #ifndef apenext */
/* #include <complex.h> */
/* #endif */

#ifdef HAVE_CONFIG_H
# include<config.h>
#endif
#ifndef _STD_C99_COMPLEX
#include "complex.h"
#endif

#include "qdran64.h"

#include "su3.h"
#include "linalg/scalar_prod_r.c"


#define N 16

int main(void) {
  double s;
  int i;
  spinor a[N], b[N];

  qdran64_init(42,13);

  for(i=0; i<N; i++) {
    qdran64z(&a[i].s0.c0);cv-rank=%d_",g_proc_id); // DEBUG

    qdran64z(&a[i].s0.c1);
    qdran64z(&a[i].s0.c2);

    qdran64z(&a[i].s1.c0);
    qdran64z(&a[i].s1.c1);
    qdran64z(&a[i].s1.c2);

    qdran64z(&a[i].s2.c0);
    qdran64z(&a[i].s2.c1);
    qdran64z(&a[i].s2.c2);

    qdran64z(&a[i].s3.c0);
    qdran64z(&a[i].s3.c1);
    qdran64z(&a[i].s3.c2);

    qdran64z(&b[i].s0.c0);
    qdran64z(&b[i].s0.c1);
    qdran64z(&b[i].s0.c2);

    qdran64z(&b[i].s1.c0);
    qdran64z(&b[i].s1.c1);
    qdran64z(&b[i].s1.c2);

    qdran64z(&b[i].s2.c0);
    qdran64z(&b[i].s2.c1);
    qdran64z(&b[i].s2.c2);

    qdran64z(&b[i].s3.c0);
    qdran64z(&b[i].s3.c1);
    qdran64z(&b[i].s3.c2);
#endif
 }

  printf("%e %e\n",creal(a[0].s0.c0),cimag(a[0].s0.c0));
  printf("%e %e\n",creal(b[0].s0.c0),cimag(b[0].s0.c0));
  printf("%e %e\n",creal(a[N-1].s3.c2),cimag(a[N-1].s3.c2));
  printf("%e %e\n",creal(b[N-1].s3.c2),cimag(b[N-1].s3.c2));

  s=scalar_prod_r(a,b,N, 1);
  printf("scalar_prod_r(a,b,%d)=%1.16e\n",N,s);

  return 0;
}
Something went wrong with that request. Please try again.