File: loop1-bug.cpp

package info (click to toggle)
blitz%2B%2B 1%3A0.9-10
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 12,684 kB
  • ctags: 12,926
  • sloc: cpp: 97,336; sh: 8,422; fortran: 1,208; makefile: 688; f90: 596
file content (22 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// In KAI C++ 3.2, restrict causes problems for copy propagation.
// Temporary fix: disable restrict

#define BZ_DISABLE_RESTRICT

#include <blitz/vector.h>

BZ_USING_NAMESPACE(blitz)

template<class T> void sink(T&) { }

void foo(int N)
{
    Vector<double> x(N);
    Vector<double> y(N);

    x=sqrt(y);

    sink(x);
    sink(y);
}