1 #ifndef VIENNACL_VECTOR_OPERATIONS_HPP_
2 #define VIENNACL_VECTOR_OPERATIONS_HPP_
47 template <
typename V1,
typename V2,
typename V3>
59 const unsigned int ALIGNMENT = V1::alignment;
63 &&
"Incompatible vector sizes in add()!");
83 template <
typename V1,
typename V2>
93 const unsigned int ALIGNMENT = V1::alignment;
96 &&
"Incompatible vector sizes in inplace_add()!");
118 template <
typename V1,
typename V2,
typename V3>
130 const unsigned int ALIGNMENT = V1::alignment;
134 &&
"Incompatible vector sizes in sub()!");
152 template <
typename V1,
typename V2>
162 const unsigned int ALIGNMENT = V1::alignment;
165 &&
"Incompatible vector sizes in inplace_sub()!");
185 template <
typename V1,
typename S2,
typename V3>
197 const unsigned int ALIGNMENT = V1::alignment;
200 &&
"Incompatible vector sizes in mult()!");
218 template <
typename V1,
typename SCALARTYPE,
typename V3>
230 const unsigned int ALIGNMENT = V1::alignment;
233 &&
"Incompatible vector sizes in mult()!");
238 static_cast<value_type>(alpha),
250 template <
typename V1,
typename S2>
260 const unsigned int ALIGNMENT = V1::alignment;
276 template <
typename V1,
typename S2>
286 const unsigned int ALIGNMENT = V1::alignment;
291 static_cast<value_type>(alpha))
304 template <
typename V1,
typename S2,
typename V3>
316 const unsigned int ALIGNMENT = V1::alignment;
319 &&
"Incompatible vector sizes in divide()!");
336 template <
typename V1,
typename S2>
346 const unsigned int ALIGNMENT = V1::alignment;
365 template <
typename V1,
typename S2,
typename V3,
typename V4>
379 const unsigned int ALIGNMENT = V1::alignment;
383 &&
"Incompatible vector sizes in mul_add()!");
405 template <
typename V1,
typename SCALARTYPE,
typename V3,
typename V4>
419 const unsigned int ALIGNMENT = V1::alignment;
423 &&
"Incompatible vector sizes in mul_add()!");
429 static_cast<value_type>(alpha),
444 template <
typename V1,
typename V2,
typename S3>
456 const unsigned int ALIGNMENT = V1::alignment;
459 &&
"Incompatible vector sizes in inplace_mul_add()!");
478 template <
typename V1,
typename V2,
typename SCALARTYPE>
490 const unsigned int ALIGNMENT = V1::alignment;
493 &&
"Incompatible vector sizes in inplace_mul_add()!");
512 template <
typename V1,
typename S2,
typename V3,
typename V4>
526 const unsigned int ALIGNMENT = V1::alignment;
530 &&
"Incompatible vector sizes in mul_sub()!");
551 template <
typename V1,
typename V2,
typename S3>
563 const unsigned int ALIGNMENT = V1::alignment;
566 &&
"Incompatible vector sizes in inplace_mul_sub()!");
585 template <
typename V1,
typename V2,
typename S3>
597 const unsigned int ALIGNMENT = V1::alignment;
600 &&
"Incompatible vector sizes in inplace_div_add()!");
619 template <
typename V1,
typename V2,
typename S3>
631 const unsigned int ALIGNMENT = V1::alignment;
634 &&
"Incompatible vector sizes in inplace_div_sub()!");
657 template <
typename V1,
typename V2,
typename S3>
673 const unsigned int ALIGNMENT = V1::alignment;
676 &&
"Incompatible vector sizes in inner_prod_impl()!");
705 ksum.local_work_size(0, work_groups);
706 ksum.global_work_size(0, work_groups);
719 template <
typename V1,
typename V2>
724 viennacl::op_inner_prod >
731 viennacl::op_inner_prod >(vec1, vec2);
741 template <
typename V1,
typename S2>
755 const unsigned int ALIGNMENT = V1::alignment;
790 ksum.local_work_size(0, work_groups);
791 ksum.global_work_size(0, work_groups);
802 template <
typename V1,
typename S2>
816 const unsigned int ALIGNMENT = V1::alignment;
852 sqrt_sum.local_work_size(0, work_groups);
853 sqrt_sum.global_work_size(0, work_groups);
865 template <
typename V1,
typename S2>
879 const unsigned int ALIGNMENT = V1::alignment;
897 assert( work_groups == 1
904 || work_groups == 128
905 || work_groups == 256
906 || work_groups == 512 );
915 max_kernel.local_work_size(0, work_groups);
916 max_kernel.global_work_size(0, work_groups);
932 template <
typename V1>
941 const unsigned int ALIGNMENT = V1::alignment;
971 template <
typename V1,
typename V2,
typename SCALARTYPE>
984 const unsigned int ALIGNMENT = V1::alignment;