Home | History | Annotate | Download | only in bits

Lines Matching refs:_Tp

55   template<typename _Tp>
56 inline _Tp*__restrict__
59 return static_cast<_Tp*__restrict__>
60 (std::__valarray_get_memory(__n * sizeof(_Tp)));
68 // Turn a raw-memory into an array of _Tp filled with _Tp()
70 template<typename _Tp, bool>
76 _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
79 new(__b++) _Tp();
83 template<typename _Tp>
84 struct _Array_default_ctor<_Tp, true>
88 _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
89 { __builtin_memset(__b, 0, (__e - __b) * sizeof(_Tp)); }
92 template<typename _Tp>
94 __valarray_default_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
96 _Array_default_ctor<_Tp, __is_scalar<_Tp>::__value>::_S_do_it(__b, __e);
99 // Turn a raw-memory into an array of _Tp filled with __t
102 template<typename _Tp, bool>
108 _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t)
111 new(__b++) _Tp(__t);
115 template<typename _Tp>
116 struct _Array_init_ctor<_Tp, true>
119 _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t)
126 template<typename _Tp>
128 __valarray_fill_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e,
129 const _Tp __t)
131 _Array_init_ctor<_Tp, __is_pod(_Tp)>::_S_do_it(__b, __e, __t);
138 template<typename _Tp, bool>
144 _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
145 _Tp* __restrict__ __o)
148 new(__o++) _Tp(*__b++);
152 template<typename _Tp>
153 struct _Array_copy_ctor<_Tp, true>
156 _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
157 _Tp* __restrict__ __o)
158 { __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp)); }
161 template<typename _Tp>
163 __valarray_copy_construct(const _Tp* __restrict__ __b,
164 const _Tp* __restrict__ __e,
165 _Tp* __restrict__ __o)
167 _Array_copy_ctor<_Tp, __is_pod(_Tp)>::_S_do_it(__b, __e, __o);
171 template<typename _Tp>
173 __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n,
174 size_t __s, _Tp* __restrict__ __o)
176 if (__is_pod(_Tp))
185 new(__o++) _Tp(*__a);
191 template<typename _Tp>
193 __valarray_copy_construct (const _Tp* __restrict__ __a,
195 _Tp* __restrict__ __o, size_t __n)
197 if (__is_pod(_Tp))
202 new (__o++) _Tp(__a[*__i++]);
206 template<typename _Tp>
208 __valarray_destroy_elements(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
210 if (!__is_pod(_Tp))
213 __b->~_Tp();
219 template<typename _Tp>
221 __valarray_fill(_Tp* __restrict__ __a, size_t __n, const _Tp& __t)
228 template<typename _Tp>
230 __valarray_fill(_Tp* __restrict__ __a, size_t __n,
231 size_t __s, const _Tp& __t)
238 template<typename _Tp>
240 __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i,
241 size_t __n, const _Tp& __t)
249 template<typename _Tp, bool>
253 _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
260 template<typename _Tp>
261 struct _Array_copier<_Tp, true>
264 _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
265 { __builtin_memcpy(__b, __a, __n * sizeof (_Tp)); }
269 template<typename _Tp>
271 __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
272 _Tp* __restrict__ __b)
274 _Array_copier<_Tp, __is_pod(_Tp)>::_S_do_it(__a, __n, __b);
278 template<typename _Tp>
280 __valarray_copy(const _Tp* __restrict__ __a, size_t __n, size_t __s,
281 _Tp* __restrict__ __b)
288 template<typename _Tp>
290 __valarray_copy(const _Tp* __restrict__ __a, _Tp* __restrict__ __b,
299 template<typename _Tp>
301 __valarray_copy(const _Tp* __restrict__ __src, size_t __n, size_t __s1,
302 _Tp* __restrict__ __dst, size_t __s2)
309 template<typename _Tp>
311 __valarray_copy(const _Tp* __restrict__ __a,
313 _Tp* __restrict__ __b, size_t __n)
320 template<typename _Tp>
322 __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
323 _Tp* __restrict__ __b, const size_t* __restrict__ __i)
331 template<typename _Tp>
333 __valarray_copy(const _Tp* __restrict__ __src, size_t __n,
335 _Tp* __restrict__ __dst, const size_t* __restrict__ __j)
345 // for _Tp = float, double, long double using a more accurate
348 template<typename _Tp>
349 inline _Tp
350 __valarray_sum(const _Tp* __restrict__ __f, const _Tp* __restrict__ __l)
352 _Tp __r = _Tp();
359 template<typename _Tp>
360 inline _Tp
361 __valarray_product(const _Tp* __restrict__ __f,
362 const _Tp* __restrict__ __l)
364 _Tp __r = _Tp(1);
409 template<typename _Tp>
413 explicit _Array(_Tp* const __restrict__);
414 explicit _Array(const valarray<_Tp>&);
415 _Array(const _Tp* __restrict__, size_t);
417 _Tp* begin() const;
419 _Tp* const __restrict__ _M_data;
424 template<typename _Tp>
426 __valarray_copy_construct(_Array<_Tp> __a, _Array<size_t> __i,
427 _Array<_Tp> __b, size_t __n)
432 template<typename _Tp>
434 __valarray_copy_construct(_Array<_Tp> __a, size_t __n, size_t __s,
435 _Array<_Tp> __b)
438 template<typename _Tp>
440 __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t)
443 template<typename _Tp>
445 __valarray_fill(_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t)
448 template<typename _Tp>
450 __valarray_fill(_Array<_Tp> __a, _Array<size_t> __i,
451 size_t __n, const _Tp& __t)
455 template<typename _Tp>
457 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b)
461 template<typename _Tp>
463 __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b)
467 template<typename _Tp>
469 __valarray_copy(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s)
474 template<typename _Tp>
476 __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1,
477 _Array<_Tp> __b, size_t __s2)
481 template<typename _Tp>
483 __valarray_copy(_Array<_Tp> __a, _Array<size_t> __i,
484 _Array<_Tp> __b, size_t __n)
488 template<typename _Tp>
490 __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
496 template<typename _Tp>
498 __valarray_copy(_Array<_Tp> __src, size_t __n, _Array<size_t> __i,
499 _Array<_Tp> __dst, _Array<size_t> __j)
505 template<typename _Tp>
507 _Array<_Tp>::_Array(size_t __n)
508 : _M_data(__valarray_get_storage<_Tp>(__n))
511 template<typename _Tp>
513 _Array<_Tp>::_Array(_Tp* const __restrict__ __p)
516 template<typename _Tp>
518 _Array<_Tp>::_Array(const valarray<_Tp>& __v)
521 template<typename _Tp>
523 _Array<_Tp>::_Array(const _Tp* __restrict__ __b, size_t __s)
524 : _M_data(__valarray_get_storage<_Tp>(__s))
527 template<typename _Tp>
528 inline _Tp*
529 _Array<_Tp>::begin () const
533 template<typename _Tp> \
535 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, const _Tp& __t) \
537 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) \
541 template<typename _Tp> \
543 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) \
545 _Tp* __p = __a._M_data; \
546 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) \
550 template<typename _Tp
552 _Array_augmented_##_Name(_Array<_Tp> __a, \
553 const _Expr<_Dom, _Tp>& __e, size_t __n) \
555 _Tp* __p(__a._M_data); \
560 template<typename _Tp> \
562 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, size_t __s, \
563 _Array<_Tp> __b) \
565 _Tp* __q(__b._M_data); \
566 for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; \
571 template<typename _Tp> \
573 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<_Tp> __b, \
576 _Tp* __q(__b._M_data); \
577 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \
582 template<typename _Tp, class _Dom> \
584 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __s, \
585 const _Expr<_Dom, _Tp>& __e, size_t __n) \
587 _Tp* __p(__a._M_data); \
592 template<typename _Tp> \
594 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<size_t> __i, \
595 _Array<_Tp> __b, size_t __n) \
597 _Tp* __q(__b._M_data); \
603 template<typename _Tp> \
605 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \
606 _Array<_Tp> __b, _Array<size_t> __i) \
608 _Tp* __p(__a._M_data); \
614 template<typename _Tp, class _Dom> \
616 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<size_t> __i, \
617 const _Expr<_Dom, _Tp>& __e, size_t __n) \
624 template<typename _Tp> \
626 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<bool> __m, \
627 _Array<_Tp> __b, size_t __n) \
630 _Tp* __p(__a._M_data); \
631 for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; \
643 template<typename _Tp> \
645 _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \
646 _Array<_Tp> __b, _Array<bool> __m) \
649 _Tp* __q(__b._M_data); \
650 for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \
662 template<typename _Tp, class _Dom> \
664 _Array_augmented_##_Name(_Array<_Tp> __a, _Array<bool> __m, \
665 const _Expr<_Dom, _Tp>& __e, size_t __n) \
668 _Tp* __p(__a._M_data); \