~ubuntu-branches/ubuntu/trusty/rheolef/trusty

« back to all changes in this revision

Viewing changes to skit/plib2/vec_expr_ops.h

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito
  • Date: 2012-04-06 09:12:21 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120406091221-m58me99p1nxqui49
Tags: 6.0-1
* New upstream release 6.0 (major changes):
  - massively distributed and parallel support
  - full FEM characteristic method (Lagrange-Gakerkin method) support
  - enhanced users documentation 
  - source code supports g++-4.7 (closes: #667356)
* debian/control: dependencies for MPI distributed solvers added
* debian/rules: build commands simplified
* debian/librheolef-dev.install: man1/* to man9/* added
* debian/changelog: package description rewritted (closes: #661689)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
//
34
34
// date: 20 march 2011
35
35
//
 
36
#include "rheolef/promote.h"
36
37
#include "rheolef/vec_expr.h"
37
 
#include "rheolef/promote.h"
38
38
namespace rheolef {
39
39
template<class T, class M>
40
 
typename boost::proto::detail::enable_unary<
41
 
  vec_domain,
42
 
  is_vec<vec<T,M> >,
43
 
  vec<T,M>,
44
 
  typename boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
45
 
   ::impl<const vec<T,M>&>::result_type
46
 
  >::type const
47
 
operator+ (const vec<T,M>& arg)
48
 
{
49
 
  return boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
50
 
   ::impl<const vec<T,M>&>()(arg);
51
 
}
52
 
template<class Expr>
53
 
typename boost::proto::detail::enable_unary<
54
 
  vec_domain,
55
 
  is_vec<vec_expr<Expr> >,
56
 
  vec_expr<Expr>,
57
 
  typename boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
58
 
   ::impl<const vec_expr<Expr>&>::result_type
59
 
  >::type const
60
 
operator+ (const vec_expr<Expr>& arg)
61
 
{
62
 
  return boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
63
 
   ::impl<const vec_expr<Expr>&>()(arg);
64
 
}
65
 
template<class T, class M>
66
 
typename boost::proto::detail::enable_unary<
67
 
  vec_domain,
68
 
  is_vec<vec<T,M> >,
69
 
  vec<T,M>,
70
 
  typename boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
71
 
   ::impl<const vec<T,M>&>::result_type
72
 
  >::type const
73
 
operator- (const vec<T,M>& arg)
74
 
{
75
 
  return boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
76
 
   ::impl<const vec<T,M>&>()(arg);
77
 
}
78
 
template<class Expr>
79
 
typename boost::proto::detail::enable_unary<
80
 
  vec_domain,
81
 
  is_vec<vec_expr<Expr> >,
82
 
  vec_expr<Expr>,
83
 
  typename boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
84
 
   ::impl<const vec_expr<Expr>&>::result_type
85
 
  >::type const
86
 
operator- (const vec_expr<Expr>& arg)
87
 
{
88
 
  return boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
89
 
   ::impl<const vec_expr<Expr>&>()(arg);
90
 
}
91
 
template<class T, class M>
 
40
#if BOOST_VERSION < 104601
 
41
typename boost::proto::detail::enable_unary<
 
42
  vec_domain,
 
43
  is_vec<vec<T,M> >,
 
44
  vec<T,M>,
 
45
  typename boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
 
46
   ::impl<const vec<T,M>&>::result_type
 
47
  >::type const
 
48
operator+ (const vec<T,M>& arg)
 
49
{
 
50
  return boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
 
51
   ::impl<const vec<T,M>&>()(arg);
 
52
}
 
53
#else // BOOST_VERSION >= 104601
 
54
typename boost::proto::detail::enable_unary<
 
55
  vec_domain,
 
56
  vec_domain::proto_grammar,
 
57
  boost::mpl::and_<
 
58
    is_vec<vec<T,M> >,
 
59
    boost::mpl::not_<boost::proto::is_extension<vec<T,M> > >
 
60
  >,
 
61
  boost::proto::tag::unary_plus,
 
62
  vec<T,M> const &
 
63
>::type const
 
64
operator+ (const vec<T,M>& arg)
 
65
{
 
66
  return boost::proto::detail::make_expr_<boost::proto::tag::unary_plus, vec_domain, vec<T,M> const &>()(arg);
 
67
}
 
68
#endif // BOOST_VERSION
 
69
template<class Expr>
 
70
#if BOOST_VERSION < 104601
 
71
typename boost::proto::detail::enable_unary<
 
72
  vec_domain,
 
73
  is_vec<vec_expr<Expr> >,
 
74
  vec_expr<Expr>,
 
75
  typename boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
 
76
   ::impl<const vec_expr<Expr>&>::result_type
 
77
  >::type const
 
78
operator+ (const vec_expr<Expr>& arg)
 
79
{
 
80
  return boost::proto::functional::make_expr<boost::proto::tag::unary_plus, vec_domain>
 
81
   ::impl<const vec_expr<Expr>&>()(arg);
 
82
}
 
83
#else // BOOST_VERSION >= 104601
 
84
typename boost::proto::detail::enable_unary<
 
85
  vec_domain,
 
86
  vec_domain::proto_grammar,
 
87
  boost::mpl::and_<
 
88
    is_vec<vec_expr<Expr> >,
 
89
    boost::mpl::not_<boost::proto::is_extension<vec_expr<Expr> > >
 
90
  >,
 
91
  boost::proto::tag::unary_plus,
 
92
  vec_expr<Expr> const &
 
93
>::type const
 
94
operator+ (const vec_expr<Expr>& arg)
 
95
{
 
96
  return boost::proto::detail::make_expr_<boost::proto::tag::unary_plus, vec_domain, vec_expr<Expr> const &>()(arg);
 
97
}
 
98
#endif // BOOST_VERSION
 
99
template<class T, class M>
 
100
#if BOOST_VERSION < 104601
 
101
typename boost::proto::detail::enable_unary<
 
102
  vec_domain,
 
103
  is_vec<vec<T,M> >,
 
104
  vec<T,M>,
 
105
  typename boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
 
106
   ::impl<const vec<T,M>&>::result_type
 
107
  >::type const
 
108
operator- (const vec<T,M>& arg)
 
109
{
 
110
  return boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
 
111
   ::impl<const vec<T,M>&>()(arg);
 
112
}
 
113
#else // BOOST_VERSION >= 104601
 
114
typename boost::proto::detail::enable_unary<
 
115
  vec_domain,
 
116
  vec_domain::proto_grammar,
 
117
  boost::mpl::and_<
 
118
    is_vec<vec<T,M> >,
 
119
    boost::mpl::not_<boost::proto::is_extension<vec<T,M> > >
 
120
  >,
 
121
  boost::proto::tag::negate,
 
122
  vec<T,M> const &
 
123
>::type const
 
124
operator- (const vec<T,M>& arg)
 
125
{
 
126
  return boost::proto::detail::make_expr_<boost::proto::tag::negate, vec_domain, vec<T,M> const &>()(arg);
 
127
}
 
128
#endif // BOOST_VERSION
 
129
template<class Expr>
 
130
#if BOOST_VERSION < 104601
 
131
typename boost::proto::detail::enable_unary<
 
132
  vec_domain,
 
133
  is_vec<vec_expr<Expr> >,
 
134
  vec_expr<Expr>,
 
135
  typename boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
 
136
   ::impl<const vec_expr<Expr>&>::result_type
 
137
  >::type const
 
138
operator- (const vec_expr<Expr>& arg)
 
139
{
 
140
  return boost::proto::functional::make_expr<boost::proto::tag::negate, vec_domain>
 
141
   ::impl<const vec_expr<Expr>&>()(arg);
 
142
}
 
143
#else // BOOST_VERSION >= 104601
 
144
typename boost::proto::detail::enable_unary<
 
145
  vec_domain,
 
146
  vec_domain::proto_grammar,
 
147
  boost::mpl::and_<
 
148
    is_vec<vec_expr<Expr> >,
 
149
    boost::mpl::not_<boost::proto::is_extension<vec_expr<Expr> > >
 
150
  >,
 
151
  boost::proto::tag::negate,
 
152
  vec_expr<Expr> const &
 
153
>::type const
 
154
operator- (const vec_expr<Expr>& arg)
 
155
{
 
156
  return boost::proto::detail::make_expr_<boost::proto::tag::negate, vec_domain, vec_expr<Expr> const &>()(arg);
 
157
}
 
158
#endif // BOOST_VERSION
 
159
template<class T, class M>
 
160
#if BOOST_VERSION < 104601
92
161
typename
93
162
boost::proto::detail::enable_binary<
94
163
  vec_domain,
102
171
operator+ (const int& l, const vec<T,M>& r)
103
172
{
104
173
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
105
 
    ::impl<const int&,   const vec<T,M>&>() (l, r);
106
 
}
 
174
    ::impl<const int&, const vec<T,M>&>() (l, r);
 
175
}
 
176
#else // BOOST_VERSION >= 104601
 
177
typename boost::proto::detail::enable_binary< 
 
178
  vec_domain,
 
179
  vec_domain::proto_grammar,
 
180
  boost::mpl::and_<
 
181
    boost::mpl::or_<is_vec<int >, is_vec<vec<T,M> > >,
 
182
    boost::mpl::not_<
 
183
      boost::mpl::or_<
 
184
        boost::proto::is_extension<int >,
 
185
        boost::proto::is_extension<vec<T,M> >
 
186
      >
 
187
    >
 
188
  >,
 
189
  boost::proto::tag::plus,
 
190
  int const &,
 
191
  vec<T,M> const &
 
192
>::type /* const */
 
193
operator+ (int const &left, vec<T,M> const &right)
 
194
{
 
195
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, int const &, vec<T,M> const &>()(left, right);
 
196
}
 
197
#endif // BOOST_VERSION
107
198
template<class T, class M>
 
199
#if BOOST_VERSION < 104601
108
200
typename
109
201
boost::proto::detail::enable_binary<
110
202
  vec_domain,
118
210
operator+ (const T& l, const vec<T,M>& r)
119
211
{
120
212
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
121
 
    ::impl<const T&,   const vec<T,M>&>() (l, r);
122
 
}
 
213
    ::impl<const T&, const vec<T,M>&>() (l, r);
 
214
}
 
215
#else // BOOST_VERSION >= 104601
 
216
typename boost::proto::detail::enable_binary< 
 
217
  vec_domain,
 
218
  vec_domain::proto_grammar,
 
219
  boost::mpl::and_<
 
220
    boost::mpl::or_<is_vec<T >, is_vec<vec<T,M> > >,
 
221
    boost::mpl::not_<
 
222
      boost::mpl::or_<
 
223
        boost::proto::is_extension<T >,
 
224
        boost::proto::is_extension<vec<T,M> >
 
225
      >
 
226
    >
 
227
  >,
 
228
  boost::proto::tag::plus,
 
229
  T const &,
 
230
  vec<T,M> const &
 
231
>::type /* const */
 
232
operator+ (T const &left, vec<T,M> const &right)
 
233
{
 
234
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, T const &, vec<T,M> const &>()(left, right);
 
235
}
 
236
#endif // BOOST_VERSION
123
237
template<class T, class M>
 
238
#if BOOST_VERSION < 104601
124
239
typename
125
240
boost::proto::detail::enable_binary<
126
241
  vec_domain,
134
249
operator+ (const vec<T,M>& l, const int& r)
135
250
{
136
251
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
137
 
    ::impl<const vec<T,M>&,   const int&>() (l, r);
138
 
}
 
252
    ::impl<const vec<T,M>&, const int&>() (l, r);
 
253
}
 
254
#else // BOOST_VERSION >= 104601
 
255
typename boost::proto::detail::enable_binary< 
 
256
  vec_domain,
 
257
  vec_domain::proto_grammar,
 
258
  boost::mpl::and_<
 
259
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<int > >,
 
260
    boost::mpl::not_<
 
261
      boost::mpl::or_<
 
262
        boost::proto::is_extension<vec<T,M> >,
 
263
        boost::proto::is_extension<int >
 
264
      >
 
265
    >
 
266
  >,
 
267
  boost::proto::tag::plus,
 
268
  vec<T,M> const &,
 
269
  int const &
 
270
>::type /* const */
 
271
operator+ (vec<T,M> const &left, int const &right)
 
272
{
 
273
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec<T,M> const &, int const &>()(left, right);
 
274
}
 
275
#endif // BOOST_VERSION
139
276
template<class T, class M>
 
277
#if BOOST_VERSION < 104601
140
278
typename
141
279
boost::proto::detail::enable_binary<
142
280
  vec_domain,
150
288
operator+ (const vec<T,M>& l, const T& r)
151
289
{
152
290
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
153
 
    ::impl<const vec<T,M>&,   const T&>() (l, r);
154
 
}
 
291
    ::impl<const vec<T,M>&, const T&>() (l, r);
 
292
}
 
293
#else // BOOST_VERSION >= 104601
 
294
typename boost::proto::detail::enable_binary< 
 
295
  vec_domain,
 
296
  vec_domain::proto_grammar,
 
297
  boost::mpl::and_<
 
298
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<T > >,
 
299
    boost::mpl::not_<
 
300
      boost::mpl::or_<
 
301
        boost::proto::is_extension<vec<T,M> >,
 
302
        boost::proto::is_extension<T >
 
303
      >
 
304
    >
 
305
  >,
 
306
  boost::proto::tag::plus,
 
307
  vec<T,M> const &,
 
308
  T const &
 
309
>::type /* const */
 
310
operator+ (vec<T,M> const &left, T const &right)
 
311
{
 
312
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec<T,M> const &, T const &>()(left, right);
 
313
}
 
314
#endif // BOOST_VERSION
155
315
template<class T1, class T2, class M>
 
316
#if BOOST_VERSION < 104601
156
317
typename
157
318
boost::proto::detail::enable_binary<
158
319
  vec_domain,
166
327
operator+ (const vec<T1,M>& l, const vec<T2,M>& r)
167
328
{
168
329
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
169
 
    ::impl<const vec<T1,M>&,   const vec<T2,M>&>() (l, r);
170
 
}
 
330
    ::impl<const vec<T1,M>&, const vec<T2,M>&>() (l, r);
 
331
}
 
332
#else // BOOST_VERSION >= 104601
 
333
typename boost::proto::detail::enable_binary< 
 
334
  vec_domain,
 
335
  vec_domain::proto_grammar,
 
336
  boost::mpl::and_<
 
337
    boost::mpl::or_<is_vec<vec<T1,M> >, is_vec<vec<T2,M> > >,
 
338
    boost::mpl::not_<
 
339
      boost::mpl::or_<
 
340
        boost::proto::is_extension<vec<T1,M> >,
 
341
        boost::proto::is_extension<vec<T2,M> >
 
342
      >
 
343
    >
 
344
  >,
 
345
  boost::proto::tag::plus,
 
346
  vec<T1,M> const &,
 
347
  vec<T2,M> const &
 
348
>::type /* const */
 
349
operator+ (vec<T1,M> const &left, vec<T2,M> const &right)
 
350
{
 
351
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec<T1,M> const &, vec<T2,M> const &>()(left, right);
 
352
}
 
353
#endif // BOOST_VERSION
171
354
template<class Expr>
 
355
#if BOOST_VERSION < 104601
172
356
typename
173
357
boost::proto::detail::enable_binary<
174
358
  vec_domain,
182
366
operator+ (const int& l, const vec_expr<Expr>& r)
183
367
{
184
368
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
185
 
    ::impl<const int&,   const vec_expr<Expr>&>() (l, r);
186
 
}
 
369
    ::impl<const int&, const vec_expr<Expr>&>() (l, r);
 
370
}
 
371
#else // BOOST_VERSION >= 104601
 
372
typename boost::proto::detail::enable_binary< 
 
373
  vec_domain,
 
374
  vec_domain::proto_grammar,
 
375
  boost::mpl::and_<
 
376
    boost::mpl::or_<is_vec<int >, is_vec<vec_expr<Expr> > >,
 
377
    boost::mpl::not_<
 
378
      boost::mpl::or_<
 
379
        boost::proto::is_extension<int >,
 
380
        boost::proto::is_extension<vec_expr<Expr> >
 
381
      >
 
382
    >
 
383
  >,
 
384
  boost::proto::tag::plus,
 
385
  int const &,
 
386
  vec_expr<Expr> const &
 
387
>::type /* const */
 
388
operator+ (int const &left, vec_expr<Expr> const &right)
 
389
{
 
390
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, int const &, vec_expr<Expr> const &>()(left, right);
 
391
}
 
392
#endif // BOOST_VERSION
187
393
template<class Expr>
 
394
#if BOOST_VERSION < 104601
188
395
typename
189
396
boost::proto::detail::enable_binary<
190
397
  vec_domain,
198
405
operator+ (const vec_expr<Expr>& l, const int& r)
199
406
{
200
407
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
201
 
    ::impl<const vec_expr<Expr>&,   const int&>() (l, r);
202
 
}
 
408
    ::impl<const vec_expr<Expr>&, const int&>() (l, r);
 
409
}
 
410
#else // BOOST_VERSION >= 104601
 
411
typename boost::proto::detail::enable_binary< 
 
412
  vec_domain,
 
413
  vec_domain::proto_grammar,
 
414
  boost::mpl::and_<
 
415
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<int > >,
 
416
    boost::mpl::not_<
 
417
      boost::mpl::or_<
 
418
        boost::proto::is_extension<vec_expr<Expr> >,
 
419
        boost::proto::is_extension<int >
 
420
      >
 
421
    >
 
422
  >,
 
423
  boost::proto::tag::plus,
 
424
  vec_expr<Expr> const &,
 
425
  int const &
 
426
>::type /* const */
 
427
operator+ (vec_expr<Expr> const &left, int const &right)
 
428
{
 
429
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec_expr<Expr> const &, int const &>()(left, right);
 
430
}
 
431
#endif // BOOST_VERSION
203
432
template<class T, class Expr>
 
433
#if BOOST_VERSION < 104601
204
434
typename
205
435
boost::proto::detail::enable_binary<
206
436
  vec_domain,
214
444
operator+ (const T& l, const vec_expr<Expr>& r)
215
445
{
216
446
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
217
 
    ::impl<const T&,   const vec_expr<Expr>&>() (l, r);
218
 
}
 
447
    ::impl<const T&, const vec_expr<Expr>&>() (l, r);
 
448
}
 
449
#else // BOOST_VERSION >= 104601
 
450
typename boost::proto::detail::enable_binary< 
 
451
  vec_domain,
 
452
  vec_domain::proto_grammar,
 
453
  boost::mpl::and_<
 
454
    boost::mpl::or_<is_vec<T >, is_vec<vec_expr<Expr> > >,
 
455
    boost::mpl::not_<
 
456
      boost::mpl::or_<
 
457
        boost::proto::is_extension<T >,
 
458
        boost::proto::is_extension<vec_expr<Expr> >
 
459
      >
 
460
    >
 
461
  >,
 
462
  boost::proto::tag::plus,
 
463
  T const &,
 
464
  vec_expr<Expr> const &
 
465
>::type /* const */
 
466
operator+ (T const &left, vec_expr<Expr> const &right)
 
467
{
 
468
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, T const &, vec_expr<Expr> const &>()(left, right);
 
469
}
 
470
#endif // BOOST_VERSION
219
471
template<class T, class Expr>
 
472
#if BOOST_VERSION < 104601
220
473
typename
221
474
boost::proto::detail::enable_binary<
222
475
  vec_domain,
230
483
operator+ (const vec_expr<Expr>& l, const T& r)
231
484
{
232
485
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
233
 
    ::impl<const vec_expr<Expr>&,   const T&>() (l, r);
234
 
}
 
486
    ::impl<const vec_expr<Expr>&, const T&>() (l, r);
 
487
}
 
488
#else // BOOST_VERSION >= 104601
 
489
typename boost::proto::detail::enable_binary< 
 
490
  vec_domain,
 
491
  vec_domain::proto_grammar,
 
492
  boost::mpl::and_<
 
493
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<T > >,
 
494
    boost::mpl::not_<
 
495
      boost::mpl::or_<
 
496
        boost::proto::is_extension<vec_expr<Expr> >,
 
497
        boost::proto::is_extension<T >
 
498
      >
 
499
    >
 
500
  >,
 
501
  boost::proto::tag::plus,
 
502
  vec_expr<Expr> const &,
 
503
  T const &
 
504
>::type /* const */
 
505
operator+ (vec_expr<Expr> const &left, T const &right)
 
506
{
 
507
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec_expr<Expr> const &, T const &>()(left, right);
 
508
}
 
509
#endif // BOOST_VERSION
235
510
template<class T, class M, class Expr>
 
511
#if BOOST_VERSION < 104601
236
512
typename
237
513
boost::proto::detail::enable_binary<
238
514
  vec_domain,
246
522
operator+ (const vec<T,M>& l, const vec_expr<Expr>& r)
247
523
{
248
524
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
249
 
    ::impl<const vec<T,M>&,   const vec_expr<Expr>&>() (l, r);
250
 
}
 
525
    ::impl<const vec<T,M>&, const vec_expr<Expr>&>() (l, r);
 
526
}
 
527
#else // BOOST_VERSION >= 104601
 
528
typename boost::proto::detail::enable_binary< 
 
529
  vec_domain,
 
530
  vec_domain::proto_grammar,
 
531
  boost::mpl::and_<
 
532
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<vec_expr<Expr> > >,
 
533
    boost::mpl::not_<
 
534
      boost::mpl::or_<
 
535
        boost::proto::is_extension<vec<T,M> >,
 
536
        boost::proto::is_extension<vec_expr<Expr> >
 
537
      >
 
538
    >
 
539
  >,
 
540
  boost::proto::tag::plus,
 
541
  vec<T,M> const &,
 
542
  vec_expr<Expr> const &
 
543
>::type /* const */
 
544
operator+ (vec<T,M> const &left, vec_expr<Expr> const &right)
 
545
{
 
546
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec<T,M> const &, vec_expr<Expr> const &>()(left, right);
 
547
}
 
548
#endif // BOOST_VERSION
251
549
template<class T, class M, class Expr>
 
550
#if BOOST_VERSION < 104601
252
551
typename
253
552
boost::proto::detail::enable_binary<
254
553
  vec_domain,
262
561
operator+ (const vec_expr<Expr>& l, const vec<T,M>& r)
263
562
{
264
563
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
265
 
    ::impl<const vec_expr<Expr>&,   const vec<T,M>&>() (l, r);
266
 
}
 
564
    ::impl<const vec_expr<Expr>&, const vec<T,M>&>() (l, r);
 
565
}
 
566
#else // BOOST_VERSION >= 104601
 
567
typename boost::proto::detail::enable_binary< 
 
568
  vec_domain,
 
569
  vec_domain::proto_grammar,
 
570
  boost::mpl::and_<
 
571
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<vec<T,M> > >,
 
572
    boost::mpl::not_<
 
573
      boost::mpl::or_<
 
574
        boost::proto::is_extension<vec_expr<Expr> >,
 
575
        boost::proto::is_extension<vec<T,M> >
 
576
      >
 
577
    >
 
578
  >,
 
579
  boost::proto::tag::plus,
 
580
  vec_expr<Expr> const &,
 
581
  vec<T,M> const &
 
582
>::type /* const */
 
583
operator+ (vec_expr<Expr> const &left, vec<T,M> const &right)
 
584
{
 
585
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec_expr<Expr> const &, vec<T,M> const &>()(left, right);
 
586
}
 
587
#endif // BOOST_VERSION
267
588
template<class Expr1, class Expr2>
 
589
#if BOOST_VERSION < 104601
268
590
typename
269
591
boost::proto::detail::enable_binary<
270
592
  vec_domain,
278
600
operator+ (const vec_expr<Expr1>& l, const vec_expr<Expr2>& r)
279
601
{
280
602
  return boost::proto::functional::make_expr<boost::proto::tag::plus, vec_domain>
281
 
    ::impl<const vec_expr<Expr1>&,   const vec_expr<Expr2>&>() (l, r);
282
 
}
 
603
    ::impl<const vec_expr<Expr1>&, const vec_expr<Expr2>&>() (l, r);
 
604
}
 
605
#else // BOOST_VERSION >= 104601
 
606
typename boost::proto::detail::enable_binary< 
 
607
  vec_domain,
 
608
  vec_domain::proto_grammar,
 
609
  boost::mpl::and_<
 
610
    boost::mpl::or_<is_vec<vec_expr<Expr1> >, is_vec<vec_expr<Expr2> > >,
 
611
    boost::mpl::not_<
 
612
      boost::mpl::or_<
 
613
        boost::proto::is_extension<vec_expr<Expr1> >,
 
614
        boost::proto::is_extension<vec_expr<Expr2> >
 
615
      >
 
616
    >
 
617
  >,
 
618
  boost::proto::tag::plus,
 
619
  vec_expr<Expr1> const &,
 
620
  vec_expr<Expr2> const &
 
621
>::type /* const */
 
622
operator+ (vec_expr<Expr1> const &left, vec_expr<Expr2> const &right)
 
623
{
 
624
  return boost::proto::detail::make_expr_<boost::proto::tag::plus, vec_domain, vec_expr<Expr1> const &, vec_expr<Expr2> const &>()(left, right);
 
625
}
 
626
#endif // BOOST_VERSION
283
627
template<class T, class M>
 
628
#if BOOST_VERSION < 104601
284
629
typename
285
630
boost::proto::detail::enable_binary<
286
631
  vec_domain,
294
639
operator- (const int& l, const vec<T,M>& r)
295
640
{
296
641
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
297
 
    ::impl<const int&,   const vec<T,M>&>() (l, r);
298
 
}
 
642
    ::impl<const int&, const vec<T,M>&>() (l, r);
 
643
}
 
644
#else // BOOST_VERSION >= 104601
 
645
typename boost::proto::detail::enable_binary< 
 
646
  vec_domain,
 
647
  vec_domain::proto_grammar,
 
648
  boost::mpl::and_<
 
649
    boost::mpl::or_<is_vec<int >, is_vec<vec<T,M> > >,
 
650
    boost::mpl::not_<
 
651
      boost::mpl::or_<
 
652
        boost::proto::is_extension<int >,
 
653
        boost::proto::is_extension<vec<T,M> >
 
654
      >
 
655
    >
 
656
  >,
 
657
  boost::proto::tag::minus,
 
658
  int const &,
 
659
  vec<T,M> const &
 
660
>::type /* const */
 
661
operator- (int const &left, vec<T,M> const &right)
 
662
{
 
663
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, int const &, vec<T,M> const &>()(left, right);
 
664
}
 
665
#endif // BOOST_VERSION
299
666
template<class T, class M>
 
667
#if BOOST_VERSION < 104601
300
668
typename
301
669
boost::proto::detail::enable_binary<
302
670
  vec_domain,
310
678
operator- (const T& l, const vec<T,M>& r)
311
679
{
312
680
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
313
 
    ::impl<const T&,   const vec<T,M>&>() (l, r);
314
 
}
 
681
    ::impl<const T&, const vec<T,M>&>() (l, r);
 
682
}
 
683
#else // BOOST_VERSION >= 104601
 
684
typename boost::proto::detail::enable_binary< 
 
685
  vec_domain,
 
686
  vec_domain::proto_grammar,
 
687
  boost::mpl::and_<
 
688
    boost::mpl::or_<is_vec<T >, is_vec<vec<T,M> > >,
 
689
    boost::mpl::not_<
 
690
      boost::mpl::or_<
 
691
        boost::proto::is_extension<T >,
 
692
        boost::proto::is_extension<vec<T,M> >
 
693
      >
 
694
    >
 
695
  >,
 
696
  boost::proto::tag::minus,
 
697
  T const &,
 
698
  vec<T,M> const &
 
699
>::type /* const */
 
700
operator- (T const &left, vec<T,M> const &right)
 
701
{
 
702
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, T const &, vec<T,M> const &>()(left, right);
 
703
}
 
704
#endif // BOOST_VERSION
315
705
template<class T, class M>
 
706
#if BOOST_VERSION < 104601
316
707
typename
317
708
boost::proto::detail::enable_binary<
318
709
  vec_domain,
326
717
operator- (const vec<T,M>& l, const int& r)
327
718
{
328
719
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
329
 
    ::impl<const vec<T,M>&,   const int&>() (l, r);
330
 
}
 
720
    ::impl<const vec<T,M>&, const int&>() (l, r);
 
721
}
 
722
#else // BOOST_VERSION >= 104601
 
723
typename boost::proto::detail::enable_binary< 
 
724
  vec_domain,
 
725
  vec_domain::proto_grammar,
 
726
  boost::mpl::and_<
 
727
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<int > >,
 
728
    boost::mpl::not_<
 
729
      boost::mpl::or_<
 
730
        boost::proto::is_extension<vec<T,M> >,
 
731
        boost::proto::is_extension<int >
 
732
      >
 
733
    >
 
734
  >,
 
735
  boost::proto::tag::minus,
 
736
  vec<T,M> const &,
 
737
  int const &
 
738
>::type /* const */
 
739
operator- (vec<T,M> const &left, int const &right)
 
740
{
 
741
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec<T,M> const &, int const &>()(left, right);
 
742
}
 
743
#endif // BOOST_VERSION
331
744
template<class T, class M>
 
745
#if BOOST_VERSION < 104601
332
746
typename
333
747
boost::proto::detail::enable_binary<
334
748
  vec_domain,
342
756
operator- (const vec<T,M>& l, const T& r)
343
757
{
344
758
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
345
 
    ::impl<const vec<T,M>&,   const T&>() (l, r);
346
 
}
 
759
    ::impl<const vec<T,M>&, const T&>() (l, r);
 
760
}
 
761
#else // BOOST_VERSION >= 104601
 
762
typename boost::proto::detail::enable_binary< 
 
763
  vec_domain,
 
764
  vec_domain::proto_grammar,
 
765
  boost::mpl::and_<
 
766
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<T > >,
 
767
    boost::mpl::not_<
 
768
      boost::mpl::or_<
 
769
        boost::proto::is_extension<vec<T,M> >,
 
770
        boost::proto::is_extension<T >
 
771
      >
 
772
    >
 
773
  >,
 
774
  boost::proto::tag::minus,
 
775
  vec<T,M> const &,
 
776
  T const &
 
777
>::type /* const */
 
778
operator- (vec<T,M> const &left, T const &right)
 
779
{
 
780
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec<T,M> const &, T const &>()(left, right);
 
781
}
 
782
#endif // BOOST_VERSION
347
783
template<class T1, class T2, class M>
 
784
#if BOOST_VERSION < 104601
348
785
typename
349
786
boost::proto::detail::enable_binary<
350
787
  vec_domain,
358
795
operator- (const vec<T1,M>& l, const vec<T2,M>& r)
359
796
{
360
797
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
361
 
    ::impl<const vec<T1,M>&,   const vec<T2,M>&>() (l, r);
362
 
}
 
798
    ::impl<const vec<T1,M>&, const vec<T2,M>&>() (l, r);
 
799
}
 
800
#else // BOOST_VERSION >= 104601
 
801
typename boost::proto::detail::enable_binary< 
 
802
  vec_domain,
 
803
  vec_domain::proto_grammar,
 
804
  boost::mpl::and_<
 
805
    boost::mpl::or_<is_vec<vec<T1,M> >, is_vec<vec<T2,M> > >,
 
806
    boost::mpl::not_<
 
807
      boost::mpl::or_<
 
808
        boost::proto::is_extension<vec<T1,M> >,
 
809
        boost::proto::is_extension<vec<T2,M> >
 
810
      >
 
811
    >
 
812
  >,
 
813
  boost::proto::tag::minus,
 
814
  vec<T1,M> const &,
 
815
  vec<T2,M> const &
 
816
>::type /* const */
 
817
operator- (vec<T1,M> const &left, vec<T2,M> const &right)
 
818
{
 
819
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec<T1,M> const &, vec<T2,M> const &>()(left, right);
 
820
}
 
821
#endif // BOOST_VERSION
363
822
template<class Expr>
 
823
#if BOOST_VERSION < 104601
364
824
typename
365
825
boost::proto::detail::enable_binary<
366
826
  vec_domain,
374
834
operator- (const int& l, const vec_expr<Expr>& r)
375
835
{
376
836
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
377
 
    ::impl<const int&,   const vec_expr<Expr>&>() (l, r);
378
 
}
 
837
    ::impl<const int&, const vec_expr<Expr>&>() (l, r);
 
838
}
 
839
#else // BOOST_VERSION >= 104601
 
840
typename boost::proto::detail::enable_binary< 
 
841
  vec_domain,
 
842
  vec_domain::proto_grammar,
 
843
  boost::mpl::and_<
 
844
    boost::mpl::or_<is_vec<int >, is_vec<vec_expr<Expr> > >,
 
845
    boost::mpl::not_<
 
846
      boost::mpl::or_<
 
847
        boost::proto::is_extension<int >,
 
848
        boost::proto::is_extension<vec_expr<Expr> >
 
849
      >
 
850
    >
 
851
  >,
 
852
  boost::proto::tag::minus,
 
853
  int const &,
 
854
  vec_expr<Expr> const &
 
855
>::type /* const */
 
856
operator- (int const &left, vec_expr<Expr> const &right)
 
857
{
 
858
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, int const &, vec_expr<Expr> const &>()(left, right);
 
859
}
 
860
#endif // BOOST_VERSION
379
861
template<class Expr>
 
862
#if BOOST_VERSION < 104601
380
863
typename
381
864
boost::proto::detail::enable_binary<
382
865
  vec_domain,
390
873
operator- (const vec_expr<Expr>& l, const int& r)
391
874
{
392
875
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
393
 
    ::impl<const vec_expr<Expr>&,   const int&>() (l, r);
394
 
}
 
876
    ::impl<const vec_expr<Expr>&, const int&>() (l, r);
 
877
}
 
878
#else // BOOST_VERSION >= 104601
 
879
typename boost::proto::detail::enable_binary< 
 
880
  vec_domain,
 
881
  vec_domain::proto_grammar,
 
882
  boost::mpl::and_<
 
883
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<int > >,
 
884
    boost::mpl::not_<
 
885
      boost::mpl::or_<
 
886
        boost::proto::is_extension<vec_expr<Expr> >,
 
887
        boost::proto::is_extension<int >
 
888
      >
 
889
    >
 
890
  >,
 
891
  boost::proto::tag::minus,
 
892
  vec_expr<Expr> const &,
 
893
  int const &
 
894
>::type /* const */
 
895
operator- (vec_expr<Expr> const &left, int const &right)
 
896
{
 
897
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec_expr<Expr> const &, int const &>()(left, right);
 
898
}
 
899
#endif // BOOST_VERSION
395
900
template<class T, class Expr>
 
901
#if BOOST_VERSION < 104601
396
902
typename
397
903
boost::proto::detail::enable_binary<
398
904
  vec_domain,
406
912
operator- (const T& l, const vec_expr<Expr>& r)
407
913
{
408
914
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
409
 
    ::impl<const T&,   const vec_expr<Expr>&>() (l, r);
410
 
}
 
915
    ::impl<const T&, const vec_expr<Expr>&>() (l, r);
 
916
}
 
917
#else // BOOST_VERSION >= 104601
 
918
typename boost::proto::detail::enable_binary< 
 
919
  vec_domain,
 
920
  vec_domain::proto_grammar,
 
921
  boost::mpl::and_<
 
922
    boost::mpl::or_<is_vec<T >, is_vec<vec_expr<Expr> > >,
 
923
    boost::mpl::not_<
 
924
      boost::mpl::or_<
 
925
        boost::proto::is_extension<T >,
 
926
        boost::proto::is_extension<vec_expr<Expr> >
 
927
      >
 
928
    >
 
929
  >,
 
930
  boost::proto::tag::minus,
 
931
  T const &,
 
932
  vec_expr<Expr> const &
 
933
>::type /* const */
 
934
operator- (T const &left, vec_expr<Expr> const &right)
 
935
{
 
936
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, T const &, vec_expr<Expr> const &>()(left, right);
 
937
}
 
938
#endif // BOOST_VERSION
411
939
template<class T, class Expr>
 
940
#if BOOST_VERSION < 104601
412
941
typename
413
942
boost::proto::detail::enable_binary<
414
943
  vec_domain,
422
951
operator- (const vec_expr<Expr>& l, const T& r)
423
952
{
424
953
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
425
 
    ::impl<const vec_expr<Expr>&,   const T&>() (l, r);
426
 
}
 
954
    ::impl<const vec_expr<Expr>&, const T&>() (l, r);
 
955
}
 
956
#else // BOOST_VERSION >= 104601
 
957
typename boost::proto::detail::enable_binary< 
 
958
  vec_domain,
 
959
  vec_domain::proto_grammar,
 
960
  boost::mpl::and_<
 
961
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<T > >,
 
962
    boost::mpl::not_<
 
963
      boost::mpl::or_<
 
964
        boost::proto::is_extension<vec_expr<Expr> >,
 
965
        boost::proto::is_extension<T >
 
966
      >
 
967
    >
 
968
  >,
 
969
  boost::proto::tag::minus,
 
970
  vec_expr<Expr> const &,
 
971
  T const &
 
972
>::type /* const */
 
973
operator- (vec_expr<Expr> const &left, T const &right)
 
974
{
 
975
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec_expr<Expr> const &, T const &>()(left, right);
 
976
}
 
977
#endif // BOOST_VERSION
427
978
template<class T, class M, class Expr>
 
979
#if BOOST_VERSION < 104601
428
980
typename
429
981
boost::proto::detail::enable_binary<
430
982
  vec_domain,
438
990
operator- (const vec<T,M>& l, const vec_expr<Expr>& r)
439
991
{
440
992
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
441
 
    ::impl<const vec<T,M>&,   const vec_expr<Expr>&>() (l, r);
442
 
}
 
993
    ::impl<const vec<T,M>&, const vec_expr<Expr>&>() (l, r);
 
994
}
 
995
#else // BOOST_VERSION >= 104601
 
996
typename boost::proto::detail::enable_binary< 
 
997
  vec_domain,
 
998
  vec_domain::proto_grammar,
 
999
  boost::mpl::and_<
 
1000
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<vec_expr<Expr> > >,
 
1001
    boost::mpl::not_<
 
1002
      boost::mpl::or_<
 
1003
        boost::proto::is_extension<vec<T,M> >,
 
1004
        boost::proto::is_extension<vec_expr<Expr> >
 
1005
      >
 
1006
    >
 
1007
  >,
 
1008
  boost::proto::tag::minus,
 
1009
  vec<T,M> const &,
 
1010
  vec_expr<Expr> const &
 
1011
>::type /* const */
 
1012
operator- (vec<T,M> const &left, vec_expr<Expr> const &right)
 
1013
{
 
1014
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec<T,M> const &, vec_expr<Expr> const &>()(left, right);
 
1015
}
 
1016
#endif // BOOST_VERSION
443
1017
template<class T, class M, class Expr>
 
1018
#if BOOST_VERSION < 104601
444
1019
typename
445
1020
boost::proto::detail::enable_binary<
446
1021
  vec_domain,
454
1029
operator- (const vec_expr<Expr>& l, const vec<T,M>& r)
455
1030
{
456
1031
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
457
 
    ::impl<const vec_expr<Expr>&,   const vec<T,M>&>() (l, r);
458
 
}
 
1032
    ::impl<const vec_expr<Expr>&, const vec<T,M>&>() (l, r);
 
1033
}
 
1034
#else // BOOST_VERSION >= 104601
 
1035
typename boost::proto::detail::enable_binary< 
 
1036
  vec_domain,
 
1037
  vec_domain::proto_grammar,
 
1038
  boost::mpl::and_<
 
1039
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<vec<T,M> > >,
 
1040
    boost::mpl::not_<
 
1041
      boost::mpl::or_<
 
1042
        boost::proto::is_extension<vec_expr<Expr> >,
 
1043
        boost::proto::is_extension<vec<T,M> >
 
1044
      >
 
1045
    >
 
1046
  >,
 
1047
  boost::proto::tag::minus,
 
1048
  vec_expr<Expr> const &,
 
1049
  vec<T,M> const &
 
1050
>::type /* const */
 
1051
operator- (vec_expr<Expr> const &left, vec<T,M> const &right)
 
1052
{
 
1053
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec_expr<Expr> const &, vec<T,M> const &>()(left, right);
 
1054
}
 
1055
#endif // BOOST_VERSION
459
1056
template<class Expr1, class Expr2>
 
1057
#if BOOST_VERSION < 104601
460
1058
typename
461
1059
boost::proto::detail::enable_binary<
462
1060
  vec_domain,
470
1068
operator- (const vec_expr<Expr1>& l, const vec_expr<Expr2>& r)
471
1069
{
472
1070
  return boost::proto::functional::make_expr<boost::proto::tag::minus, vec_domain>
473
 
    ::impl<const vec_expr<Expr1>&,   const vec_expr<Expr2>&>() (l, r);
474
 
}
 
1071
    ::impl<const vec_expr<Expr1>&, const vec_expr<Expr2>&>() (l, r);
 
1072
}
 
1073
#else // BOOST_VERSION >= 104601
 
1074
typename boost::proto::detail::enable_binary< 
 
1075
  vec_domain,
 
1076
  vec_domain::proto_grammar,
 
1077
  boost::mpl::and_<
 
1078
    boost::mpl::or_<is_vec<vec_expr<Expr1> >, is_vec<vec_expr<Expr2> > >,
 
1079
    boost::mpl::not_<
 
1080
      boost::mpl::or_<
 
1081
        boost::proto::is_extension<vec_expr<Expr1> >,
 
1082
        boost::proto::is_extension<vec_expr<Expr2> >
 
1083
      >
 
1084
    >
 
1085
  >,
 
1086
  boost::proto::tag::minus,
 
1087
  vec_expr<Expr1> const &,
 
1088
  vec_expr<Expr2> const &
 
1089
>::type /* const */
 
1090
operator- (vec_expr<Expr1> const &left, vec_expr<Expr2> const &right)
 
1091
{
 
1092
  return boost::proto::detail::make_expr_<boost::proto::tag::minus, vec_domain, vec_expr<Expr1> const &, vec_expr<Expr2> const &>()(left, right);
 
1093
}
 
1094
#endif // BOOST_VERSION
475
1095
template<class T, class M>
 
1096
#if BOOST_VERSION < 104601
476
1097
typename
477
1098
boost::proto::detail::enable_binary<
478
1099
  vec_domain,
486
1107
operator* (const int& l, const vec<T,M>& r)
487
1108
{
488
1109
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
489
 
    ::impl<const int&,   const vec<T,M>&>() (l, r);
490
 
}
 
1110
    ::impl<const int&, const vec<T,M>&>() (l, r);
 
1111
}
 
1112
#else // BOOST_VERSION >= 104601
 
1113
typename boost::proto::detail::enable_binary< 
 
1114
  vec_domain,
 
1115
  vec_domain::proto_grammar,
 
1116
  boost::mpl::and_<
 
1117
    boost::mpl::or_<is_vec<int >, is_vec<vec<T,M> > >,
 
1118
    boost::mpl::not_<
 
1119
      boost::mpl::or_<
 
1120
        boost::proto::is_extension<int >,
 
1121
        boost::proto::is_extension<vec<T,M> >
 
1122
      >
 
1123
    >
 
1124
  >,
 
1125
  boost::proto::tag::multiplies,
 
1126
  int const &,
 
1127
  vec<T,M> const &
 
1128
>::type /* const */
 
1129
operator* (int const &left, vec<T,M> const &right)
 
1130
{
 
1131
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, int const &, vec<T,M> const &>()(left, right);
 
1132
}
 
1133
#endif // BOOST_VERSION
491
1134
template<class T, class M>
 
1135
#if BOOST_VERSION < 104601
492
1136
typename
493
1137
boost::proto::detail::enable_binary<
494
1138
  vec_domain,
502
1146
operator* (const T& l, const vec<T,M>& r)
503
1147
{
504
1148
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
505
 
    ::impl<const T&,   const vec<T,M>&>() (l, r);
506
 
}
 
1149
    ::impl<const T&, const vec<T,M>&>() (l, r);
 
1150
}
 
1151
#else // BOOST_VERSION >= 104601
 
1152
typename boost::proto::detail::enable_binary< 
 
1153
  vec_domain,
 
1154
  vec_domain::proto_grammar,
 
1155
  boost::mpl::and_<
 
1156
    boost::mpl::or_<is_vec<T >, is_vec<vec<T,M> > >,
 
1157
    boost::mpl::not_<
 
1158
      boost::mpl::or_<
 
1159
        boost::proto::is_extension<T >,
 
1160
        boost::proto::is_extension<vec<T,M> >
 
1161
      >
 
1162
    >
 
1163
  >,
 
1164
  boost::proto::tag::multiplies,
 
1165
  T const &,
 
1166
  vec<T,M> const &
 
1167
>::type /* const */
 
1168
operator* (T const &left, vec<T,M> const &right)
 
1169
{
 
1170
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, T const &, vec<T,M> const &>()(left, right);
 
1171
}
 
1172
#endif // BOOST_VERSION
507
1173
template<class T, class M>
 
1174
#if BOOST_VERSION < 104601
508
1175
typename
509
1176
boost::proto::detail::enable_binary<
510
1177
  vec_domain,
518
1185
operator* (const vec<T,M>& l, const int& r)
519
1186
{
520
1187
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
521
 
    ::impl<const vec<T,M>&,   const int&>() (l, r);
522
 
}
 
1188
    ::impl<const vec<T,M>&, const int&>() (l, r);
 
1189
}
 
1190
#else // BOOST_VERSION >= 104601
 
1191
typename boost::proto::detail::enable_binary< 
 
1192
  vec_domain,
 
1193
  vec_domain::proto_grammar,
 
1194
  boost::mpl::and_<
 
1195
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<int > >,
 
1196
    boost::mpl::not_<
 
1197
      boost::mpl::or_<
 
1198
        boost::proto::is_extension<vec<T,M> >,
 
1199
        boost::proto::is_extension<int >
 
1200
      >
 
1201
    >
 
1202
  >,
 
1203
  boost::proto::tag::multiplies,
 
1204
  vec<T,M> const &,
 
1205
  int const &
 
1206
>::type /* const */
 
1207
operator* (vec<T,M> const &left, int const &right)
 
1208
{
 
1209
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec<T,M> const &, int const &>()(left, right);
 
1210
}
 
1211
#endif // BOOST_VERSION
523
1212
template<class T, class M>
 
1213
#if BOOST_VERSION < 104601
524
1214
typename
525
1215
boost::proto::detail::enable_binary<
526
1216
  vec_domain,
534
1224
operator* (const vec<T,M>& l, const T& r)
535
1225
{
536
1226
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
537
 
    ::impl<const vec<T,M>&,   const T&>() (l, r);
538
 
}
 
1227
    ::impl<const vec<T,M>&, const T&>() (l, r);
 
1228
}
 
1229
#else // BOOST_VERSION >= 104601
 
1230
typename boost::proto::detail::enable_binary< 
 
1231
  vec_domain,
 
1232
  vec_domain::proto_grammar,
 
1233
  boost::mpl::and_<
 
1234
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<T > >,
 
1235
    boost::mpl::not_<
 
1236
      boost::mpl::or_<
 
1237
        boost::proto::is_extension<vec<T,M> >,
 
1238
        boost::proto::is_extension<T >
 
1239
      >
 
1240
    >
 
1241
  >,
 
1242
  boost::proto::tag::multiplies,
 
1243
  vec<T,M> const &,
 
1244
  T const &
 
1245
>::type /* const */
 
1246
operator* (vec<T,M> const &left, T const &right)
 
1247
{
 
1248
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec<T,M> const &, T const &>()(left, right);
 
1249
}
 
1250
#endif // BOOST_VERSION
539
1251
template<class T1, class T2, class M>
 
1252
#if BOOST_VERSION < 104601
540
1253
typename
541
1254
boost::proto::detail::enable_binary<
542
1255
  vec_domain,
550
1263
operator* (const vec<T1,M>& l, const vec<T2,M>& r)
551
1264
{
552
1265
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
553
 
    ::impl<const vec<T1,M>&,   const vec<T2,M>&>() (l, r);
554
 
}
 
1266
    ::impl<const vec<T1,M>&, const vec<T2,M>&>() (l, r);
 
1267
}
 
1268
#else // BOOST_VERSION >= 104601
 
1269
typename boost::proto::detail::enable_binary< 
 
1270
  vec_domain,
 
1271
  vec_domain::proto_grammar,
 
1272
  boost::mpl::and_<
 
1273
    boost::mpl::or_<is_vec<vec<T1,M> >, is_vec<vec<T2,M> > >,
 
1274
    boost::mpl::not_<
 
1275
      boost::mpl::or_<
 
1276
        boost::proto::is_extension<vec<T1,M> >,
 
1277
        boost::proto::is_extension<vec<T2,M> >
 
1278
      >
 
1279
    >
 
1280
  >,
 
1281
  boost::proto::tag::multiplies,
 
1282
  vec<T1,M> const &,
 
1283
  vec<T2,M> const &
 
1284
>::type /* const */
 
1285
operator* (vec<T1,M> const &left, vec<T2,M> const &right)
 
1286
{
 
1287
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec<T1,M> const &, vec<T2,M> const &>()(left, right);
 
1288
}
 
1289
#endif // BOOST_VERSION
555
1290
template<class Expr>
 
1291
#if BOOST_VERSION < 104601
556
1292
typename
557
1293
boost::proto::detail::enable_binary<
558
1294
  vec_domain,
566
1302
operator* (const int& l, const vec_expr<Expr>& r)
567
1303
{
568
1304
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
569
 
    ::impl<const int&,   const vec_expr<Expr>&>() (l, r);
570
 
}
 
1305
    ::impl<const int&, const vec_expr<Expr>&>() (l, r);
 
1306
}
 
1307
#else // BOOST_VERSION >= 104601
 
1308
typename boost::proto::detail::enable_binary< 
 
1309
  vec_domain,
 
1310
  vec_domain::proto_grammar,
 
1311
  boost::mpl::and_<
 
1312
    boost::mpl::or_<is_vec<int >, is_vec<vec_expr<Expr> > >,
 
1313
    boost::mpl::not_<
 
1314
      boost::mpl::or_<
 
1315
        boost::proto::is_extension<int >,
 
1316
        boost::proto::is_extension<vec_expr<Expr> >
 
1317
      >
 
1318
    >
 
1319
  >,
 
1320
  boost::proto::tag::multiplies,
 
1321
  int const &,
 
1322
  vec_expr<Expr> const &
 
1323
>::type /* const */
 
1324
operator* (int const &left, vec_expr<Expr> const &right)
 
1325
{
 
1326
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, int const &, vec_expr<Expr> const &>()(left, right);
 
1327
}
 
1328
#endif // BOOST_VERSION
571
1329
template<class Expr>
 
1330
#if BOOST_VERSION < 104601
572
1331
typename
573
1332
boost::proto::detail::enable_binary<
574
1333
  vec_domain,
582
1341
operator* (const vec_expr<Expr>& l, const int& r)
583
1342
{
584
1343
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
585
 
    ::impl<const vec_expr<Expr>&,   const int&>() (l, r);
586
 
}
 
1344
    ::impl<const vec_expr<Expr>&, const int&>() (l, r);
 
1345
}
 
1346
#else // BOOST_VERSION >= 104601
 
1347
typename boost::proto::detail::enable_binary< 
 
1348
  vec_domain,
 
1349
  vec_domain::proto_grammar,
 
1350
  boost::mpl::and_<
 
1351
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<int > >,
 
1352
    boost::mpl::not_<
 
1353
      boost::mpl::or_<
 
1354
        boost::proto::is_extension<vec_expr<Expr> >,
 
1355
        boost::proto::is_extension<int >
 
1356
      >
 
1357
    >
 
1358
  >,
 
1359
  boost::proto::tag::multiplies,
 
1360
  vec_expr<Expr> const &,
 
1361
  int const &
 
1362
>::type /* const */
 
1363
operator* (vec_expr<Expr> const &left, int const &right)
 
1364
{
 
1365
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec_expr<Expr> const &, int const &>()(left, right);
 
1366
}
 
1367
#endif // BOOST_VERSION
587
1368
template<class T, class Expr>
 
1369
#if BOOST_VERSION < 104601
588
1370
typename
589
1371
boost::proto::detail::enable_binary<
590
1372
  vec_domain,
598
1380
operator* (const T& l, const vec_expr<Expr>& r)
599
1381
{
600
1382
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
601
 
    ::impl<const T&,   const vec_expr<Expr>&>() (l, r);
602
 
}
 
1383
    ::impl<const T&, const vec_expr<Expr>&>() (l, r);
 
1384
}
 
1385
#else // BOOST_VERSION >= 104601
 
1386
typename boost::proto::detail::enable_binary< 
 
1387
  vec_domain,
 
1388
  vec_domain::proto_grammar,
 
1389
  boost::mpl::and_<
 
1390
    boost::mpl::or_<is_vec<T >, is_vec<vec_expr<Expr> > >,
 
1391
    boost::mpl::not_<
 
1392
      boost::mpl::or_<
 
1393
        boost::proto::is_extension<T >,
 
1394
        boost::proto::is_extension<vec_expr<Expr> >
 
1395
      >
 
1396
    >
 
1397
  >,
 
1398
  boost::proto::tag::multiplies,
 
1399
  T const &,
 
1400
  vec_expr<Expr> const &
 
1401
>::type /* const */
 
1402
operator* (T const &left, vec_expr<Expr> const &right)
 
1403
{
 
1404
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, T const &, vec_expr<Expr> const &>()(left, right);
 
1405
}
 
1406
#endif // BOOST_VERSION
603
1407
template<class T, class Expr>
 
1408
#if BOOST_VERSION < 104601
604
1409
typename
605
1410
boost::proto::detail::enable_binary<
606
1411
  vec_domain,
614
1419
operator* (const vec_expr<Expr>& l, const T& r)
615
1420
{
616
1421
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
617
 
    ::impl<const vec_expr<Expr>&,   const T&>() (l, r);
618
 
}
 
1422
    ::impl<const vec_expr<Expr>&, const T&>() (l, r);
 
1423
}
 
1424
#else // BOOST_VERSION >= 104601
 
1425
typename boost::proto::detail::enable_binary< 
 
1426
  vec_domain,
 
1427
  vec_domain::proto_grammar,
 
1428
  boost::mpl::and_<
 
1429
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<T > >,
 
1430
    boost::mpl::not_<
 
1431
      boost::mpl::or_<
 
1432
        boost::proto::is_extension<vec_expr<Expr> >,
 
1433
        boost::proto::is_extension<T >
 
1434
      >
 
1435
    >
 
1436
  >,
 
1437
  boost::proto::tag::multiplies,
 
1438
  vec_expr<Expr> const &,
 
1439
  T const &
 
1440
>::type /* const */
 
1441
operator* (vec_expr<Expr> const &left, T const &right)
 
1442
{
 
1443
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec_expr<Expr> const &, T const &>()(left, right);
 
1444
}
 
1445
#endif // BOOST_VERSION
619
1446
template<class T, class M, class Expr>
 
1447
#if BOOST_VERSION < 104601
620
1448
typename
621
1449
boost::proto::detail::enable_binary<
622
1450
  vec_domain,
630
1458
operator* (const vec<T,M>& l, const vec_expr<Expr>& r)
631
1459
{
632
1460
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
633
 
    ::impl<const vec<T,M>&,   const vec_expr<Expr>&>() (l, r);
634
 
}
 
1461
    ::impl<const vec<T,M>&, const vec_expr<Expr>&>() (l, r);
 
1462
}
 
1463
#else // BOOST_VERSION >= 104601
 
1464
typename boost::proto::detail::enable_binary< 
 
1465
  vec_domain,
 
1466
  vec_domain::proto_grammar,
 
1467
  boost::mpl::and_<
 
1468
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<vec_expr<Expr> > >,
 
1469
    boost::mpl::not_<
 
1470
      boost::mpl::or_<
 
1471
        boost::proto::is_extension<vec<T,M> >,
 
1472
        boost::proto::is_extension<vec_expr<Expr> >
 
1473
      >
 
1474
    >
 
1475
  >,
 
1476
  boost::proto::tag::multiplies,
 
1477
  vec<T,M> const &,
 
1478
  vec_expr<Expr> const &
 
1479
>::type /* const */
 
1480
operator* (vec<T,M> const &left, vec_expr<Expr> const &right)
 
1481
{
 
1482
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec<T,M> const &, vec_expr<Expr> const &>()(left, right);
 
1483
}
 
1484
#endif // BOOST_VERSION
635
1485
template<class T, class M, class Expr>
 
1486
#if BOOST_VERSION < 104601
636
1487
typename
637
1488
boost::proto::detail::enable_binary<
638
1489
  vec_domain,
646
1497
operator* (const vec_expr<Expr>& l, const vec<T,M>& r)
647
1498
{
648
1499
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
649
 
    ::impl<const vec_expr<Expr>&,   const vec<T,M>&>() (l, r);
650
 
}
 
1500
    ::impl<const vec_expr<Expr>&, const vec<T,M>&>() (l, r);
 
1501
}
 
1502
#else // BOOST_VERSION >= 104601
 
1503
typename boost::proto::detail::enable_binary< 
 
1504
  vec_domain,
 
1505
  vec_domain::proto_grammar,
 
1506
  boost::mpl::and_<
 
1507
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<vec<T,M> > >,
 
1508
    boost::mpl::not_<
 
1509
      boost::mpl::or_<
 
1510
        boost::proto::is_extension<vec_expr<Expr> >,
 
1511
        boost::proto::is_extension<vec<T,M> >
 
1512
      >
 
1513
    >
 
1514
  >,
 
1515
  boost::proto::tag::multiplies,
 
1516
  vec_expr<Expr> const &,
 
1517
  vec<T,M> const &
 
1518
>::type /* const */
 
1519
operator* (vec_expr<Expr> const &left, vec<T,M> const &right)
 
1520
{
 
1521
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec_expr<Expr> const &, vec<T,M> const &>()(left, right);
 
1522
}
 
1523
#endif // BOOST_VERSION
651
1524
template<class Expr1, class Expr2>
 
1525
#if BOOST_VERSION < 104601
652
1526
typename
653
1527
boost::proto::detail::enable_binary<
654
1528
  vec_domain,
662
1536
operator* (const vec_expr<Expr1>& l, const vec_expr<Expr2>& r)
663
1537
{
664
1538
  return boost::proto::functional::make_expr<boost::proto::tag::multiplies, vec_domain>
665
 
    ::impl<const vec_expr<Expr1>&,   const vec_expr<Expr2>&>() (l, r);
666
 
}
 
1539
    ::impl<const vec_expr<Expr1>&, const vec_expr<Expr2>&>() (l, r);
 
1540
}
 
1541
#else // BOOST_VERSION >= 104601
 
1542
typename boost::proto::detail::enable_binary< 
 
1543
  vec_domain,
 
1544
  vec_domain::proto_grammar,
 
1545
  boost::mpl::and_<
 
1546
    boost::mpl::or_<is_vec<vec_expr<Expr1> >, is_vec<vec_expr<Expr2> > >,
 
1547
    boost::mpl::not_<
 
1548
      boost::mpl::or_<
 
1549
        boost::proto::is_extension<vec_expr<Expr1> >,
 
1550
        boost::proto::is_extension<vec_expr<Expr2> >
 
1551
      >
 
1552
    >
 
1553
  >,
 
1554
  boost::proto::tag::multiplies,
 
1555
  vec_expr<Expr1> const &,
 
1556
  vec_expr<Expr2> const &
 
1557
>::type /* const */
 
1558
operator* (vec_expr<Expr1> const &left, vec_expr<Expr2> const &right)
 
1559
{
 
1560
  return boost::proto::detail::make_expr_<boost::proto::tag::multiplies, vec_domain, vec_expr<Expr1> const &, vec_expr<Expr2> const &>()(left, right);
 
1561
}
 
1562
#endif // BOOST_VERSION
667
1563
template<class T, class M>
 
1564
#if BOOST_VERSION < 104601
668
1565
typename
669
1566
boost::proto::detail::enable_binary<
670
1567
  vec_domain,
678
1575
operator/ (const int& l, const vec<T,M>& r)
679
1576
{
680
1577
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
681
 
    ::impl<const int&,   const vec<T,M>&>() (l, r);
682
 
}
 
1578
    ::impl<const int&, const vec<T,M>&>() (l, r);
 
1579
}
 
1580
#else // BOOST_VERSION >= 104601
 
1581
typename boost::proto::detail::enable_binary< 
 
1582
  vec_domain,
 
1583
  vec_domain::proto_grammar,
 
1584
  boost::mpl::and_<
 
1585
    boost::mpl::or_<is_vec<int >, is_vec<vec<T,M> > >,
 
1586
    boost::mpl::not_<
 
1587
      boost::mpl::or_<
 
1588
        boost::proto::is_extension<int >,
 
1589
        boost::proto::is_extension<vec<T,M> >
 
1590
      >
 
1591
    >
 
1592
  >,
 
1593
  boost::proto::tag::divides,
 
1594
  int const &,
 
1595
  vec<T,M> const &
 
1596
>::type /* const */
 
1597
operator/ (int const &left, vec<T,M> const &right)
 
1598
{
 
1599
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, int const &, vec<T,M> const &>()(left, right);
 
1600
}
 
1601
#endif // BOOST_VERSION
683
1602
template<class T, class M>
 
1603
#if BOOST_VERSION < 104601
684
1604
typename
685
1605
boost::proto::detail::enable_binary<
686
1606
  vec_domain,
694
1614
operator/ (const T& l, const vec<T,M>& r)
695
1615
{
696
1616
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
697
 
    ::impl<const T&,   const vec<T,M>&>() (l, r);
698
 
}
 
1617
    ::impl<const T&, const vec<T,M>&>() (l, r);
 
1618
}
 
1619
#else // BOOST_VERSION >= 104601
 
1620
typename boost::proto::detail::enable_binary< 
 
1621
  vec_domain,
 
1622
  vec_domain::proto_grammar,
 
1623
  boost::mpl::and_<
 
1624
    boost::mpl::or_<is_vec<T >, is_vec<vec<T,M> > >,
 
1625
    boost::mpl::not_<
 
1626
      boost::mpl::or_<
 
1627
        boost::proto::is_extension<T >,
 
1628
        boost::proto::is_extension<vec<T,M> >
 
1629
      >
 
1630
    >
 
1631
  >,
 
1632
  boost::proto::tag::divides,
 
1633
  T const &,
 
1634
  vec<T,M> const &
 
1635
>::type /* const */
 
1636
operator/ (T const &left, vec<T,M> const &right)
 
1637
{
 
1638
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, T const &, vec<T,M> const &>()(left, right);
 
1639
}
 
1640
#endif // BOOST_VERSION
699
1641
template<class T, class M>
 
1642
#if BOOST_VERSION < 104601
700
1643
typename
701
1644
boost::proto::detail::enable_binary<
702
1645
  vec_domain,
710
1653
operator/ (const vec<T,M>& l, const int& r)
711
1654
{
712
1655
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
713
 
    ::impl<const vec<T,M>&,   const int&>() (l, r);
714
 
}
 
1656
    ::impl<const vec<T,M>&, const int&>() (l, r);
 
1657
}
 
1658
#else // BOOST_VERSION >= 104601
 
1659
typename boost::proto::detail::enable_binary< 
 
1660
  vec_domain,
 
1661
  vec_domain::proto_grammar,
 
1662
  boost::mpl::and_<
 
1663
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<int > >,
 
1664
    boost::mpl::not_<
 
1665
      boost::mpl::or_<
 
1666
        boost::proto::is_extension<vec<T,M> >,
 
1667
        boost::proto::is_extension<int >
 
1668
      >
 
1669
    >
 
1670
  >,
 
1671
  boost::proto::tag::divides,
 
1672
  vec<T,M> const &,
 
1673
  int const &
 
1674
>::type /* const */
 
1675
operator/ (vec<T,M> const &left, int const &right)
 
1676
{
 
1677
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec<T,M> const &, int const &>()(left, right);
 
1678
}
 
1679
#endif // BOOST_VERSION
715
1680
template<class T, class M>
 
1681
#if BOOST_VERSION < 104601
716
1682
typename
717
1683
boost::proto::detail::enable_binary<
718
1684
  vec_domain,
726
1692
operator/ (const vec<T,M>& l, const T& r)
727
1693
{
728
1694
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
729
 
    ::impl<const vec<T,M>&,   const T&>() (l, r);
730
 
}
 
1695
    ::impl<const vec<T,M>&, const T&>() (l, r);
 
1696
}
 
1697
#else // BOOST_VERSION >= 104601
 
1698
typename boost::proto::detail::enable_binary< 
 
1699
  vec_domain,
 
1700
  vec_domain::proto_grammar,
 
1701
  boost::mpl::and_<
 
1702
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<T > >,
 
1703
    boost::mpl::not_<
 
1704
      boost::mpl::or_<
 
1705
        boost::proto::is_extension<vec<T,M> >,
 
1706
        boost::proto::is_extension<T >
 
1707
      >
 
1708
    >
 
1709
  >,
 
1710
  boost::proto::tag::divides,
 
1711
  vec<T,M> const &,
 
1712
  T const &
 
1713
>::type /* const */
 
1714
operator/ (vec<T,M> const &left, T const &right)
 
1715
{
 
1716
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec<T,M> const &, T const &>()(left, right);
 
1717
}
 
1718
#endif // BOOST_VERSION
731
1719
template<class T1, class T2, class M>
 
1720
#if BOOST_VERSION < 104601
732
1721
typename
733
1722
boost::proto::detail::enable_binary<
734
1723
  vec_domain,
742
1731
operator/ (const vec<T1,M>& l, const vec<T2,M>& r)
743
1732
{
744
1733
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
745
 
    ::impl<const vec<T1,M>&,   const vec<T2,M>&>() (l, r);
746
 
}
 
1734
    ::impl<const vec<T1,M>&, const vec<T2,M>&>() (l, r);
 
1735
}
 
1736
#else // BOOST_VERSION >= 104601
 
1737
typename boost::proto::detail::enable_binary< 
 
1738
  vec_domain,
 
1739
  vec_domain::proto_grammar,
 
1740
  boost::mpl::and_<
 
1741
    boost::mpl::or_<is_vec<vec<T1,M> >, is_vec<vec<T2,M> > >,
 
1742
    boost::mpl::not_<
 
1743
      boost::mpl::or_<
 
1744
        boost::proto::is_extension<vec<T1,M> >,
 
1745
        boost::proto::is_extension<vec<T2,M> >
 
1746
      >
 
1747
    >
 
1748
  >,
 
1749
  boost::proto::tag::divides,
 
1750
  vec<T1,M> const &,
 
1751
  vec<T2,M> const &
 
1752
>::type /* const */
 
1753
operator/ (vec<T1,M> const &left, vec<T2,M> const &right)
 
1754
{
 
1755
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec<T1,M> const &, vec<T2,M> const &>()(left, right);
 
1756
}
 
1757
#endif // BOOST_VERSION
747
1758
template<class Expr>
 
1759
#if BOOST_VERSION < 104601
748
1760
typename
749
1761
boost::proto::detail::enable_binary<
750
1762
  vec_domain,
758
1770
operator/ (const int& l, const vec_expr<Expr>& r)
759
1771
{
760
1772
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
761
 
    ::impl<const int&,   const vec_expr<Expr>&>() (l, r);
762
 
}
 
1773
    ::impl<const int&, const vec_expr<Expr>&>() (l, r);
 
1774
}
 
1775
#else // BOOST_VERSION >= 104601
 
1776
typename boost::proto::detail::enable_binary< 
 
1777
  vec_domain,
 
1778
  vec_domain::proto_grammar,
 
1779
  boost::mpl::and_<
 
1780
    boost::mpl::or_<is_vec<int >, is_vec<vec_expr<Expr> > >,
 
1781
    boost::mpl::not_<
 
1782
      boost::mpl::or_<
 
1783
        boost::proto::is_extension<int >,
 
1784
        boost::proto::is_extension<vec_expr<Expr> >
 
1785
      >
 
1786
    >
 
1787
  >,
 
1788
  boost::proto::tag::divides,
 
1789
  int const &,
 
1790
  vec_expr<Expr> const &
 
1791
>::type /* const */
 
1792
operator/ (int const &left, vec_expr<Expr> const &right)
 
1793
{
 
1794
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, int const &, vec_expr<Expr> const &>()(left, right);
 
1795
}
 
1796
#endif // BOOST_VERSION
763
1797
template<class Expr>
 
1798
#if BOOST_VERSION < 104601
764
1799
typename
765
1800
boost::proto::detail::enable_binary<
766
1801
  vec_domain,
774
1809
operator/ (const vec_expr<Expr>& l, const int& r)
775
1810
{
776
1811
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
777
 
    ::impl<const vec_expr<Expr>&,   const int&>() (l, r);
778
 
}
 
1812
    ::impl<const vec_expr<Expr>&, const int&>() (l, r);
 
1813
}
 
1814
#else // BOOST_VERSION >= 104601
 
1815
typename boost::proto::detail::enable_binary< 
 
1816
  vec_domain,
 
1817
  vec_domain::proto_grammar,
 
1818
  boost::mpl::and_<
 
1819
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<int > >,
 
1820
    boost::mpl::not_<
 
1821
      boost::mpl::or_<
 
1822
        boost::proto::is_extension<vec_expr<Expr> >,
 
1823
        boost::proto::is_extension<int >
 
1824
      >
 
1825
    >
 
1826
  >,
 
1827
  boost::proto::tag::divides,
 
1828
  vec_expr<Expr> const &,
 
1829
  int const &
 
1830
>::type /* const */
 
1831
operator/ (vec_expr<Expr> const &left, int const &right)
 
1832
{
 
1833
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec_expr<Expr> const &, int const &>()(left, right);
 
1834
}
 
1835
#endif // BOOST_VERSION
779
1836
template<class T, class Expr>
 
1837
#if BOOST_VERSION < 104601
780
1838
typename
781
1839
boost::proto::detail::enable_binary<
782
1840
  vec_domain,
790
1848
operator/ (const T& l, const vec_expr<Expr>& r)
791
1849
{
792
1850
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
793
 
    ::impl<const T&,   const vec_expr<Expr>&>() (l, r);
794
 
}
 
1851
    ::impl<const T&, const vec_expr<Expr>&>() (l, r);
 
1852
}
 
1853
#else // BOOST_VERSION >= 104601
 
1854
typename boost::proto::detail::enable_binary< 
 
1855
  vec_domain,
 
1856
  vec_domain::proto_grammar,
 
1857
  boost::mpl::and_<
 
1858
    boost::mpl::or_<is_vec<T >, is_vec<vec_expr<Expr> > >,
 
1859
    boost::mpl::not_<
 
1860
      boost::mpl::or_<
 
1861
        boost::proto::is_extension<T >,
 
1862
        boost::proto::is_extension<vec_expr<Expr> >
 
1863
      >
 
1864
    >
 
1865
  >,
 
1866
  boost::proto::tag::divides,
 
1867
  T const &,
 
1868
  vec_expr<Expr> const &
 
1869
>::type /* const */
 
1870
operator/ (T const &left, vec_expr<Expr> const &right)
 
1871
{
 
1872
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, T const &, vec_expr<Expr> const &>()(left, right);
 
1873
}
 
1874
#endif // BOOST_VERSION
795
1875
template<class T, class Expr>
 
1876
#if BOOST_VERSION < 104601
796
1877
typename
797
1878
boost::proto::detail::enable_binary<
798
1879
  vec_domain,
806
1887
operator/ (const vec_expr<Expr>& l, const T& r)
807
1888
{
808
1889
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
809
 
    ::impl<const vec_expr<Expr>&,   const T&>() (l, r);
810
 
}
 
1890
    ::impl<const vec_expr<Expr>&, const T&>() (l, r);
 
1891
}
 
1892
#else // BOOST_VERSION >= 104601
 
1893
typename boost::proto::detail::enable_binary< 
 
1894
  vec_domain,
 
1895
  vec_domain::proto_grammar,
 
1896
  boost::mpl::and_<
 
1897
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<T > >,
 
1898
    boost::mpl::not_<
 
1899
      boost::mpl::or_<
 
1900
        boost::proto::is_extension<vec_expr<Expr> >,
 
1901
        boost::proto::is_extension<T >
 
1902
      >
 
1903
    >
 
1904
  >,
 
1905
  boost::proto::tag::divides,
 
1906
  vec_expr<Expr> const &,
 
1907
  T const &
 
1908
>::type /* const */
 
1909
operator/ (vec_expr<Expr> const &left, T const &right)
 
1910
{
 
1911
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec_expr<Expr> const &, T const &>()(left, right);
 
1912
}
 
1913
#endif // BOOST_VERSION
811
1914
template<class T, class M, class Expr>
 
1915
#if BOOST_VERSION < 104601
812
1916
typename
813
1917
boost::proto::detail::enable_binary<
814
1918
  vec_domain,
822
1926
operator/ (const vec<T,M>& l, const vec_expr<Expr>& r)
823
1927
{
824
1928
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
825
 
    ::impl<const vec<T,M>&,   const vec_expr<Expr>&>() (l, r);
826
 
}
 
1929
    ::impl<const vec<T,M>&, const vec_expr<Expr>&>() (l, r);
 
1930
}
 
1931
#else // BOOST_VERSION >= 104601
 
1932
typename boost::proto::detail::enable_binary< 
 
1933
  vec_domain,
 
1934
  vec_domain::proto_grammar,
 
1935
  boost::mpl::and_<
 
1936
    boost::mpl::or_<is_vec<vec<T,M> >, is_vec<vec_expr<Expr> > >,
 
1937
    boost::mpl::not_<
 
1938
      boost::mpl::or_<
 
1939
        boost::proto::is_extension<vec<T,M> >,
 
1940
        boost::proto::is_extension<vec_expr<Expr> >
 
1941
      >
 
1942
    >
 
1943
  >,
 
1944
  boost::proto::tag::divides,
 
1945
  vec<T,M> const &,
 
1946
  vec_expr<Expr> const &
 
1947
>::type /* const */
 
1948
operator/ (vec<T,M> const &left, vec_expr<Expr> const &right)
 
1949
{
 
1950
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec<T,M> const &, vec_expr<Expr> const &>()(left, right);
 
1951
}
 
1952
#endif // BOOST_VERSION
827
1953
template<class T, class M, class Expr>
 
1954
#if BOOST_VERSION < 104601
828
1955
typename
829
1956
boost::proto::detail::enable_binary<
830
1957
  vec_domain,
838
1965
operator/ (const vec_expr<Expr>& l, const vec<T,M>& r)
839
1966
{
840
1967
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
841
 
    ::impl<const vec_expr<Expr>&,   const vec<T,M>&>() (l, r);
842
 
}
 
1968
    ::impl<const vec_expr<Expr>&, const vec<T,M>&>() (l, r);
 
1969
}
 
1970
#else // BOOST_VERSION >= 104601
 
1971
typename boost::proto::detail::enable_binary< 
 
1972
  vec_domain,
 
1973
  vec_domain::proto_grammar,
 
1974
  boost::mpl::and_<
 
1975
    boost::mpl::or_<is_vec<vec_expr<Expr> >, is_vec<vec<T,M> > >,
 
1976
    boost::mpl::not_<
 
1977
      boost::mpl::or_<
 
1978
        boost::proto::is_extension<vec_expr<Expr> >,
 
1979
        boost::proto::is_extension<vec<T,M> >
 
1980
      >
 
1981
    >
 
1982
  >,
 
1983
  boost::proto::tag::divides,
 
1984
  vec_expr<Expr> const &,
 
1985
  vec<T,M> const &
 
1986
>::type /* const */
 
1987
operator/ (vec_expr<Expr> const &left, vec<T,M> const &right)
 
1988
{
 
1989
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec_expr<Expr> const &, vec<T,M> const &>()(left, right);
 
1990
}
 
1991
#endif // BOOST_VERSION
843
1992
template<class Expr1, class Expr2>
 
1993
#if BOOST_VERSION < 104601
844
1994
typename
845
1995
boost::proto::detail::enable_binary<
846
1996
  vec_domain,
854
2004
operator/ (const vec_expr<Expr1>& l, const vec_expr<Expr2>& r)
855
2005
{
856
2006
  return boost::proto::functional::make_expr<boost::proto::tag::divides, vec_domain>
857
 
    ::impl<const vec_expr<Expr1>&,   const vec_expr<Expr2>&>() (l, r);
858
 
}
 
2007
    ::impl<const vec_expr<Expr1>&, const vec_expr<Expr2>&>() (l, r);
 
2008
}
 
2009
#else // BOOST_VERSION >= 104601
 
2010
typename boost::proto::detail::enable_binary< 
 
2011
  vec_domain,
 
2012
  vec_domain::proto_grammar,
 
2013
  boost::mpl::and_<
 
2014
    boost::mpl::or_<is_vec<vec_expr<Expr1> >, is_vec<vec_expr<Expr2> > >,
 
2015
    boost::mpl::not_<
 
2016
      boost::mpl::or_<
 
2017
        boost::proto::is_extension<vec_expr<Expr1> >,
 
2018
        boost::proto::is_extension<vec_expr<Expr2> >
 
2019
      >
 
2020
    >
 
2021
  >,
 
2022
  boost::proto::tag::divides,
 
2023
  vec_expr<Expr1> const &,
 
2024
  vec_expr<Expr2> const &
 
2025
>::type /* const */
 
2026
operator/ (vec_expr<Expr1> const &left, vec_expr<Expr2> const &right)
 
2027
{
 
2028
  return boost::proto::detail::make_expr_<boost::proto::tag::divides, vec_domain, vec_expr<Expr1> const &, vec_expr<Expr2> const &>()(left, right);
 
2029
}
 
2030
#endif // BOOST_VERSION
859
2031
namespace vec_detail {
860
2032
    struct plus_assign {
861
2033
        template<class T, class U>
1780
2952
  return dis_inner_product (x.begin(), y.begin(), x.size(), x.ownership().comm());
1781
2953
}
1782
2954
template <class Expr>
1783
 
typename vec_expr<Expr>::element_type
 
2955
typename vec_expr<Expr>::value_type
1784
2956
dot (const vec_expr<Expr>& x, const int& y)
1785
2957
{
1786
2958
  return y*dis_accumulate (x.begin(), x.size(), x.ownership().comm());
1787
2959
}
1788
2960
template <class Expr>
1789
 
typename vec_expr<Expr>::element_type
 
2961
typename vec_expr<Expr>::value_type
1790
2962
dot (const int& x, const vec_expr<Expr>& y)
1791
2963
{
1792
2964
  return x*dis_accumulate (y.begin(), y.size(), y.ownership().comm());
1793
2965
}
1794
2966
template <class T, class Expr>
1795
 
typename promote<T,typename vec_expr<Expr>::element_type>::type
 
2967
typename promote<T,typename vec_expr<Expr>::value_type>::type
1796
2968
dot (const vec_expr<Expr>& x, const T& y)
1797
2969
{
1798
2970
  return y*dis_accumulate (x.begin(), x.size(), x.ownership().comm());
1799
2971
}
1800
2972
template <class T, class Expr>
1801
 
typename promote<T,typename vec_expr<Expr>::element_type>::type
 
2973
typename promote<T,typename vec_expr<Expr>::value_type>::type
1802
2974
dot (const T& x, const vec_expr<Expr>& y)
1803
2975
{
1804
2976
  return x*dis_accumulate (y.begin(), y.size(), y.ownership().comm());
1805
2977
}
1806
2978
template <class T, class M, class Expr>
1807
 
typename promote<T,typename vec_expr<Expr>::element_type>::type
 
2979
typename promote<T,typename vec_expr<Expr>::value_type>::type
1808
2980
dot (const vec<T,M>& x, const vec_expr<Expr>& y)
1809
2981
{
1810
2982
  return dis_inner_product (x.begin(), y.begin(), x.size(), x.ownership().comm());
1811
2983
}
1812
2984
template <class T, class M, class Expr>
1813
 
typename promote<T,typename vec_expr<Expr>::element_type>::type
 
2985
typename promote<T,typename vec_expr<Expr>::value_type>::type
1814
2986
dot (const vec_expr<Expr>& x, const vec<T,M>& y)
1815
2987
{
1816
2988
  return dis_inner_product (x.begin(), y.begin(), x.size(), x.ownership().comm());
1817
2989
}
1818
2990
template <class Expr1, class Expr2>
1819
2991
typename promote<
1820
 
  typename vec_expr<Expr1>::element_type,
1821
 
  typename vec_expr<Expr2>::element_type
 
2992
  typename vec_expr<Expr1>::value_type,
 
2993
  typename vec_expr<Expr2>::value_type
1822
2994
>::type
1823
2995
dot (const vec_expr<Expr1>& x, const vec_expr<Expr2>& y)
1824
2996
{