[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2a92707 04/11: Move a comment block that will
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2a92707 04/11: Move a comment block that will soon become a test |
Date: |
Tue, 16 Feb 2021 13:06:22 -0500 (EST) |
branch: master
commit 2a92707c4f7c5789d7a2a8678b31296405e07041
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Move a comment block that will soon become a test
---
expression_template_0_test.cpp | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/expression_template_0_test.cpp b/expression_template_0_test.cpp
index 5739cae..be30f46 100644
--- a/expression_template_0_test.cpp
+++ b/expression_template_0_test.cpp
@@ -368,14 +368,6 @@ std::vector<T>& operator<<(std::vector<T>& t, V v)
void mete_pete_typical()
{
-// With the operator<<() above, this:
-// std::vector<double> pv7a(pv0.size()); assign(pv7a, pv0 - pv1);
-// could be written thus:
-// std::vector<double> pv7b(pv0.size()); pv7b << pv0 - pv1;
-// but these still wouldn't work:
-// std::vector<double> pv7c << pv0 - pv1;
-// std::vector<double> pv7d(pv0 - pv1);
-
for(int i = 0; i < n_iter; ++i)
{
std::vector<double> pv8(pv0.size()); assign(pv8, pv0 - pv1);
@@ -483,6 +475,17 @@ void time_one_array_length(int length)
std::cout << std::endl;
}
+void test_pete_assignment()
+{
+// With the operator<<() above, this:
+// std::vector<double> pv7a(pv0.size()); assign(pv7a, pv0 - pv1);
+// could be written thus:
+// std::vector<double> pv7b(pv0.size()); pv7b << pv0 - pv1;
+// but these still wouldn't work:
+// std::vector<double> pv7c << pv0 - pv1;
+// std::vector<double> pv7d(pv0 - pv1);
+}
+
int test_main(int, char*[])
{
time_one_array_length(1);
@@ -491,5 +494,7 @@ int test_main(int, char*[])
time_one_array_length(1000);
time_one_array_length(10000);
+ test_pete_assignment();
+
return 0;
}
- [lmi-commits] [lmi] master updated (3143a30 -> c90e25a), Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master b321588 05/11: Demonstrate PETE assignment to std::vector, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master bcec152 08/11: Amend PETE header and footer for generated files, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 2741732 07/11: Break a makefile dependency cycle, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 2a92707 04/11: Move a comment block that will soon become a test,
Greg Chicares <=
- [lmi-commits] [lmi] master 431bdbb 01/11: Do not include PETE in any header except "et_vector.hpp", Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master acac3ad 03/11: Accommodate 21st-century hardware, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master c90e25a 11/11: No longer invoke std::operator==() explicitly for vectors, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 2844ba0 10/11: Suppress PETE's operator==() for std::vector, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 7f3f834 06/11: Rewrite '*clean*' targets, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 088d2a8 09/11: Regenerate PETE, Greg Chicares, 2021/02/16
- [lmi-commits] [lmi] master 38d5ece 02/11: Further improve physical design, Greg Chicares, 2021/02/16