@@ -927,6 +927,40 @@ inline VectorAVXDouble erfc(VectorAVXDouble a) {
927
927
return result;
928
928
}
929
929
930
+ }; // namespace simd
931
+ }; // namespace libint2
932
+
933
+ // @{ standard stream operations
934
+ inline std::ostream& operator <<(std::ostream& os,
935
+ libint2::simd::VectorAVXDouble a) {
936
+ double ad[4 ];
937
+ a.convert (ad);
938
+ os << " {" << ad[0 ] << " ," << ad[1 ] << " ," << ad[2 ] << " ," << ad[3 ] << " }" ;
939
+ return os;
940
+ }
941
+
942
+ namespace libint2 {
943
+
944
+ // @{ vector traits of VectorAVXDouble
945
+
946
+ template <>
947
+ struct is_vector <simd::VectorAVXDouble> {
948
+ static const bool value = true ;
949
+ };
950
+
951
+ template <>
952
+ struct vector_traits <simd::VectorAVXDouble> {
953
+ typedef double scalar_type;
954
+ static const size_t extent = 4 ;
955
+ };
956
+
957
+ // @}
958
+
959
+ } // namespace libint2
960
+
961
+ namespace libint2 {
962
+ namespace simd {
963
+
930
964
/* *
931
965
* SIMD vector of 8 single-precision floating-point real numbers, operations on
932
966
* which use AVX instructions available on recent x86 hardware from Intel
@@ -1149,15 +1183,6 @@ inline VectorAVXFloat erfc(VectorAVXFloat a) {
1149
1183
}; // namespace simd
1150
1184
}; // namespace libint2
1151
1185
1152
- // @{ standard stream operations
1153
- inline std::ostream& operator <<(std::ostream& os,
1154
- libint2::simd::VectorAVXDouble a) {
1155
- double ad[4 ];
1156
- a.convert (ad);
1157
- os << " {" << ad[0 ] << " ," << ad[1 ] << " ," << ad[2 ] << " ," << ad[3 ] << " }" ;
1158
- return os;
1159
- }
1160
-
1161
1186
// @{ standard stream operations
1162
1187
inline std::ostream& operator <<(std::ostream& os,
1163
1188
libint2::simd::VectorAVXFloat a) {
@@ -1171,17 +1196,17 @@ inline std::ostream& operator<<(std::ostream& os,
1171
1196
1172
1197
namespace libint2 {
1173
1198
1174
- // @{ vector traits of VectorAVXDouble
1199
+ // @{ vector traits of VectorAVXFloat
1175
1200
1176
1201
template <>
1177
- struct is_vector <simd::VectorAVXDouble > {
1202
+ struct is_vector <simd::VectorAVXFloat > {
1178
1203
static const bool value = true ;
1179
1204
};
1180
1205
1181
1206
template <>
1182
- struct vector_traits <simd::VectorAVXDouble > {
1183
- typedef double scalar_type;
1184
- static const size_t extent = 4 ;
1207
+ struct vector_traits <simd::VectorAVXFloat > {
1208
+ typedef float scalar_type;
1209
+ static const size_t extent = 8 ;
1185
1210
};
1186
1211
1187
1212
// @}
0 commit comments