Integrate testcocoon support into QtQuickTest.

Add support to install and save coverage data when a test is run
using quick_test_main.

Change-Id: I39ddd678d748979c335139b3f8bda43b3d05720d
Reviewed-by: Rohan McGovern <d75463945f40a9669160a73cef2843e56b22c602@nokia.com>

--- src/qmltest/quicktest.cpp
+++ src/qmltest/quicktest.cpp
@@ -67,6 +67,35 @@
 #include <QtGui/QGuiApplication>
 #include <QtCore/QTranslator>
 QT_BEGIN_NAMESPACE
+
+static void installCoverageTool(const char * appname, const char * testname)
+{
+#ifdef __COVERAGESCANNER__
+    // Install Coverage Tool
+    __coveragescanner_install(appname);
+    __coveragescanner_testname(testname);
+    __coveragescanner_clear();
+#else
+    Q_UNUSED(appname);
+    Q_UNUSED(testname);
+#endif
+}
+
+static void saveCoverageTool(const char * appname, bool testfailed)
+{
+#ifdef __COVERAGESCANNER__
+    // install again to make sure the filename is correct.
+    // without this, a plugin or similar may have changed the filename.
+    __coveragescanner_install(appname);
+    __coveragescanner_teststate(testfailed ? "FAILED" : "PASSED");
+    __coveragescanner_save();
+    __coveragescanner_testname("");
+    __coveragescanner_clear();
+#else
+    Q_UNUSED(appname);
+    Q_UNUSED(testfailed);
+#endif
+}

 class QTestRootObject : public QObject
@@ -152,6 +181,8 @@
     QuickTestResult::parseArgs(argc, argv);
     QuickTestResult::setProgramName(name);

+    installCoverageTool(argv[0], name);
+
     QTranslator translator;
     if (!translationFile.isEmpty()) {
         if (translator.load(translationFile)) {
@@ -313,6 +344,8 @@
     // Flush the current logging stream.
     QuickTestResult::setProgramName(0);

+    saveCoverageTool(argv[0], QuickTestResult::exitCode());
+
     delete app;
     // Return the number of failures as the exit code.
     return QuickTestResult::exitCode();


INTEGRATION: CWS dba07 (1.25.4); FILE MERGED 2003/06/02 12:20:37 fs 1.25.4.1: #110018# queryAggregation: don't let the wrong base class steal the XTypeProvider interface

--- forms/source/component/ImageControl.cxx
+++ forms/source/component/ImageControl.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: ImageControl.cxx,v $
  *
- *  $Revision: 1.25 $
- *
- *  last change: $Author: vg $ $Date: 2003-05-23 09:05:47 $
+ *  $Revision: 1.26 $
+ *
+ *  last change: $Author: vg $ $Date: 2003-06-06 10:54:22 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -286,9 +286,13 @@
 {
     // oder matters: we want to "override" the XImageProducer interface of the aggreate with out
     // own XImageProducer interface, thus we need to query OImageControlModel_Base first
-
     Any aReturn = OImageControlModel_Base::queryInterface( _rType );
-    if (!aReturn.hasValue())
+
+    // BUT: _don't_ let it feel responsible for the XTypeProvider interface
+    // (as this is implemented by our base class in the proper way)
+    if  (   _rType.equals( ::getCppuType( static_cast< Reference< XTypeProvider >* >( NULL ) ) )
+        ||  !aReturn.hasValue()
+        )
         aReturn = OBoundControlModel::queryAggregation( _rType );

     return aReturn;


Removed unnecessary call.

Removed unnecessary call.

--- lexers/LexCPP.cxx
+++ lexers/LexCPP.cxx
@@ -851,7 +851,6 @@
 	if (definitionsChanged)
 		styler.ChangeLexerState(startPos, startPos + length);
 	sc.Complete();
-	styler.Flush();
 }

 // Store both the current line's fold level and the next lines in the


Light stuff.#

Light stuff.#

--- mo/Renderer.cpp
+++ mo/Renderer.cpp
@@ -42,16 +42,16 @@
                 "attribute vec3 position;\n"
                 "attribute vec3 normal;\n"
                 "attribute vec2 uv;\n"
-                "varying vec3 v_position;\n"
-                "varying vec3 v_normal\n;"
-                "varying vec3 v_position2;\n"
-                "varying vec2 v_uv;\n"
+                "varying vec3 fragment_position;\n"
+                "varying vec3 fragment_normal\n;"
+                "varying vec2 fragment_uv;\n"
+                "varying mat3 normal_matrix;\n"
                 "void main()\n"
                 "{\n"
-                "    v_uv = uv;\n"
-                "    v_position2 = normalize((model_view_projection * vec4(position, 1.0)).xyz);\n"
-                "    v_position = (model_view * vec4(position, 0.0)).xyz;\n"
-                "    v_normal = normalize((model_view * vec4(normal, 0.0)).xyz);\n"
+                "    fragment_uv = uv;\n"
+                "    fragment_position = (model_view * vec4(position, 0.0)).xyz;\n"
+                "    normal_matrix = transpose(inverse(mat3(model_view)));\n"
+                "    fragment_normal = normal_matrix * normal;\n"
                 "    gl_Position = model_view_projection * vec4(position, 1.0);\n"
                 "}\n";

@@ -63,22 +63,18 @@
                 "uniform float opacity;\n"
                 "uniform sampler2D texture;\n"
                 "uniform vec3 light_position;\n"
-                "varying vec3 v_position;\n"
-                "varying vec3 v_normal;\n"
-                "varying vec3 v_position2;\n"
-                "varying vec2 v_uv;\n"
+                "varying vec3 fragment_position;\n"
+                "varying vec3 fragment_normal;\n"
+                "varying vec2 fragment_uv;\n"
+
                 "void main() {\n"
-                "vec3 ambient = vec3(0.3, 0.3, 0.3);\n"
-                "float d = (v_position.z + 100.0)/5000.0;\n"
-
-                "vec3 light = normalize(light_position - v_position2);\n"
-                "float intensity = max(dot(v_normal,light), 0.0) * 0.2;\n"
-
-                "vec3 indirect = texture2D(texture, v_uv).rgb;\n"
-
-                "gl_FragColor = vec4(indirect + intensity, 1.0*opacity);\n"
-                "//gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n"
-
+                    "vec3 normal = normalize(fragment_normal);\n"
+                    "vec3 surface_to_light = light_position - fragment_position;\n"
+                    "float intensity = dot(normal, surface_to_light) / (length(surface_to_light) * length(normal));\n"
+                    "intensity = clamp(intensity, 0.0, 1.0);\n"
+                    "vec3 diffuse = texture2D(texture, fragment_uv).rgb;\n"
+
+                    "gl_FragColor = vec4(diffuse * intensity, 1.0*opacity);\n"
                 "}\n";

         addProgram("standard", standard_vertex_source, standard_fragment_source);
@@ -138,8 +134,9 @@
         auto mv_uniform = ogli::createUniform(program, "model_view");
         auto texture_uniform = ogli::createUniform(program, "texture");
         auto opacity_uniform = ogli::createUniform(program, "opacity");
-
-        programs_.insert(ProgramPair(path, ProgramData{program, mvp_uniform, mv_uniform, texture_uniform, opacity_uniform}));
+        auto light_uniform = ogli::createUniform(program, "light_position");
+
+        programs_.insert(ProgramPair(path, ProgramData{program, mvp_uniform, mv_uniform, texture_uniform, opacity_uniform, light_uniform}));
     }

     void Renderer::addProgram(const std::string path) {
@@ -166,7 +163,7 @@
             textures_.insert(std::pair<unsigned int, ogli::TextureBuffer>(model.texture->id(), texture));
         }

-        glm::mat4 mv = projection * view;
+        glm::mat4 mv = view * transform * model.transform();
         glm::mat4 mvp = projection * view * transform * model.transform();

         //ogli::useProgram(standard_program_);
@@ -179,13 +176,7 @@

         glActiveTexture(GL_TEXTURE0);
         glBindTexture(GL_TEXTURE_2D, textures_.at(model.texture->id()));
-
-        //TODO: General lighting, this is a hack.
-        glm::mat3 rot_mat(view);
-        glm::vec3 dir(view[3]);
-
-        glm::vec3 camera_pos = -dir * rot_mat;
-
+
         ogli::uniform(programs_.at(program_name).mvp, mvp);
         ogli::uniform(programs_.at(program_name).mv, mv);
         ogli::uniform(programs_.at(program_name).texture);


layers: Apply subpass 0 layout transitions at CmdBeginRenderPass

Signed-off-by: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -9267,6 +9267,9 @@
             pCB->framebuffers.insert(pRenderPassBegin->framebuffer);
             // Connect this framebuffer to this cmdBuffer
             framebuffer->cb_bindings.insert(pCB);
+
+            // transition attachments to the correct layouts for the first subpass
+            TransitionSubpassLayouts(dev_data, pCB, &pCB->activeRenderPassBeginInfo, pCB->activeSubpass);
         } else {
             skipCall |=
                     log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__,


Rebuilt strings file from updated source code files.

--- src/qt/bitcoinstrings.cpp
+++ src/qt/bitcoinstrings.cpp
@@ -13,14 +13,15 @@
 "%s, you must set a rpcpassword in the configuration file:\n"
 "%s\n"
 "It is recommended you use the following random password:\n"
-"rpcuser=bitcoinrpc\n"
+"rpcuser=dogecoinrpc\n"
 "rpcpassword=%s\n"
 "(you do not need to remember this password)\n"
 "The username and password MUST NOT be the same.\n"
 "If the file does not exist, create it with owner-readable-only file "
 "permissions.\n"
 "It is also recommended to set alertnotify so you are notified of problems;\n"
-"for example: alertnotify=echo %%s | mail -s \"Dogecoin Alert\" admin@foo.com\n"),
+"for example: alertnotify=echo %%s | mail -s \"Dogecoin Alert\" admin@foo."
+"com\n"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!"
 "3DES:@STRENGTH)"),
@@ -33,7 +34,7 @@
 "Bind to given address and always listen on it. Use [host]:port notation for "
 "IPv6"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Cannot obtain a lock on data directory %s. Dogecoin Core is probably already "
+"Cannot obtain a lock on data directory %s. Dogecoin is probably already "
 "running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Enter regression test mode, which uses a special chain in which blocks can "
@@ -43,6 +44,8 @@
 "Enter regression test mode, which uses a special chain in which blocks can "
 "be solved instantly."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Error: Listening for incoming connections failed (listen returned error %d)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: The transaction was rejected! This might happen if some of the coins "
 "in your wallet were already spent, such as if you used a copy of wallet.dat "
 "and coins were spent in the copy but not marked as spent here."),
@@ -59,7 +62,7 @@
 "Execute command when the best block changes (%s in cmd is replaced by block "
 "hash)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)"),
+"Listen for JSON-RPC connections on <port> (default: 22555 or testnet: 44555)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Number of seconds to keep misbehaving peers from reconnecting (default: "
 "86400)"),
@@ -74,7 +77,8 @@
 "This is a pre-release test build - use at your own risk - do not use for "
 "mining or merchant applications"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Unable to bind to %s on this computer. Dogecoin Core is probably already running."),
+"Unable to bind to %s on this computer. Dogecoin Core Daemon is probably "
+"already running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -"
 "proxy)"),
@@ -82,14 +86,14 @@
 "Warning: -paytxfee is set very high! This is the transaction fee you will "
 "pay if you send a transaction."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Warning: Displayed transactions may not be correct! You may need to upgrade, "
+"or other nodes may need to upgrade."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: Please check that your computer's date and time are correct! If "
-"your clock is wrong Dogecoin Core will not work properly."),
+"your clock is wrong Dogecoin will not work properly."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: The network does not appear to fully agree! Some miners appear to "
 "be experiencing issues."),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Warning: We do not appear to fully agree with our peers! You may need to "
-"upgrade, or other nodes may need to upgrade."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: error reading wallet.dat! All keys read correctly, but transaction "
 "data or address book entries might be missing or incorrect."),
@@ -108,9 +112,8 @@
 QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Allow JSON-RPC connections from specified IP address"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Allow peers to set bloom filters (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Dogecoin Core Daemon"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Dogecoin RPC client version"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -bind address: '%s'"),
@@ -119,19 +122,21 @@
 QT_TRANSLATE_NOOP("bitcoin-core", "Clear list of wallet transactions (diagnostic tool; implies -rescan)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect only to the specified node(s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect through SOCKS proxy"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Connect to JSON-RPC on <port> (default: 22555 or testnet: 44555)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Corrupted block database detected"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Do not load the wallet and disable wallet RPC calls"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Do you want to rebuild the block database now?"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Dogecoin Core Daemon"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Dogecoin RPC client version"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Done loading"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing wallet database environment %s!"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Dogecoin Core"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Dogecoin"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
@@ -166,7 +171,7 @@
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
 QT_TRANSLATE_NOOP("bitcoin-core", "List commands"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 8333 or testnet: 18333)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 22556 or testnet: 44556)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."),
@@ -192,17 +197,17 @@
 QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: server.cert)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: server.pem)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (default: 25)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to <n> (default: 100)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum block size in bytes (default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set minimum block size in bytes (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: 4)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Signing transaction failed"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: bitcoin.conf)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: dogecoin.conf)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify connection timeout in milliseconds (default: 5000)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify data directory"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: bitcoind.pid)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: dogecoind.pid)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: 1)"),
@@ -219,7 +224,7 @@
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -socks proxy version requested: %i"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Usage (deprecated, use bitcoin-cli):"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Usage (deprecated, use dogecoin-cli):"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Usage:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use OpenSSL (https) for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 0)"),


S-Record lexer: fix the description of the maximum data field digit count 500 was only true for S3 records with 32-bit address.

--- lexers/LexHex.cxx
+++ lexers/LexHex.cxx
@@ -13,20 +13,20 @@
  *
  * Each record (line) is built as follows:
  *
- *    field       size     states
+ *    field       digits          states
  *
  *  +----------+
- *  | start    |  1 ('S')  SCE_SREC_RECSTART
- *  +----------+
- *  | type     |  1        SCE_SREC_RECTYPE
- *  +----------+
- *  | count    |  2        SCE_SREC_BYTECOUNT, SCE_SREC_BYTECOUNT_WRONG
- *  +----------+
- *  | address  |  4/6/8    SCE_SREC_NOADDRESS, SCE_SREC_DATAADDRESS, SCE_SREC_RECCOUNT, SCE_SREC_STARTADDRESS, (SCE_SREC_ADDRESSFIELD_UNKNOWN)
- *  +----------+
- *  | data     |  0..500   SCE_SREC_DATA_ODD, SCE_SREC_DATA_EVEN, (SCE_SREC_DATA_UNKNOWN)
- *  +----------+
- *  | checksum |  2        SCE_SREC_CHECKSUM, SCE_SREC_CHECKSUM_WRONG
+ *  | start    |  1 ('S')         SCE_SREC_RECSTART
+ *  +----------+
+ *  | type     |  1               SCE_SREC_RECTYPE
+ *  +----------+
+ *  | count    |  2               SCE_SREC_BYTECOUNT, SCE_SREC_BYTECOUNT_WRONG
+ *  +----------+
+ *  | address  |  4/6/8           SCE_SREC_NOADDRESS, SCE_SREC_DATAADDRESS, SCE_SREC_RECCOUNT, SCE_SREC_STARTADDRESS, (SCE_SREC_ADDRESSFIELD_UNKNOWN)
+ *  +----------+
+ *  | data     |  0..504/502/500  SCE_SREC_DATA_ODD, SCE_SREC_DATA_EVEN, (SCE_SREC_DATA_UNKNOWN)
+ *  +----------+
+ *  | checksum |  2               SCE_SREC_CHECKSUM, SCE_SREC_CHECKSUM_WRONG
  *  +----------+
  */

@@ -251,7 +251,7 @@

 	byteCount = GetSrecByteCount(recStartPos, styler);

-	// sum over "byte count", "address" and "data" fields
+	// sum over "byte count", "address" and "data" fields (6..510 digits)
 	for (unsigned int pos = recStartPos + 2; pos < recStartPos + 2 + byteCount * 2; pos += 2) {
 		int val = GetHexaChar(pos, styler);


DOC: LocalStatisticExtraction application: description of the 4 extracted statistical moments

--- Applications/FeatureExtraction/otbLocalStatisticExtraction.cxx
+++ Applications/FeatureExtraction/otbLocalStatisticExtraction.cxx
@@ -55,11 +55,11 @@
 void DoInit()
 {
 SetName("LocalStatisticExtraction");
-SetDescription("Computes local statistics on every pixel of the input image selected channel");
+SetDescription("Computes local statistical moments on every pixel in the selected channel of the input image");

 // Documentation
 SetDocName("Local Statistic Extraction");
-SetDocLongDescription("This application computes local Statistics on a mono band image");
+SetDocLongDescription("This application computes the 4 local statistical moments on every pixel in the selected channel of the input image, over a specified neighborhood. The output image is multi band with one statistical moment (feature) per band. Thus, the 4 output features are the Mean, the Variance, the Skewness and the Kurtosis. They are provided in this exact order in the output image.");
 SetDocLimitations("None");
 SetDocAuthors("OTB-Team");
 SetDocSeeAlso("otbRadiometricMomentsImageFunction class");
@@ -83,7 +83,7 @@
 SetDefaultParameterInt("radius",3);

 AddParameter(ParameterType_OutputImage, "out", "Feature Output Image");
-SetParameterDescription("out", "Output image containing the local statistic features.");
+SetParameterDescription("out", "Output image containing the local statistical moments.");

 // Doc example parameter settings
 SetDocExampleParameterValue("in", "qb_RoadExtract.tif");


Fix VK_KHR_maintenance2 extended_usage_bit tests

Due to test runs over uncompressed formats it cannot include
VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR bit.
Remove this bit from the tests.

Update tests:
 * dEQP-VK.image.extended_usage_bit.*

Components: Vulkan

VK-GL-CTS issue: 673, 614

Change-Id: I0adb26c5306a9d5f49936ffef070050fd5936faa

--- external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp
+++ external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp
@@ -450,7 +450,7 @@
 {
 	const VkImageType			imageType				= mapImageType(type);
 	const VkImageCreateFlags	imageCreateFlagsBase	= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
-	const VkImageCreateFlags	imageCreateFlagsAddOn	= extendedImageCreateFlag ? VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR : 0;
+	const VkImageCreateFlags	imageCreateFlagsAddOn	= extendedImageCreateFlag ? VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR : 0;
 	const VkImageCreateFlags	imageCreateFlags		= imageCreateFlagsBase | imageCreateFlagsAddOn;

 	const VkImageCreateInfo createImageInfo =


no typename needed

no typename needed

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@1361 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- registration/include/pcl/registration/impl/ppf_registration.hpp
+++ registration/include/pcl/registration/impl/ppf_registration.hpp
@@ -90,7 +90,7 @@

   indices.clear ();
   HashKeyStruct key = HashKeyStruct (d1, d2, d3, d4);
-  std::pair <typename FeatureHashMapType::iterator, typename FeatureHashMapType::iterator> map_iterator_pair = feature_hash_map->equal_range (key);
+  std::pair <FeatureHashMapType::iterator, FeatureHashMapType::iterator> map_iterator_pair = feature_hash_map->equal_range (key);
   for (; map_iterator_pair.first != map_iterator_pair.second; ++ map_iterator_pair.first)
     indices.push_back (std::pair<size_t, size_t> (map_iterator_pair.first->second.first,
                                                   map_iterator_pair.first->second.second));


layers:Remove redundant check

layers:Remove redundant check

Object tracker layer already makes sure that cmd buffers passed into
vkCmdExecuteCommands() are valid so removing the duplicate check from
core_validation.

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -11240,13 +11240,8 @@
         GLOBAL_CB_NODE *pSubCB = NULL;
         for (uint32_t i = 0; i < commandBuffersCount; i++) {
             pSubCB = getCBNode(dev_data, pCommandBuffers[i]);
-            if (!pSubCB) {
-                skip_call |=
-                    log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0, __LINE__,
-                            VALIDATION_ERROR_00160, "DS",
-                            "vkCmdExecuteCommands() called w/ invalid Cmd Buffer 0x%p in element %u of pCommandBuffers array. %s",
-                            pCommandBuffers[i], i, validation_error_map[VALIDATION_ERROR_00160]);
-            } else if (VK_COMMAND_BUFFER_LEVEL_PRIMARY == pSubCB->createInfo.level) {
+            assert(pSubCB);
+            if (VK_COMMAND_BUFFER_LEVEL_PRIMARY == pSubCB->createInfo.level) {
                 skip_call |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, (VkDebugReportObjectTypeEXT)0, 0,
                                      __LINE__, VALIDATION_ERROR_00153, "DS",
                                      "vkCmdExecuteCommands() called w/ Primary Cmd Buffer 0x%p in element %u of pCommandBuffers "


Fix subnormal floats in extended image usage tests

When transcoding images in the extended image usage bit tests, Inf and
NaN were correctly taken into account and removed from input data.
However, subnormal floats were only being taken into account in the
32-bit float case.

The Vulkan spec regarding the precision and operation of SPIR-V
instructions mentions subnormal values may be flushed to zero in any
shader instruction, including the shader code to transcode images, and
have to be taken into account for half floats too.

Afffected tests:
dEQP-VK.image.extended_usage_bit.*

Components: Vulkan
VK-GL-CTS issue: 1747

Change-Id: I74a5d27b40f773f8d85e86a0a5d04eb0b4f16194
(cherry picked from commit 300b27043f8c93dcce4b3c788b33688ab59867af)

--- external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp
+++ external/vulkancts/modules/vulkan/image/vktImageTranscodingSupportTests.cpp
@@ -51,6 +51,7 @@
 #include "tcuTestLog.hpp"
 #include "tcuRGBA.hpp"
 #include "tcuSurface.hpp"
+#include "tcuFloat.hpp"

 #include <vector>
 #include <iomanip>
@@ -119,6 +120,37 @@
 	: TestInstance	(context)
 	, m_parameters	(parameters)
 {
+}
+
+// The templated functions below work with specializations of tcu::Float as class T. See "tcuFloat.hpp".
+
+// Return smallest floating point normal value preserving the existing sign bit.
+// The smallest normal value has the mantissa bits zeroed out and 1 as the exponent (tough constructBits() expects something else).
+template <class T>
+inline T SmallestFloat (T value)
+{
+	return T::constructBits(value.sign(), -(T::EXPONENT_BIAS - 1), typename T::StorageType(0u));
+}
+
+// Return the largest floating point normal value preserving the existing sign bit.
+// The largest normal value has the mantissa bits all set to 1 and the exponent set to the largest even value (see constructBits() for the details).
+template <class T>
+inline T LargestFloat (T value)
+{
+	return T::constructBits(value.sign(), T::EXPONENT_BIAS, typename T::StorageType((1<<T::MANTISSA_BITS)-1));
+}
+
+// Replace Infs and NaNs with the largest normal value.
+// Replace denormal numbers with the smallest normal value.
+// Leave the rest untouched.
+template <class T>
+void fixFloatIfNeeded(deUint8* ptr_)
+{
+	T* ptr = reinterpret_cast<T*>(ptr_);
+	if (ptr->isInf() || ptr->isNaN())
+		*ptr = LargestFloat<T>(*ptr);
+	else if (ptr->isDenorm())
+		*ptr = SmallestFloat<T>(*ptr);
 }

 void BasicTranscodingTestInstance::generateData (deUint8* toFill, size_t size, const VkFormat format)
@@ -227,31 +259,15 @@
 			if (textureFormat.type == tcu::TextureFormat::HALF_FLOAT)
 			{
 				for (size_t i = 0; i < size; i += 2)
-				{
-					// HALF_FLOAT fix: remove INF and NaN
-					if ((toFill[i+1] & 0x7C) == 0x7C)
-						toFill[i+1] = 0x00;
-				}
+					fixFloatIfNeeded<tcu::Float16>(toFill + i);
 			}
 			else if (textureFormat.type == tcu::TextureFormat::FLOAT)
 			{
 				for (size_t i = 0; i < size; i += 4)
-				{
-					// HALF_FLOAT fix: remove INF and NaN
-					if ((toFill[i+1] & 0x7C) == 0x7C)
-						toFill[i+1] = 0x00;
-				}
+					fixFloatIfNeeded<tcu::Float16>(toFill + i);

 				for (size_t i = 0; i < size; i += 4)
-				{
-					// FLOAT fix: remove INF, NaN, and denorm
-					// Little endian fix
-					if (((toFill[i+3] & 0x7F) == 0x7F && (toFill[i+2] & 0x80) == 0x80) || ((toFill[i+3] & 0x7F) == 0x00 && (toFill[i+2] & 0x80) == 0x00))
-						toFill[i+3] = 0x01;
-					// Big endian fix
-					if (((toFill[i+0] & 0x7F) == 0x7F && (toFill[i+1] & 0x80) == 0x80) || ((toFill[i+0] & 0x7F) == 0x00 && (toFill[i+1] & 0x80) == 0x00))
-						toFill[i+0] = 0x01;
-				}
+					fixFloatIfNeeded<tcu::Float32>(toFill + i);
 			}
 		}
 	}


Fixed invalid GLSL in openglunderqml example.

First argument to pow is not allowed to be negative.

Task-number: QTBUG-30191
Change-Id: Iac6c25d84e26777564d6741690aab552a0bb513e
Reviewed-by: Gunnar Sletta <d0b71651f3efaa9fda200bbcc395b7b82a871fdd@digia.com>

--- examples/quick/scenegraph/openglunderqml/squircle.cpp
+++ examples/quick/scenegraph/openglunderqml/squircle.cpp
@@ -108,7 +108,7 @@
                                            "uniform lowp float t;"
                                            "varying highp vec2 coords;"
                                            "void main() {"
-                                           "    lowp float i = 1. - (pow(coords.x, 4.) + pow(coords.y, 4.));"
+                                           "    lowp float i = 1. - (pow(abs(coords.x), 4.) + pow(abs(coords.y), 4.));"
                                            "    i = smoothstep(t - 0.8, t + 0.8, i);"
                                            "    i = floor(i * 20.) / 20.;"
                                            "    gl_FragColor = vec4(coords * .5 + .5, i, i);"


Finish documenting container concepts

Finish documenting container concepts

--- gears/concepts/container.hpp
+++ gears/concepts/container.hpp
@@ -163,23 +163,179 @@
 };
 } // detail

+/**
+ * @defgroup container_concepts Container concepts submodule
+ * @ingroup concepts
+ *
+ * @brief Concepts involving the standard C++ containers.
+ *
+ * @details A collection of concepts that deal with the semantics of
+ * what entails a C++ standard container or a type that meets similar
+ * requirements.
+ */
+
+
+/**
+ * @ingroup container_concepts
+ * @brief Checks if a type is a container.
+ * @details A Unary concept that checks if a type is a container.
+ *
+ * A type that meets this concept must provide the following
+ * typedefs:
+ *
+ * - `value_type`
+ * - `reference`
+ * - `const_reference`
+ * - `iterator`
+ * - `const_iterator`
+ * - `difference_type`
+ * - `size_type`
+ *
+ * It must meet the following concepts:
+ *
+ * - Destructible
+ * - Regular
+ * - EqualityComparable
+ * - Copyable
+ *
+ * The following expressions must be valid:
+ *
+ * @code
+ * auto a = x.begin();    // returns iterator or const_iterator
+ * auto b = x.end();     //  returns iterator or const_iterator
+ * auto c = x.cbegin()  //   returns const_iterator
+ * auto d = x.cend()   //    returns const_iterator
+ * x.swap(y);
+ * auto e = x.size()     //  returns size_type
+ * auto f = x.max_size(); // returns size_type
+ * bool g = x.empty();
+ * @endcode
+ *
+ * Where x and y are instances of T.
+ *
+ * There is a specialisation for `std::forward_list<T>` to make it a valid container.
+ *
+ * @tparam T Type to check.
+ */
 template<typename T>
 struct Container : And<Or<TraitOf<detail::is_container, T>,
                           TraitOf<detail::is_forward_list, T>>,
                        Regular<T>,
+                       EqualityComparable<T>,
+                       Copyable<T>,
                        Destructible<T>> {};

+/**
+ * @ingroup container_concepts
+ * @brief Checks if a type is a container that can be reversed.
+ * @details A Unary concept that checks if a type is a container that can be reversed.
+ *
+ * It must meet the Container concept. In addition to that, it must have the following
+ * typedefs defined:
+ *
+ * - `reverse_iterator`
+ * - `const_reverse_iterator`
+ *
+ * and the following expressions must be valid:
+ *
+ * @code
+ * auto a = x.rbegin();    // returns reverse_iterator or const_reverse_iterator
+ * auto b = x.rend();      // returns reverse_iterator or const_reverse_iterator
+ * auto c = x.crbegin();   // returns const_reverse_iterator
+ * auto d = x.crend();     // returns const_reverse_iterator
+ * @endcode
+ *
+ * Where x is an instance of T.
+ *
+ * @tparam T Type to check
+ */
 template<typename T>
 struct ReversibleContainer : And<Container<T>, TraitOf<detail::is_reversible, T>> {};

+/**
+ * @ingroup container_concepts
+ * @brief Checks if a type is a container with an allocator.
+ * @details A Unary concept that checks if a type is a container that has an allocator.
+ *
+ * It must meet the Container concept. In addition to that, it must have the
+ * `allocator_type` typedef defined and the following expression must be valid:
+ *
+ * @code
+ * auto a = x.get_allocator(); // returns allocator_type
+ * @endcode
+ *
+ * Where x is an instance of T.
+ *
+ * @tparam T Type to check
+ */
 template<typename T>
 struct AllocatorAwareContainer : And<Container<T>, TraitOf<detail::is_allocator_aware, T>> {};

+/**
+ * @ingroup container_concepts
+ * @brief Checks if a type is a sequence container.
+ * @details A Unary concept that checks if a type is a sequence container.
+ *
+ * It must meet the Container concept. In addition to that, the following expressions
+ * must be valid:
+ *
+ * @code
+ * T x(size_type{}, value_type{});
+ * T y(iterator{}, iterator{});
+ * iterator a = x.emplace(iterator{}, args...);
+ * iterator b = x.insert(iterator{}, value_type{});
+ * iterator c = x.insert(iterator{}, size_type{}, value_type{});
+ * iterator d = x.insert(iterator{}, iterator{}, iterator{});
+ * iterator e = x.erase(const_iterator{});
+ * iterator f = x.erase(const_iterator{}, const_iterator{});
+ * x.clear();
+ * x.assign(iterator{}, iterator{});
+ * x.assign(size_type{}, value_type{});
+ * @endcode
+ *
+ * @tparam T Type to check
+ */
 template<typename T>
 struct SequenceContainer : And<Container<T>, Or<TraitOf<detail::is_sequence_container, T>,
                                                 TraitOf<detail::is_array_sequence, T>,
                                                 TraitOf<detail::is_forward_list, T>>> {};

+/**
+ * @ingroup container_concepts
+ * @brief Checks if a type is an associative container.
+ * @details A Unary concept that checks if a type is an associative container.
+ *
+ * It must meet the Container concept. In addition, the following typedefs must
+ * be defined:
+ *
+ * - `key_type`
+ * - `key_compare`
+ * - `value_compare`
+ *
+ * and the following expressions must be valid:
+ *
+ * @code
+ * T x;
+ * key_compare kc = x.key_comp();
+ * value_compare vc = x.value_comp();
+ * iterator a = x.emplace(args...);
+ * iterator b = x.emplace_hint(iterator{}, args...);
+ * iterator c = x.insert(iterator{});
+ * iterator d = x.insert(iterator{}, value_type{});
+ * iterator e = x.insert(iterator{}, iterator{});
+ * iterator f = x.erase(const_iterator{});
+ * iterator g = x.erase(const_iterator{}, const_iterator{});
+ * size_type h = x.erase(key_type{});
+ * x.clear();
+ * iterator i = x.find(key_type{});
+ * size_type j = x.count(key_type{});
+ * iterator k = x.lower_bound(key_type{});
+ * iterator l = x.upper_bound(key_type{});
+ * std::pair<iterator, iterator> m = x.equal_range(key_type{});
+ * @endcode
+ *
+ * @tparam T Type to check.
+ */
 template<typename T>
 struct AssociativeContainer : And<Container<T>, TraitOf<detail::is_associative_container, T>> {};
 } // concepts


Return

Return

--- database.cc
+++ database.cc
@@ -582,7 +582,7 @@
 					break;
 				default:
 					LOG_ERR(this, "This type of Data has no support for range search\n");
-					return false;
+					return queryparser.parse_query("");;
 			}
 		} else {
 			switch (field_type(field_name)) {
@@ -598,7 +598,7 @@
 				field_value = timestamp_date(field_value);
 				if (field_value.size() == 0) {
 					LOG_DATABASE_WRAP(this, "ERROR: Didn't understand date specification.\n");
-					return false;
+					return queryparser.parse_query("");;
 				}
 				dfp = new DateFieldProcessor(prefix);
 				dfps.push_back(std::unique_ptr<DateFieldProcessor>(dfp));


Ensure that dinterval does not become 0 by accident.

--- src/object.cpp
+++ src/object.cpp
@@ -110,7 +110,7 @@
     counttab = ALLOC(Uint, n);
     upgraded = (Object *) NULL;
     uobjects = dobjects = mobjects = 0;
-    dinterval = (interval * 19) / 20;
+    dinterval = ((interval + 1) * 19) / 20;
     odcount = 1;
     obase = TRUE;
     recount = TRUE;


layers: Alias devExts in checkDeviceRegisterExtension

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -3505,18 +3505,20 @@

 static void checkDeviceRegisterExtensions(const VkDeviceCreateInfo *pCreateInfo, devExts *exts) {

-    static const std::pair<char const *, bool devExts::*> known_extensions[] {
-        {VK_KHR_SWAPCHAIN_EXTENSION_NAME, &devExts::khr_swapchain_enabled},
-        {VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, &devExts::khr_display_swapchain_enabled},
-        {VK_NV_GLSL_SHADER_EXTENSION_NAME, &devExts::nv_glsl_shader_enabled},
-        {VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, &devExts::khr_descriptor_update_template_enabled},
-        {VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, &devExts::khr_shader_draw_parameters_enabled},
-        {VK_KHR_MAINTENANCE1_EXTENSION_NAME, &devExts::khr_maintenance1_enabled},
-        {VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME, &devExts::nv_geometry_shader_passthrough_enabled},
-        {VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME, &devExts::nv_sample_mask_override_coverage_enabled},
-        {VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, &devExts::nv_viewport_array2_enabled},
-        {VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, &devExts::khr_subgroup_ballot_enabled},
-        {VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME, &devExts::khr_subgroup_vote_enabled},
+    using E = devExts;
+
+    static const std::pair<char const *, bool E::*> known_extensions[] {
+        {VK_KHR_SWAPCHAIN_EXTENSION_NAME, &E::khr_swapchain_enabled},
+        {VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, &E::khr_display_swapchain_enabled},
+        {VK_NV_GLSL_SHADER_EXTENSION_NAME, &E::nv_glsl_shader_enabled},
+        {VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, &E::khr_descriptor_update_template_enabled},
+        {VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, &E::khr_shader_draw_parameters_enabled},
+        {VK_KHR_MAINTENANCE1_EXTENSION_NAME, &E::khr_maintenance1_enabled},
+        {VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME, &E::nv_geometry_shader_passthrough_enabled},
+        {VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME, &E::nv_sample_mask_override_coverage_enabled},
+        {VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME, &E::nv_viewport_array2_enabled},
+        {VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME, &E::khr_subgroup_ballot_enabled},
+        {VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME, &E::khr_subgroup_vote_enabled},
     };

     for (auto ext : known_extensions) {


qt: PeerTableModel: Fix potential deadlock. #4296

--- src/qt/peertablemodel.cpp
+++ src/qt/peertablemodel.cpp
@@ -49,8 +49,8 @@

     /** Pull a full list of peers from vNodes into our cache */
     void refreshPeers() {
-        TRY_LOCK(cs_vNodes, lockNodes);
-        {
+        {
+            TRY_LOCK(cs_vNodes, lockNodes);
             if (!lockNodes)
             {
                 // skip the refresh if we can't immediately get the lock
@@ -70,8 +70,8 @@
         }

         // if we can, retrieve the CNodeStateStats for each node.
-        TRY_LOCK(cs_main, lockMain);
-        {
+        {
+            TRY_LOCK(cs_main, lockMain);
             if (lockMain)
             {
                 BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)


moved syncwrite creation to joint loop

moved syncwrite creation to joint loop

--- robotis_controller/src/robotis_controller/RobotisController.cpp
+++ robotis_controller/src/robotis_controller/RobotisController.cpp
@@ -137,19 +137,7 @@
         // We are iterating through ports, now we iterate through dxls in this port.
         for(std::map<std::string, Dynamixel*>::iterator _it = robot->dxls.begin(); _it != robot->dxls.end(); _it++)
         {
-            Dynamixel *_dxl = _it->second;
-            if(_dxl->port_name == _port_name){
-
-                PacketHandler  *_dxl_pkt_handler = PacketHandler::GetPacketHandler(_dxl->protocol_version);
-
-                std::pair<std::string,std::string> key = std::make_pair(_dxl->port_name,_dxl->model_name);
-
-                if(port_to_sync_write_position.count(key) == 0) //If the key is not already in the map
-                    port_to_sync_write_position[key] = new GroupSyncWrite(_port,
-                                                                          _dxl_pkt_handler,
-                                                                          _dxl->goal_position_item->address,
-                                                                          _dxl->goal_position_item->data_length);
-            }
+

         }

@@ -167,6 +155,8 @@
 //                                                                         _default_device->goal_position_item->address,
 //                                                                         _default_device->goal_position_item->data_length);

+
+            // TODO rewrite velocity and torque as done with position
             port_to_sync_write_velocity[_port_name] = new GroupSyncWrite(_port,
                                                                          _default_pkt_handler,
                                                                          _default_device->goal_velocity_item->address,
@@ -199,6 +189,19 @@
             if(resp != 0)
                 ROS_ERROR_STREAM("Joint " << _joint_name << " does not respond. Code: " << resp);
         }
+
+        // TODO do not create groupsyncwrite if ping failed
+
+        PacketHandler  *_dxl_pkt_handler = PacketHandler::GetPacketHandler(_dxl->protocol_version);
+        PortHandler    *_port            = robot->ports[_dxl->port_name];
+
+        std::pair<std::string,std::string> key = std::make_pair(_dxl->port_name,_dxl->model_name);
+
+        if(port_to_sync_write_position.count(key) == 0) //If the key is not already in the map
+            port_to_sync_write_position[key] = new GroupSyncWrite(_port,
+                                                                  _dxl_pkt_handler,
+                                                                  _dxl->goal_position_item->address,
+                                                                  _dxl->goal_position_item->data_length);
     }

     InitDevice(init_file_path);


database: Disable sstable filtering based on min/max clustering key components

With DateTiered and TimeWindow, there is a read optimization enabled
which excludes sstables based on overlap with recorded min/max values
of clustering key components. The problem is that it doesn't take into
account partition tombstones and static rows, which should still be
returned by the reader even if there is no overlap in the query's
clustering range. A read which returns no clustering rows can
mispopulate cache, which will appear as partition deletion or writes
to the static row being lost. Until node restart or eviction of the
partition entry.

There is also a bad interaction between cache population on read and
that optimization. When the clustering range of the query doesn't
overlap with any sstable, the reader will return no partition markers
for the read, which leads cache populator to assume there is no
partition in sstables and it will cache an empty partition. This will
cause later reads of that partition to miss prior writes to that
partition until it is evicted from cache or node is restarted.

Disable until a more elaborate fix is implemented.

Fixes #3552
Fixes #3553

--- database.cc
+++ database.cc
@@ -383,9 +383,13 @@
     };
     sstables.erase(boost::remove_if(sstables, sstable_has_not_key), sstables.end());

+    // FIXME: Workaround for https://github.com/scylladb/scylla/issues/3552
+    // and https://github.com/scylladb/scylla/issues/3553
+    const bool filtering_broken = true;
+
     // no clustering filtering is applied if schema defines no clustering key or
     // compaction strategy thinks it will not benefit from such an optimization.
-    if (!schema->clustering_key_size() || !cf.get_compaction_strategy().use_clustering_key_filter()) {
+    if (filtering_broken || !schema->clustering_key_size() || !cf.get_compaction_strategy().use_clustering_key_filter()) {
          return sstables;
     }
     ::cf_stats* stats = cf.cf_stats();


Update the warning message in implementation_selector to VLOG.

This warning is most likely to be thrown when the tf function has been updated by the function optimizer, and then reaching implementation_selector with a new signature. At that time, the optimization is ready done, but the warning message gives user a wrong impression.

Change it VLOG so that we can still see the information when we debug.

PiperOrigin-RevId: 263786180

--- tensorflow/core/grappler/optimizers/implementation_selector.cc
+++ tensorflow/core/grappler/optimizers/implementation_selector.cc
@@ -307,8 +307,8 @@
   // function_optimizer from previous runs, which will fail due to function
   // signature mismatch.
   if (!status.ok()) {
-    LOG(WARNING) << "Skipping optimization due to error while loading function "
-                 << "libraries: " << status;
+    VLOG(2) << "Skipping optimization due to error while loading function "
+            << "libraries: " << status;
     return errors::Aborted("Skipped Optimization");
   }
   *optimized_graph = item.graph;


Fix non-idempotent modification in JSObject::AddFastProperty.

R=verwaest@chromium.org
BUG=mozilla/ecma/Array/15.4.5.2-2

Review URL: https://codereview.chromium.org/15955010

git-svn-id: b158db1e4b4ab85d4c9e510fdef4b1e8c614b15b@14902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

--- src/objects.cc
+++ src/objects.cc
@@ -1824,14 +1824,17 @@

   Heap* heap = isolate->heap();

-  Map* new_map;
-  MaybeObject* maybe_new_map = map()->CopyAddDescriptor(&new_field, flag);
-  if (!maybe_new_map->To(&new_map)) return maybe_new_map;
-
   Object* storage;
   MaybeObject* maybe_storage =
       value->AllocateNewStorageFor(heap, representation);
   if (!maybe_storage->To(&storage)) return maybe_storage;
+
+  // Note that Map::CopyAddDescriptor has side-effects, the new map is already
+  // inserted in the transition tree. No more allocations that might fail are
+  // allowed after this point.
+  Map* new_map;
+  MaybeObject* maybe_new_map = map()->CopyAddDescriptor(&new_field, flag);
+  if (!maybe_new_map->To(&new_map)) return maybe_new_map;

   if (map()->unused_property_fields() == 0) {
     ASSERT(values != NULL);


fix bug with GetModelConfig() in CCLanePostProcessor uni-test

--- modules/perception/obstacle/camera/lane_post_process/cc_lane_post_processor/cc_lane_post_processor_test.cc
+++ modules/perception/obstacle/camera/lane_post_process/cc_lane_post_processor/cc_lane_post_processor_test.cc
@@ -92,12 +92,12 @@
   ConfigManager *config_manager = ConfigManager::instance();
   const ModelConfig *model_config
       = config_manager->GetModelConfig(cc_lane_post_processor_->name());
-  //<< "not found model: " << cc_lane_post_processor_->name();

   float lane_map_conf_thresh = 0.5f;
   CHECK(model_config->GetValue("lane_map_confidence_thresh",
                                &lane_map_conf_thresh))
   << "the confidence threshold of label map not found.";
+  AINFO << "lane_map_conf_thresh = " << lane_map_conf_thresh;

   LaneObjectsPtr lane_objects = std::make_shared<LaneObjects>();
   CameraLanePostProcessOptions lane_post_process_options;


create data reader disabled + enable it

create data reader disabled + enable it

git-svn-id: afcf11d89342f630bd950d18a70234a9e277d909@168233 523d945c-050c-4681-91ec-863ad3bb968a

--- LGPL/CommonSoftware/bulkDataNT/src/bulkDataNTDDSSubscriber.cpp
+++ LGPL/CommonSoftware/bulkDataNT/src/bulkDataNTDDSSubscriber.cpp
@@ -16,7 +16,7 @@
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 *
-* "@(#) $Id: bulkDataNTDDSSubscriber.cpp,v 1.18 2012/01/19 15:34:39 bjeram Exp $"
+* "@(#) $Id: bulkDataNTDDSSubscriber.cpp,v 1.19 2012/01/19 15:53:55 bjeram Exp $"
 *
 * who       when      what
 * --------  --------  ----------------------------------------------
@@ -55,6 +55,7 @@
 {
 	AUTO_TRACE(__PRETTY_FUNCTION__);
 	DDS::ReturnCode_t ret;
+	DDS::SubscriberQos sub_qos;

 	if (participant_m==NULL)
 	{
@@ -70,6 +71,27 @@
 		DDSSubscriberCreateProblemExImpl ex(__FILE__, __LINE__, __PRETTY_FUNCTION__);
 		throw ex;
 	}
+
+	ret = sub->get_qos(sub_qos);
+	if (ret!=DDS::RETCODE_OK)
+	{
+		DDSQoSGetProblemExImpl ex(__FILE__, __LINE__, __PRETTY_FUNCTION__);
+		ex.setDDSTypeCode(ret);
+		ex.setQoS("sub->get_qos()");
+		throw ex;
+	}//if
+
+	/// dr has to be created disabled
+	sub_qos.entity_factory.autoenable_created_entities=DDS_BOOLEAN_FALSE;
+
+	ret = sub->set_qos(sub_qos);
+	if (ret!=DDS::RETCODE_OK)
+	{
+		DDSQoSSetProblemExImpl ex(__FILE__, __LINE__, __PRETTY_FUNCTION__);
+		ex.setDDSTypeCode(ret);
+		ex.setQoS("sub->set_qos()");
+		throw ex;
+	}//if

 	ret = sub->enable();
 	if (ret!=DDS::RETCODE_OK)
@@ -98,6 +120,7 @@
 ACSBulkData::BulkDataNTFrameDataReader* BulkDataNTDDSSubscriber::createDDSReader(DDS::Topic *topic, DDS::DataReaderListener *listener)
 {
 	AUTO_TRACE(__PRETTY_FUNCTION__);
+	DDS::ReturnCode_t ret;

 	if (subscriber_m==NULL || topic==NULL || listener==NULL)
 	{
@@ -115,6 +138,42 @@
 		DDSDRCreateProblemExImpl ex(__FILE__, __LINE__, __PRETTY_FUNCTION__);
 		throw ex;
 	}//if
+/*
+	if (noOfReaders==1)
+			{
+				//multicast
+				struct DDS_TransportMulticastSettings_t* multicast_locator = NULL;
+				// DDS_TransportMulticastSettingsSeq_ensure_length(&, 1, 1);
+				dr_qos.multicast.value.ensure_length(1,1);
+				// DDS_TransportMulticastSettingsSeq_get_reference(&qos.multicast.value,0);
+				multicast_locator = &dr_qos.multicast.value[0];
+
+				string mcasta="225.3.2.1";
+				DDS_String_replace(&multicast_locator->receive_address,	mcasta.c_str()	);
+				cout << "going to listen on multicast address: " << mcasta << endl;
+
+
+				dr_qos.resource_limits.initial_samples *= 1;//multicast_reader_count;
+				if (dr_qos.resource_limits.initial_samples >
+					dr_qos.resource_limits.max_samples) {
+					dr_qos.resource_limits.max_samples =
+							dr_qos.resource_limits.initial_samples;
+				}
+				dr_qos.reader_resource_limits.max_samples_per_remote_writer =
+						dr_qos.resource_limits.initial_samples;
+			}
+			else
+			{
+				dr_qos.unicast.value.ensure_length(1,1);
+			}
+
+*/
+	ret = dr->enable();
+	if (ret!=DDS::RETCODE_OK)
+	{
+		DDSDREnableProblemExImpl ex(__FILE__, __LINE__, __PRETTY_FUNCTION__);
+		ex.setDDSTypeCode(ret);
+	}

 	return ACSBulkData::BulkDataNTFrameDataReader::narrow(dr);
 }


Commit of correction to Kepler propagator unit test.

git-svn-id: 4d207786bcfdcf18f314dcbc6ac3fbe5f8a98c88@233 ac7aa084-b6da-11df-bf42-7fac39f0224f

--- Astrodynamics/Propagators/unitTestKeplerPropagator.cpp
+++ Astrodynamics/Propagators/unitTestKeplerPropagator.cpp
@@ -57,6 +57,7 @@
 #include "Astrodynamics/Bodies/celestialBody.h"
 #include "Astrodynamics/Bodies/planet.h"
 #include "Astrodynamics/Bodies/vehicle.h"
+#include "Astrodynamics/EnvironmentModels/centralGravityField.h"
 #include "Astrodynamics/Propagators/keplerPropagator.h"
 #include "Astrodynamics/Propagators/seriesPropagator.h"
 #include "Astrodynamics/States/cartesianElements.h"
@@ -157,9 +158,15 @@
     // Create a pointer to new vehicle for Asterix.
     Vehicle asterix;

-    // Create pre-defined Earth object.
-    Planet predefinedEarth;
-    predefinedEarth.setPredefinedPlanetSettings( Planet::earth );
+    // Create Earth central gravity field.
+    CentralGravityField earthCentralGravityField;
+
+    // Set Earth gravitational parameter.
+    earthCentralGravityField.setGravitationalParameter( 3.986004415e14 );
+
+    // Create Earth object and set central gravity field.
+    Planet earth;
+    earth.setGravityFieldModel( &earthCentralGravityField );

     // Create Newton-Raphson object.
     NewtonRaphson newtonRaphson;
@@ -174,7 +181,7 @@
     keplerPropagator.addBody( &asterix );

     // Set the central body for Asterix
-    keplerPropagator.setCentralBody( &asterix, &predefinedEarth );
+    keplerPropagator.setCentralBody( &asterix, &earth );

     // Create series propagator.
     SeriesPropagator seriesPropagator;
@@ -213,25 +220,25 @@
     }

     // Declare tolerance between benchmark data and simulation data.
-    double toleranceBetweenBenchmarkAndSimulationData = 1e-6;
+    double toleranceBetweenBenchmarkAndSimulationData = 1e-5;

     // Declare difference between benchmark data and simulation data.
     double differenceKeplerData;

     // Check if results match benchmark data.
-    for ( unsigned int i = 0; i < ( seriesPropagator.getSeriesPropagationStart( )
+    for ( unsigned int i = 1; i < ( seriesPropagator.getSeriesPropagationEnd( )
                                     / seriesPropagator.getFixedOutputInterval( ) ); i++ )
     {
         // Initialize difference in data.
         differenceKeplerData = 0.0;

-        for ( unsigned int i = 0; i < 6; i++ )
+        for ( unsigned int j = 0; j < 6; j++ )
         {
             differenceKeplerData += std::fabs(
                         asterixKeplerPropagationHistory[ i * seriesPropagator
-                        .getFixedOutputInterval( ) ].state( i )
+                        .getFixedOutputInterval( ) ].state( j )
                         - benchmarkKeplerPropagationHistory[  i * seriesPropagator
-                        .getFixedOutputInterval( ) ].state( i ) );
+                        .getFixedOutputInterval( ) ].state( j ) );
         }

         if ( differenceKeplerData > toleranceBetweenBenchmarkAndSimulationData )
@@ -241,6 +248,13 @@
             std::cerr << "The Kepler propagator does not produce consistent results, as running a "
                       << "simulation with does not yield the same results as the benchmark data "
                       << "given the same initial conditions." << std::endl;
+            std::cerr << "Expected: " << benchmarkKeplerPropagationHistory
+                         [ i * seriesPropagator.getFixedOutputInterval( ) ].state.transpose( )
+                      << std::endl
+                      << "Actual: " << asterixKeplerPropagationHistory
+                         [ i * seriesPropagator.getFixedOutputInterval( ) ].state.transpose( )
+                      << std::endl
+                      << "Difference: " << differenceKeplerData << std::endl;
         }
     }


layers: Tidy decrementResources a bit

layers: Tidy decrementResources a bit

Change-Id: Ib8f9a917115323d8d43b971593b213ff04138a35
Signed-off-by: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -4275,12 +4275,12 @@
     }
     for (auto fence_pair : fence_pairs) {
         for (auto queue : fence_pair.second->queues) {
-            auto queue_pair = my_data->queueMap.find(queue);
-            if (queue_pair != my_data->queueMap.end()) {
+            auto pQueue = getQueueNode(my_data, queue);
+            if (pQueue) {
                 auto last_fence_data =
-                    std::find(queue_pair->second.lastFences.begin(), queue_pair->second.lastFences.end(), fence_pair.first);
-                if (last_fence_data != queue_pair->second.lastFences.end())
-                    queue_pair->second.lastFences.erase(last_fence_data);
+                    std::find(pQueue->lastFences.begin(), pQueue->lastFences.end(), fence_pair.first);
+                if (last_fence_data != pQueue->lastFences.end())
+                    pQueue->lastFences.erase(last_fence_data);
             }
         }
         for (auto& fence_data : my_data->fenceMap) {
@@ -5467,12 +5467,12 @@
     bool skipCall = false;
     std::unique_lock<std::mutex> lock(global_lock);
     for (uint32_t i = 0; i < fenceCount; ++i) {
-        auto fence_item = dev_data->fenceMap.find(pFences[i]);
-        if (fence_item != dev_data->fenceMap.end()) {
-            fence_item->second.needsSignaled = true;
-            fence_item->second.queues.clear();
-            fence_item->second.priorFences.clear();
-            if (fence_item->second.in_use.load()) {
+        auto pFence = getFenceNode(dev_data, pFences[i]);
+        if (pFence) {
+            pFence->needsSignaled = true;
+            pFence->queues.clear();
+            pFence->priorFences.clear();
+            if (pFence->in_use.load()) {
                 skipCall |=
                     log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT,
                             reinterpret_cast<const uint64_t &>(pFences[i]), __LINE__, DRAWSTATE_INVALID_FENCE, "DS",


qt, refactor: Use enum type as switch argument in PeerTableModel

--- src/qt/peertablemodel.cpp
+++ src/qt/peertablemodel.cpp
@@ -23,8 +23,7 @@
     if (order == Qt::DescendingOrder)
         std::swap(pLeft, pRight);

-    switch(column)
-    {
+    switch (static_cast<PeerTableModel::ColumnIndex>(column)) {
     case PeerTableModel::NetNodeId:
         return pLeft->nodeid < pRight->nodeid;
     case PeerTableModel::Address:
@@ -41,9 +40,8 @@
         return pLeft->nRecvBytes < pRight->nRecvBytes;
     case PeerTableModel::Subversion:
         return pLeft->cleanSubVer.compare(pRight->cleanSubVer) < 0;
-    }
-
-    return false;
+    } // no default case, so the compiler can warn about missing cases
+    assert(false);
 }

 // private implementation
@@ -157,9 +155,9 @@

     CNodeCombinedStats *rec = static_cast<CNodeCombinedStats*>(index.internalPointer());

+    const auto column = static_cast<ColumnIndex>(index.column());
     if (role == Qt::DisplayRole) {
-        switch(index.column())
-        {
+        switch (column) {
         case NetNodeId:
             return (qint64)rec->nodeStats.nodeid;
         case Address:
@@ -177,19 +175,24 @@
             return GUIUtil::formatBytes(rec->nodeStats.nRecvBytes);
         case Subversion:
             return QString::fromStdString(rec->nodeStats.cleanSubVer);
-        }
+        } // no default case, so the compiler can warn about missing cases
+        assert(false);
     } else if (role == Qt::TextAlignmentRole) {
-        switch (index.column()) {
-            case ConnectionType:
-            case Network:
-                return QVariant(Qt::AlignCenter);
-            case Ping:
-            case Sent:
-            case Received:
-                return QVariant(Qt::AlignRight | Qt::AlignVCenter);
-            default:
-                return QVariant();
-        }
+        switch (column) {
+        case NetNodeId:
+        case Address:
+            return {};
+        case ConnectionType:
+        case Network:
+            return QVariant(Qt::AlignCenter);
+        case Ping:
+        case Sent:
+        case Received:
+            return QVariant(Qt::AlignRight | Qt::AlignVCenter);
+        case Subversion:
+            return {};
+        } // no default case, so the compiler can warn about missing cases
+        assert(false);
     } else if (role == StatsRole) {
         switch (index.column()) {
         case NetNodeId: return QVariant::fromValue(rec);


bumped up symbolic enrich

bumped up symbolic enrich

--- cpp/enrichment_symbolic.cpp
+++ cpp/enrichment_symbolic.cpp
@@ -1 +1 @@
-#include "enrichment_symbolic10.cpp"
+#include "enrichment_symbolic40.cpp"


-- some more research on object creation

git-svn-id: 526f3b90ad6d9b1dfe840af828070ca3d99521ac@9160 d2cacbed-c0f6-0310-851a-9dad52fc623a

--- experiments/people/bayer/turpitude/src/native/src/Turpitude.cpp
+++ experiments/people/bayer/turpitude/src/native/src/Turpitude.cpp
@@ -1,4 +1,34 @@
 #include <Turpitude.h>
+
+void htdebug(HashTable* ht) {
+    printf("HTDEBUG: \n");
+    zval** hashval;
+    HashPosition pos;
+    // reset and iterate on HashTable
+    zend_hash_internal_pointer_reset_ex(ht, &pos);
+    while (zend_hash_get_current_data_ex(ht, (void **) &hashval, &pos) == SUCCESS) {
+        char* key_name;
+        ulong num_key;
+        uint  str_len;
+
+        printf("key: ");
+        // extract current key
+        switch (zend_hash_get_current_key_ex(ht, &key_name, &str_len, &num_key, 0, &pos)) {
+            case HASH_KEY_IS_STRING:
+                printf("string: %s\n", key_name);
+            break;
+            case HASH_KEY_IS_LONG:
+                printf("long: %d\n", num_key);
+            break;
+        }
+        //efree(key_name);
+        //printf("val - type: %d", Z_TYPE_P(*hashval));
+        //printf("\n");
+        // value object
+        // insert pair into hashmap
+        zend_hash_move_forward_ex(ht, &pos);
+    }
+}

 zval* generateTurpitudeContext(JNIEnv* env, jobject ctx) {
     zval* context;
@@ -24,6 +54,8 @@
     ce->doc_comment_len = 0;

+    //zend_hash_update - add class to global class directory?
+
     //zend_object_std_init(ce);
     // how to create a class entry?

@@ -113,7 +145,13 @@
             zend_object_value* zo = &(val->value.obj);

             // ############ remove
-            printf("=====> %s\n", ce->doc_comment);
+            printf("=====> \n");
+            htdebug(&(ce->function_table));
+            htdebug(&(ce->default_properties));
+            htdebug(&(ce->properties_info));
+            htdebug(&(ce->default_static_members));
+            htdebug(ce->static_members);
+            htdebug(&(ce->constants_table));
             // ############ remove

             // allocate class and object


db: mark newly created sstables as unshared

Other shards know nothing about them, so they won't mark them for deletion
when the time comes.

--- database.cc
+++ database.cc
@@ -459,6 +459,7 @@
         sstables::sstable::version_types::ka,
         sstables::sstable::format_types::big);

+    newtab->set_unshared();
     dblog.debug("Flushing to {}", newtab->get_filename());
     return newtab->write_components(*old).then([this, newtab, old] {
         return newtab->load();
@@ -544,6 +545,7 @@
             auto sst = make_lw_shared<sstables::sstable>(_schema->ks_name(), _schema->cf_name(), _config.datadir, gen,
                     sstables::sstable::version_types::ka,
                     sstables::sstable::format_types::big);
+            sst->set_unshared();
             new_tables->emplace_back(gen, sst);
             return sst;
     };


Updated resolve_svdf.cc

Updated resolve_svdf.cc

Fixed warning in the file

--- tensorflow/lite/toco/tensorflow_graph_matching/resolve_svdf.cc
+++ tensorflow/lite/toco/tensorflow_graph_matching/resolve_svdf.cc
@@ -186,7 +186,7 @@
       allocated_tensor->mutable_tensor_shape();
   auto tensor_shape_dim0 = allocated_tensor_shape->add_dim();
   int allocated_content_flat_size = 0;
-  for (int i = 0; i < const_node_parts.size(); i++) {
+  for (size_t i = 0; i < const_node_parts.size(); i++) {
     const auto& value_attr = const_node_parts[i]->attr().at("value");
     const tensorflow::TensorProto& tensor = value_attr.tensor();
     if (i == 0) {
@@ -214,7 +214,7 @@
   std::unique_ptr<char[]> allocated_content(
       new char[allocated_content_flat_size]);
   char* content_ptr = allocated_content.get();
-  for (int i = 0; i < const_node_parts.size(); i++) {
+  for (size_t i = 0; i < const_node_parts.size(); i++) {
     const auto& value_attr = const_node_parts[i]->attr().at("value");
     const tensorflow::TensorProto& tensor = value_attr.tensor();
     port::CopyToBuffer(tensor.tensor_content(), content_ptr);


INTEGRATION: CWS ooo19126 (1.4.134); FILE MERGED 2005/09/05 13:24:29 rt 1.4.134.1: #i54170# Change license header: remove SISSL

--- sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
+++ sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
@@ -1,61 +1,35 @@
 /*************************************************************************
  *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
  *  $RCSfile: SlsScrollBarManager.hxx,v $
  *
- *  $Revision: 1.4 $
- *
- *  last change: $Author: obo $ $Date: 2005-04-12 16:58:40 $
- *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
- *
- *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
- *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
- *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *  $Revision: 1.5 $
+ *
+ *  last change: $Author: rt $ $Date: 2005-09-09 06:19:30 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/


db: prevent latency spikes during streaming/repair

The memtable destructor can take a long time if the memtable is full; use
clear_gently() to clear it without impacting latency.

Fixes #2477.
Message-Id: <e68d511acb8703644fa8b0de728a1599f00b77b3@scylladb.com>

--- database.cc
+++ database.cc
@@ -877,7 +877,8 @@
             }).then([this, old, newtab] () {
                 add_sstable(newtab, {engine().cpu_id()});
                 trigger_compaction();
-            }).handle_exception([] (auto ep) {
+                return old->clear_gently();
+            }).handle_exception([old] (auto ep) {
                 dblog.error("failed to write streamed sstable: {}", ep);
                 return make_exception_future<>(ep);
             });


minor clenaups to IntervalTimer::Manager

--- Library/Sources/Stroika/Foundation/Execution/IntervalTimer.cpp
+++ Library/Sources/Stroika/Foundation/Execution/IntervalTimer.cpp
@@ -122,16 +122,19 @@

 void IntervalTimer::Manager::DefaultRep::AddOneShot (const TimerCallback& intervalTimer, const Time::Duration& when)
 {
+    AssertNotNull (fHiddenRep_);
     fHiddenRep_->AddOneShot (intervalTimer, when);
 }

 void IntervalTimer::Manager::DefaultRep::AddRepeating (const TimerCallback& intervalTimer, const Time::Duration& repeatInterval, const optional<Time::Duration>& hysteresis)
 {
+    AssertNotNull (fHiddenRep_);
     fHiddenRep_->AddRepeating (intervalTimer, repeatInterval, hysteresis);
 }

 void IntervalTimer::Manager::DefaultRep::RemoveRepeating (const TimerCallback& intervalTimer) noexcept
 {
+    AssertNotNull (fHiddenRep_);
     fHiddenRep_->RemoveRepeating (intervalTimer);
 }

@@ -143,11 +146,11 @@
 IntervalTimer::Manager::Activator::Activator ()
 {
     Require (Manager::sThe.fRep_ == nullptr); // only one activator object allowed
-    Manager::sThe = move (Manager{make_shared<IntervalTimer::Manager::DefaultRep> ()});
+    Manager::sThe = Manager{make_shared<IntervalTimer::Manager::DefaultRep> ()};
 }

 IntervalTimer::Manager::Activator::~Activator ()
 {
-    Require (Manager::sThe.fRep_ != nullptr); // this is the only way to remove, and so must not be null here
+    RequireNotNull (Manager::sThe.fRep_); // this is the only way to remove, and so must not be null here
     Manager::sThe.fRep_.reset ();
 }


[C] add missing include.

[C] add missing include.

--- aeron-driver/src/test/c/aeron_flow_control_test.cpp
+++ aeron-driver/src/test/c/aeron_flow_control_test.cpp
@@ -14,6 +14,7 @@
  * limitations under the License.
  */

+#include <array>
 #include <gtest/gtest.h>

 extern "C"


[TF:XLA] Do not rely on implementation-defined semantics of DynamicSlice.

ReverseSequence relies on DynamicSlice wrapping around, which is implementation-defined behavior, and is not guaranteed. Pad the input instead.

PiperOrigin-RevId: 197043307

--- tensorflow/compiler/tf2xla/kernels/reverse_sequence_op.cc
+++ tensorflow/compiler/tf2xla/kernels/reverse_sequence_op.cc
@@ -106,20 +106,40 @@
           seq_lens, body_builder->Reshape(i, {1}), {1});

       // Indices is the offset of the batch element in the input.
-      auto indices = body_builder->Broadcast(
+      auto batch_element_indices = body_builder->Broadcast(
           XlaHelpers::Zero(body_builder.get(), seq_lens_type),
           {input_shape.dims()});
-      indices = body_builder->DynamicUpdateSlice(
-          indices, body_builder->Reshape(i, {1}),
+      batch_element_indices = body_builder->DynamicUpdateSlice(
+          batch_element_indices, body_builder->Reshape(i, {1}),
           body_builder->Reshape(
               XlaHelpers::IntegerLiteral(body_builder.get(), seq_lens_type,
                                          batch_dim_),
               {1}));

-      // slice_indices is the offset of the start of the reversed sequence in
-      // the input.
-      auto slice_indices = body_builder->DynamicUpdateSlice(
-          indices,
+      // Slice out the current batch element and pad it out in the sequence
+      // dimension.
+      TensorShape slice_shape = input_shape;
+      slice_shape.set_dim(batch_dim_, 1);
+      slice_shape.set_dim(seq_dim_, max_seq_len);
+      auto slice = body_builder->DynamicSlice(output, batch_element_indices,
+                                              slice_shape.dim_sizes());
+      auto padding_config = xla::MakeNoPaddingConfig(slice_shape.dims());
+      padding_config.mutable_dimensions(seq_dim_)->set_edge_padding_high(
+          slice_shape.dim_size(seq_dim_));
+      slice = body_builder->Pad(
+          slice, XlaHelpers::Zero(body_builder.get(), input_type),
+          padding_config);
+
+      // Now slice out the reversed sequence from its actual start.
+      // sequence_start_indices is the offset of the start of the reversed
+      // sequence in the input. The slice will go into the padding, however, we
+      // will mask off these elements and replace them with elements from the
+      // original input so their values do not matter.
+      auto sequence_start_indices = body_builder->Broadcast(
+          XlaHelpers::Zero(body_builder.get(), seq_lens_type),
+          {slice_shape.dims()});
+      sequence_start_indices = body_builder->DynamicUpdateSlice(
+          sequence_start_indices,
           body_builder->Sub(XlaHelpers::IntegerLiteral(
                                 body_builder.get(), seq_lens_type, max_seq_len),
                             seq_len),
@@ -127,18 +147,12 @@
               XlaHelpers::IntegerLiteral(body_builder.get(), seq_lens_type,
                                          seq_dim_),
               {1}));
-
-      // Slice out the reversed sequence. The slice will overflow the end of the
-      // sequence, and the contents of the overflow are implementation-defined.
-      // However, we will mask off these elements and replace them with elements
-      // from the original input so their values do not matter.
-      TensorShape slice_shape = input_shape;
-      slice_shape.set_dim(batch_dim_, 1);
-      auto slice = body_builder->DynamicSlice(output, slice_indices,
-                                              slice_shape.dim_sizes());
+      slice = body_builder->DynamicSlice(slice, sequence_start_indices,
+                                         slice_shape.dim_sizes());

       // Shift the reversed sequence to the left.
-      output = body_builder->DynamicUpdateSlice(output, slice, indices);
+      output = body_builder->DynamicUpdateSlice(output, slice,
+                                                batch_element_indices);

       body_builder->Tuple(
           {body_builder->Add(


Modified organized_edge_detection to remove minmax_element, in case we don't have c++11

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@5946 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- features/include/pcl/features/impl/organized_edge_detection.hpp
+++ features/include/pcl/features/impl/organized_edge_detection.hpp
@@ -105,9 +105,11 @@
       {
         // Every neighboring points are valid
         std::pair<std::vector<float>::iterator, std::vector<float>::iterator> minmax;
-        minmax = std::minmax_element (nghr_dist.begin (), nghr_dist.end ());
-        float nghr_dist_min = *(minmax.first);
-        float nghr_dist_max = *(minmax.second);
+        //minmax = boost::minmax_element (nghr_dist.begin (), nghr_dist.end ());
+        std::vector<float>::iterator min_itr = std::min_element (nghr_dist.begin (), nghr_dist.end ());//*(minmax.first);
+        std::vector<float>::iterator max_itr = std::max_element (nghr_dist.begin (), nghr_dist.end ());//*(minmax.first);
+        float nghr_dist_min = *min_itr;
+        float nghr_dist_max = *max_itr;
         float dist_dominant = abs (nghr_dist_min) > abs (nghr_dist_max) ? nghr_dist_min : nghr_dist_max;
         if (abs (dist_dominant) > th_depth_discon_*abs (curr_depth))
         {


db: add method to get compaction manager from cf

Signed-off-by: Raphael S. Carvalho <1e2942cea40e3b4d2162dfcd9e53e41c05a84d22@scylladb.com>

--- database.hh
+++ database.hh
@@ -321,6 +321,10 @@
         return _stats;
     }

+    compaction_manager& get_compaction_manager() const {
+        return _compaction_manager;
+    }
+
     template<typename Func, typename Result = futurize_t<std::result_of_t<Func()>>>
     Result run_with_compaction_disabled(Func && func) {
         ++_compaction_disabled;


Less verbose output when reading GDML auxiliary info.

--- geom/gdml/src/TGDMLParse.cxx
+++ geom/gdml/src/TGDMLParse.cxx
@@ -1751,7 +1751,7 @@
       else if (strcmp(gdml->GetNodeName(child), "auxiliary") == 0) {
          TString auxType, auxUnit, auxValue;
          if(!auxmap) {
-            printf("Auxiliary values for volume %s\n",vol->GetName());
+            // printf("Auxiliary values for volume %s\n",vol->GetName());
             auxmap = new TMap();
             vol->SetUserExtension(new TGeoRCExtension(auxmap));
          }
@@ -1764,7 +1764,7 @@
          }
          if (!auxUnit.IsNull()) auxValue = TString::Format("%s*%s", auxValue.Data(), auxUnit.Data());
          auxmap->Add(new TObjString(auxType),new TObjString(auxValue));
-         printf("  %s: %s\n", auxType.Data(), auxValue.Data());
+         // printf("  %s: %s\n", auxType.Data(), auxValue.Data());
       }

       child = gdml->GetNext(child);