Coverage Report

Created: 2018-04-10 18:23

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/polly/include/polly/Support/ISLOperators.h
Line
Count
Source (jump to first uncovered line)
1
//===------ IslOperators.h --------------------------------------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// Operator overloads for isl C++ objects.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "isl/isl-noexceptions.h"
15
namespace polly {
16
17
inline isl::pw_aff operator+(isl::pw_aff A, isl::pw_aff B) { return A.add(B); }
18
19
inline isl::pw_aff operator+(isl::val V, isl::pw_aff A) {
20
  isl::pw_aff AV(A.domain(), V);
21
  return A.add(AV);
22
}
23
24
inline isl::pw_aff operator+(isl::pw_aff A, isl::val V) { return V + A; }
25
26
inline isl::pw_aff operator+(int i, isl::pw_aff A) {
27
  isl::ctx ctx = A.get_ctx();
28
  return A + isl::val(ctx, i);
29
}
30
31
inline isl::pw_aff operator+(isl::pw_aff A, int i) { return i + A; }
32
33
inline isl::pw_aff operator*(isl::pw_aff A, isl::pw_aff B) { return A.mul(B); }
34
35
inline isl::pw_aff operator*(isl::val V, isl::pw_aff A) {
36
  isl::pw_aff AV(A.domain(), V);
37
  return A.add(AV);
38
}
39
40
inline isl::pw_aff operator*(isl::pw_aff A, isl::val V) { return V * A; }
41
42
inline isl::pw_aff operator*(int i, isl::pw_aff A) {
43
  isl::ctx ctx = A.get_ctx();
44
  return A * isl::val(ctx, i);
45
}
46
47
inline isl::pw_aff operator*(isl::pw_aff A, int i) { return i * A; }
48
49
inline isl::pw_aff operator-(isl::pw_aff A, isl::pw_aff B) { return A.sub(B); }
50
51
inline isl::pw_aff operator-(isl::val V, isl::pw_aff A) {
52
  isl::pw_aff AV(A.domain(), V);
53
  return AV - A;
54
}
55
56
inline isl::pw_aff operator-(isl::pw_aff A, isl::val V) {
57
  isl::pw_aff AV(A.domain(), V);
58
  return A - AV;
59
}
60
61
inline isl::pw_aff operator-(int i, isl::pw_aff A) {
62
  isl::ctx ctx = A.get_ctx();
63
  return isl::val(ctx, i) - A;
64
}
65
66
inline isl::pw_aff operator-(isl::pw_aff A, int i) {
67
  isl::ctx ctx = A.get_ctx();
68
  return A - isl::val(ctx, i);
69
}
70
71
inline isl::pw_aff operator/(isl::pw_aff A, isl::pw_aff B) {
72
  return A.tdiv_q(B);
73
}
74
75
0
inline isl::pw_aff operator/(isl::val V, isl::pw_aff A) {
76
0
  isl::pw_aff AV(A.domain(), V);
77
0
  return AV / A;
78
0
}
79
80
inline isl::pw_aff operator/(isl::pw_aff A, isl::val V) {
81
  isl::pw_aff AV(A.domain(), V);
82
  return A / AV;
83
}
84
85
0
inline isl::pw_aff operator/(int i, isl::pw_aff A) {
86
0
  isl::ctx ctx = A.get_ctx();
87
0
  return isl::val(ctx, i) / A;
88
0
}
89
90
inline isl::pw_aff operator/(isl::pw_aff A, int i) {
91
  isl::ctx ctx = A.get_ctx();
92
  return A / isl::val(ctx, i);
93
}
94
95
inline isl::pw_aff operator%(isl::pw_aff A, isl::pw_aff B) {
96
  return A.tdiv_r(B);
97
}
98
99
inline isl::pw_aff operator%(isl::val V, isl::pw_aff A) {
100
  isl::pw_aff AV(A.domain(), V);
101
  return AV % A;
102
}
103
104
inline isl::pw_aff operator%(isl::pw_aff A, isl::val V) {
105
  isl::pw_aff AV(A.domain(), V);
106
  return A % AV;
107
}
108
109
inline isl::pw_aff operator%(int i, isl::pw_aff A) {
110
  isl::ctx ctx = A.get_ctx();
111
  return isl::val(ctx, i) % A;
112
}
113
114
inline isl::pw_aff operator%(isl::pw_aff A, int i) {
115
  isl::ctx ctx = A.get_ctx();
116
  return A % isl::val(ctx, i);
117
}
118
} // namespace polly