Author: sebor
Date: Wed Apr  2 15:12:41 2008
New Revision: 644088

URL: http://svn.apache.org/viewvc?rev=644088&view=rev
Log:
2008-04-01  Martin Sebor  <[EMAIL PROTECTED]>

        STDCXX-812
        * tests/localization/22.locale.numpunct.mt.cpp [_RWSTD_OS_HP_UX
        || _ILP32] (rw_opt_nlocales): Decreased from the default 16 to
        10 in order to work around an HP-UX inefficiency, and renamed
        to opt_nlocales to avoid inappropriately using rwtest convention.
        * tests/localization/22.locale.time.put.mt.cpp: Same.
        * tests/localization/22.locale.num.put.mt.cpp: Same.
        * tests/localization/22.locale.ctype.mt.cpp: Same.
        * tests/localization/22.locale.money.put.mt.cpp: Same except
        that had to go down to 9 to avoid the same inefficiency.
        * tests/localization/22.locale.money.get.mt.cpp: Same.

Modified:
    stdcxx/trunk/tests/localization/22.locale.ctype.mt.cpp
    stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp
    stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp
    stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp
    stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp
    stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp

Modified: stdcxx/trunk/tests/localization/22.locale.ctype.mt.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.mt.cpp?rev=644088&r1=644087&r2=644088&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.ctype.mt.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.ctype.mt.cpp Wed Apr  2 15:12:41 
2008
@@ -49,8 +49,18 @@
 // otherwise on the command line)
 int opt_nloops = 200000;
 
+#if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32)
+
 // number of locales to use
 int opt_nlocales = MAX_THREADS;
+
+#else   // HP-UX in LP64 mode
+
+// work around an inefficiency (small cache size?) on HP-UX
+// in LP64 mode (see STDCXX-812)
+int opt_nlocales = 10;
+
+#endif   // HP-UX 32/64 bit mode
 
 // should all threads share the same set of locale objects instead
 // of creating their own?

Modified: stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp?rev=644088&r1=644087&r2=644088&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.money.get.mt.cpp Wed Apr  2 
15:12:41 2008
@@ -46,12 +46,23 @@
 // of processors/cores later)
 int rw_opt_nthreads = 1;
 
+#if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32)
+
 // the number of times each thread should iterate (unless specified
 // otherwise on the command line)
 int rw_opt_nloops = 100000;
 
 // number of locales to use
-int rw_opt_nlocales = MAX_THREADS;
+int opt_nlocales = MAX_THREADS;
+
+#else   // HP-UX in LP64 mode
+
+// work around a small cache size on HP-UX in LP64 mode
+// in LP64 mode (see STDCXX-812)
+int opt_nloops   = 100000;
+int opt_nlocales = 9;
+
+#endif   // HP-UX 32/64 bit mode
 
 // should all threads share the same set of locale objects instead
 // of creating their own?
@@ -164,7 +175,7 @@
     long double ldbl = 0.;
 #endif  // _RWSTD_NO_LONG_DOUBLE
 
-    for (int i = 0; i != rw_opt_nloops; ++i) {
+    for (int i = 0; i != opt_nloops; ++i) {
 
         // save the name of the locale
         const MyMoneyData& data = my_money_data [i % nlocales];
@@ -371,7 +382,7 @@
                      "failed to create locale(%#s)", name);
         }
 
-        if (nlocales == maxinx || nlocales == std::size_t (rw_opt_nlocales))
+        if (nlocales == maxinx || nlocales == std::size_t (opt_nlocales))
             break;
     }
 
@@ -383,7 +394,7 @@
              "testing std::money_get<charT> with %d thread%{?}s%{;}, "
              "%zu iteration%{?}s%{;} each, in %zu locales { %{ [EMAIL 
PROTECTED] }",
              rw_opt_nthreads, 1 != rw_opt_nthreads,
-             rw_opt_nloops, 1 != rw_opt_nloops,
+             opt_nloops, 1 != opt_nloops,
              nlocales, int (nlocales), "%#s", locales);
 
     rw_info (0, 0, 0, "exercising std::money_get<char>");
@@ -459,10 +470,10 @@
                     "|-nlocales#0 "      // arg must be non-negative
                     "|-locales= "        // must be provided
                     "|-shared-locale# ",
-                    &rw_opt_nloops,
+                    &opt_nloops,
                     int (MAX_THREADS),
                     &rw_opt_nthreads,
-                    &rw_opt_nlocales,
+                    &opt_nlocales,
                     &rw_opt_setlocales,
                     &rw_opt_shared_locale);
 }

Modified: stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp?rev=644088&r1=644087&r2=644088&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.money.put.mt.cpp Wed Apr  2 
15:12:41 2008
@@ -50,8 +50,18 @@
 // otherwise on the command line)
 int rw_opt_nloops = 100000;
 
+#if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32)
+
 // number of locales to use
-int rw_opt_nlocales = MAX_THREADS;
+int opt_nlocales = MAX_THREADS;
+
+#else   // HP-UX in LP64 mode
+
+// work around a small locale cache on HP-UX in LP64 mode
+// (see STDCXX-812)
+int opt_nlocales = 9;
+
+#endif   // HP-UX 32/64 bit mode
 
 // should all threads share the same set of locale objects instead
 // of creating their own?
@@ -377,7 +387,7 @@
                      "failed to create locale(%#s)", name);
         }
 
-        if (nlocales == maxinx || nlocales == std::size_t (rw_opt_nlocales))
+        if (nlocales == maxinx || nlocales == std::size_t (opt_nlocales))
             break;
     }
 
@@ -468,7 +478,7 @@
                     &rw_opt_nloops,
                     int (MAX_THREADS),
                     &rw_opt_nthreads,
-                    &rw_opt_nlocales,
+                    &opt_nlocales,
                     &rw_opt_setlocales,
                     &rw_opt_shared_locale);
 }

Modified: stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp?rev=644088&r1=644087&r2=644088&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.num.put.mt.cpp Wed Apr  2 
15:12:41 2008
@@ -47,8 +47,18 @@
 // the number of times each thread should iterate
 int rw_opt_nloops = MAX_LOOPS;
 
+#if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32)
+
 // number of locales to use
-int rw_opt_nlocales = MAX_THREADS;
+int opt_nlocales = MAX_THREADS;
+
+#else   // HP-UX in LP64 mode
+
+// work around an inefficiency (small cache size?) on HP-UX
+// in LP64 mode (see STDCXX-812)
+int opt_nlocales = 10;
+
+#endif   // HP-UX 32/64 bit mode
 
 // should all threads share the same set of locale objects instead
 // of creating their own?
@@ -362,7 +372,7 @@
                      "failed to create locale(%#s)", name);
         }
 
-        if (nlocales == maxinx || nlocales == std::size_t (rw_opt_nlocales))
+        if (nlocales == maxinx || nlocales == std::size_t (opt_nlocales))
             break;
     }
 
@@ -452,7 +462,7 @@
                     &rw_opt_nloops,
                     int (MAX_THREADS),
                     &rw_opt_nthreads,
-                    &rw_opt_nlocales,
+                    &opt_nlocales,
                     &rw_opt_setlocales,
                     &rw_opt_shared_locale);
 }

Modified: stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp?rev=644088&r1=644087&r2=644088&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.numpunct.mt.cpp Wed Apr  2 
15:12:41 2008
@@ -49,8 +49,18 @@
 // otherwise on the command line)
 int rw_opt_nloops = 200000;
 
+#if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32)
+
 // number of locales to use
-int rw_opt_nlocales = MAX_THREADS;
+int opt_nlocales = MAX_THREADS;
+
+#else   // HP-UX in LP64 mode
+
+// work around an inefficiency (small cache size?) on HP-UX
+// in LP64 mode (see STDCXX-812)
+int opt_nlocales = 10;
+
+#endif   // HP-UX 32/64 bit mode
 
 // should all threads share the same set of locale objects instead
 // of creating their own?
@@ -228,7 +238,7 @@
                      "failed to create locale(%#s)", name);
         }
 
-        if (nlocales == maxinx || nlocales == std::size_t (rw_opt_nlocales))
+        if (nlocales == maxinx || nlocales == std::size_t (opt_nlocales))
             break;
     }
 
@@ -319,7 +329,7 @@
                     &rw_opt_nloops,
                     int (MAX_THREADS),
                     &rw_opt_nthreads,
-                    &rw_opt_nlocales,
+                    &opt_nlocales,
                     &rw_opt_setlocales,
                     &rw_opt_shared_locale);
 }

Modified: stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp
URL: 
http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp?rev=644088&r1=644087&r2=644088&view=diff
==============================================================================
--- stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp (original)
+++ stdcxx/trunk/tests/localization/22.locale.time.put.mt.cpp Wed Apr  2 
15:12:41 2008
@@ -50,8 +50,18 @@
 // the number of times each thread should iterate
 int rw_opt_nloops = MAX_LOOPS;
 
+#if !defined (_RWSTD_OS_HP_UX) || defined (_ILP32)
+
 // number of locales to use
-int rw_opt_nlocales = MAX_THREADS;
+int opt_nlocales = MAX_THREADS;
+
+#else   // HP-UX in LP64 mode
+
+// work around an inefficiency (small cache size?) on HP-UX
+// in LP64 mode (see STDCXX-812)
+int opt_nlocales = 10;
+
+#endif   // HP-UX 32/64 bit mode
 
 // should all threads share the same set of locale objects instead
 // of creating their own?
@@ -299,7 +309,7 @@
                      "failed to create locale(%#s)", name);
         }
 
-        if (nlocales == maxinx || nlocales == std::size_t (rw_opt_nlocales))
+        if (nlocales == maxinx || nlocales == std::size_t (opt_nlocales))
             break;
     }
 
@@ -389,7 +399,7 @@
                     &rw_opt_nloops,
                     int (MAX_THREADS),
                     &rw_opt_nthreads,
-                    &rw_opt_nlocales,
+                    &opt_nlocales,
                     &rw_opt_setlocales,
                     &rw_opt_shared_locale);
 }


Reply via email to