iox-#186 add forward_list test case ListIsCopyableViaMemcpy

Signed-off-by: Eickhoff Bernhard (CC-AD/ESW1) <fc027a21138e4a9acf1e1fdb7f927a60284f7b92@de.bosch.com>

--- iceoryx_utils/test/moduletests/test_cxx_forward_list.cpp
+++ iceoryx_utils/test/moduletests/test_cxx_forward_list.cpp
@@ -1831,7 +1831,7 @@
     constexpr uint64_t TEST_VALUE{356u};
     for (uint64_t i = 0; i < TESTLISTCAPACITY; ++i)
     {
-        sut.emplace_front((const uint64_t)i);
+        sut.emplace_front(static_cast<const uint64_t>(i));
     }

     auto sut1{sut};
@@ -1871,7 +1871,7 @@
 {
     for (uint64_t i = 0; i < TESTLISTCAPACITY; ++i)
     {
-        sut.emplace_front((const uint64_t)i);
+        sut.emplace_front(static_cast<const uint64_t>(i));
     }

     auto iter = sut.cbegin();
@@ -1884,7 +1884,7 @@
 {
     for (uint64_t i = 0; i < TESTLISTCAPACITY; ++i)
     {
-        sut.emplace_front((const uint64_t)i);
+        sut.emplace_front(static_cast<const uint64_t>(i));
     }
     auto iter = sut.cbegin();
     sut.pop_front();
@@ -1897,7 +1897,7 @@
 {
     for (uint64_t i = 0; i < TESTLISTCAPACITY; ++i)
     {
-        sut.emplace_front((const uint64_t)i);
+        sut.emplace_front(static_cast<const uint64_t>(i));
     }

     auto iter = sut.cbegin();
@@ -1910,7 +1910,7 @@
 {
     for (uint64_t i = 0; i < TESTLISTCAPACITY; ++i)
     {
-        sut.emplace_front((const uint64_t)i);
+        sut.emplace_front(static_cast<const uint64_t>(i));
     }

     auto iter = sut.cbegin();
@@ -1918,3 +1918,33 @@

     EXPECT_DEATH(dummyFunc(iter->m_value == 12), "");
 }
+
+TEST_F(forward_list_test, ListIsCopyableViaMemcpy)
+{
+    uint64_t i = 0;
+    uint8_t* otherSutPtr = new uint8_t[sizeof(forward_list<TestListElement, TESTLISTCAPACITY>)];
+
+    {
+        forward_list<TestListElement, TESTLISTCAPACITY> sut1;
+
+        for (; i < TESTLISTCAPACITY; ++i)
+        {
+            sut1.emplace_front(static_cast<const uint64_t>(i));
+        }
+
+        memcpy(reinterpret_cast<void*>(otherSutPtr), reinterpret_cast<const void*>(&sut1), sizeof(sut1));
+
+        // sanity measure: overwrite copied-from list before it's being destroyed
+        sut1.clear();
+        for (uint64_t k = 0; k < TESTLISTCAPACITY; ++k)
+        {
+            sut1.emplace_front(static_cast<const uint64_t>(k + i));
+        }
+    }
+
+    for (auto& listElement : *reinterpret_cast<forward_list<TestListElement, TESTLISTCAPACITY>*>(otherSutPtr))
+    {
+        --i;
+        EXPECT_THAT(listElement.m_value, Eq(i));
+    }
+}


Add the posibility to use the streaming parser for handlers (see the comment in the commit).

svn path=/trunk/kdesupport/akonadi/; revision=939136

--- server/src/akonadiconnection.cpp
+++ server/src/akonadiconnection.cpp
@@ -136,9 +136,19 @@
                    this, SLOT( slotConnectionStateChange( ConnectionState ) ),
                                Qt::DirectConnection );
           try {
+            //Rempve 0 && to enable the streaming parser usage
+            if ( 0 && m_currentHandler->supportsStreamParser() )
+            {
+              qDebug() << "Using the streaming parser";
+              m_streamParser = new ImapStreamParser( m_socket );
+              m_streamParser->setData(m_parser->data());
+              m_currentHandler->setStreamParser( m_streamParser );
+              m_currentHandler->parseStream();
+            } else {
           // FIXME: remove the tag, it's only there for backward compatibility with the handlers!
-            if ( m_currentHandler->handleLine( m_parser->tag() + ' ' + m_parser->data() ) )
-              m_currentHandler = 0;
+              if ( m_currentHandler->handleLine( m_parser->tag() + ' ' + m_parser->data() ) )
+                m_currentHandler = 0;
+            }
           } catch ( const Akonadi::HandlerException &e ) {
             m_currentHandler->failureResponse( e.what() );
             m_currentHandler->deleteLater();


parse_xaiger to not parse symbol table

parse_xaiger to not parse symbol table

--- frontends/aiger/aigerparse.cc
+++ frontends/aiger/aigerparse.cc
@@ -219,9 +219,6 @@
     unsigned l1;
     std::string s;
     bool comment_seen = false;
-    std::vector<std::pair<RTLIL::Wire*,RTLIL::IdString>> deferred_renames;
-    std::vector<std::pair<RTLIL::Wire*,RTLIL::IdString>> deferred_inouts;
-    deferred_renames.reserve(inputs.size() + latches.size() + outputs.size());
     for (int c = f.peek(); c != EOF; c = f.peek()) {
         if (comment_seen || c == 'c') {
             if (!comment_seen) {
@@ -281,69 +278,8 @@
                 break;
             }
         }
-        else if (c == 'i' || c == 'l' || c == 'o') {
-            f.ignore(1);
-            if (!(f >> l1 >> s))
-                log_error("Line %u cannot be interpreted as a symbol entry!\n", line_count);
-
-            if ((c == 'i' && l1 > inputs.size()) || (c == 'l' && l1 > latches.size()) || (c == 'o' && l1 > outputs.size()))
-                log_error("Line %u has invalid symbol position!\n", line_count);
-
-            RTLIL::Wire* wire;
-            if (c == 'i') wire = inputs[l1];
-            else if (c == 'l') wire = latches[l1];
-            else if (c == 'o') wire = outputs[l1];
-            else log_abort();
-
-            RTLIL::IdString escaped_s = RTLIL::escape_id(s);
-
-            if (escaped_s.ends_with("$inout.out")) {
-                deferred_inouts.emplace_back(wire, escaped_s.substr(0, escaped_s.size()-10));
-                goto next_line;
-            }
-            else if (wideports && (wire->port_input || wire->port_output)) {
-                RTLIL::IdString wide_symbol;
-                int index;
-                std::tie(wide_symbol,index) = wideports_split(escaped_s.str());
-                if (wide_symbol.ends_with("$inout.out")) {
-                    deferred_inouts.emplace_back(wire, stringf("%s[%d]", wide_symbol.substr(0, wide_symbol.size()-10).c_str(), index));
-                    goto next_line;
-                }
-            }
-            deferred_renames.emplace_back(wire, escaped_s);
-
-next_line:
-            std::getline(f, line); // Ignore up to start of next line
-            ++line_count;
-        }
         else
             log_error("Line %u: cannot interpret first character '%c'!\n", line_count, c);
-    }
-
-    dict<RTLIL::IdString, int> wideports_cache;
-    for (const auto &i : deferred_renames) {
-        RTLIL::Wire *wire = i.first;
-
-        module->rename(wire, i.second);
-
-        if (wideports && (wire->port_input || wire->port_output)) {
-            RTLIL::IdString escaped_symbol;
-            int index;
-            std::tie(escaped_symbol,index) = wideports_split(wire->name.str());
-            if (index > 0)
-                wideports_cache[escaped_symbol] = std::max(wideports_cache[escaped_symbol], index);
-        }
-    }
-
-    for (const auto &i : deferred_inouts) {
-        RTLIL::Wire *out_wire = i.first;
-        log_assert(out_wire->port_output);
-        out_wire->port_output = false;
-        RTLIL::Wire *wire = module->wire(i.second);
-        log_assert(wire);
-        log_assert(wire->port_input && !wire->port_output);
-        wire->port_output = true;
-        module->connect(wire, out_wire);
     }

     post_process();


Prevent moving into a child collection of the source collection.

svn path=/trunk/kdesupport/akonadi/; revision=926432

--- server/src/storage/datastore.cpp
+++ server/src/storage/datastore.cpp
@@ -280,10 +280,18 @@
   if ( !m_dbOpened )
     return false;

-  if ( newParent > 0 ) {
+  if ( newParent > 0 && collection.parentId() != newParent ) {
     Collection parent = Collection::retrieveById( newParent );
     if ( !parent.isValid() )
       return false;
+
+    forever {
+      if ( parent.id() == collection.id() )
+        return false; // target is child of source
+      if ( parent.parentId() == 0 )
+        break;
+      parent = parent.parent();
+    }
   }

   SelectQueryBuilder<Collection> qb;


fixed container's bounds updating

fixed container's bounds updating

--- gameplay/src/Container.cpp
+++ gameplay/src/Container.cpp
@@ -549,9 +549,6 @@

 void Container::updateBounds()
 {
-    // Compute total bounds of container
-    Control::updateBounds();
-
     // Handle automatically sizing based on our children
     if (_autoSize != AUTO_SIZE_NONE)
     {
@@ -591,6 +588,9 @@
             setHeightInternal(height);
         }
     }
+
+    // Compute total bounds of container
+    Control::updateBounds();

     // Update layout to position children correctly within us
     GP_ASSERT(_layout);


[tf-mlir-translate] unused header removed

--- tensorflow/compiler/mlir/tensorflow/translate/import_model.cc
+++ tensorflow/compiler/mlir/tensorflow/translate/import_model.cc
@@ -4176,7 +4176,7 @@
   options.allow_internal_ops = true;
   options.add_default_attributes = add_default_attributes;
   Graph graph(OpRegistry::Global());
-
+
   GraphDef preprocessed_graphdef(graphdef);
   if (add_default_attributes) {
     TF_RETURN_IF_ERROR(PreprocessGraphDef(&specs, &preprocessed_graphdef));


INTEGRATION: CWS pchfix02 (1.9.50); FILE MERGED 2006/09/01 17:24:41 kaib 1.9.50.1: #i68856# Added header markers and pch files

--- dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TableDesignControl.cxx,v $
  *
- *  $Revision: 1.9 $
- *
- *  last change: $Author: hr $ $Date: 2006-06-20 03:32:45 $
+ *  $Revision: 1.10 $
+ *
+ *  last change: $Author: obo $ $Date: 2006-09-17 07:29:44 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -32,6 +32,9 @@
  *    MA  02111-1307  USA
  *
  ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"

 #ifndef DBAUI_TABLEDESIGNCONTROL_HXX
 #include "TableDesignControl.hxx"


Blanks.

Blanks.

--- interpreter/cling/lib/Interpreter/ClangInternalState.cpp
+++ interpreter/cling/lib/Interpreter/ClangInternalState.cpp
@@ -90,7 +90,7 @@
   }

   // Copied with modifications from CompilerInstance.cpp
-  llvm::raw_fd_ostream*
+  llvm::raw_fd_ostream*
   ClangInternalState::createOutputFile(llvm::StringRef OutFile,
                                        std::string *TempPathName/*=0*/,
                                        bool RemoveFileOnSignal/*=true*/) {
@@ -132,7 +132,7 @@
     typedef llvm::SmallVector<const char*, 1024> Builtins;
     Builtins builtinNames;
     m_ASTContext.BuiltinInfo.GetBuiltinNames(builtinNames);
-    for (Builtins::iterator I = builtinNames.begin();
+    for (Builtins::iterator I = builtinNames.begin();
          I != builtinNames.end();) {
       if (llvm::StringRef(*I).startswith("__builtin"))
         I = builtinNames.erase(I);
@@ -140,16 +140,16 @@
         ++I;
     }

-    builtinNames.push_back(".*__builtin.*");
-
-    if (differentContent(m_LookupTablesFile, other.m_LookupTablesFile,
+    builtinNames.push_back(".*__builtin.*");
+
+    if (differentContent(m_LookupTablesFile, other.m_LookupTablesFile,
                          differences, &builtinNames)) {
       llvm::errs() << "Differences in the lookup tables\n";
       llvm::errs() << differences << "\n";
       differences = "";
     }

-    if (differentContent(m_IncludedFilesFile, other.m_IncludedFilesFile,
+    if (differentContent(m_IncludedFilesFile, other.m_IncludedFilesFile,
                          differences)) {
       llvm::errs() << "Differences in the included files\n";
       llvm::errs() << differences << "\n";
@@ -173,8 +173,8 @@
     }
   }

-  bool ClangInternalState::differentContent(const std::string& file1,
-                                            const std::string& file2,
+  bool ClangInternalState::differentContent(const std::string& file1,
+                                            const std::string& file2,
                                             std::string& differences,
                 const llvm::SmallVectorImpl<const char*>* ignores/*=0*/) const {
     std::string diffCall = m_DiffCommand;
@@ -223,13 +223,13 @@
     }
   };

-  void ClangInternalState::printLookupTables(llvm::raw_ostream& Out,
+  void ClangInternalState::printLookupTables(llvm::raw_ostream& Out,
                                              ASTContext& C) {
     DumpLookupTables dumper(Out);
     dumper.TraverseDecl(C.getTranslationUnitDecl());
   }

-  void ClangInternalState::printIncludedFiles(llvm::raw_ostream& Out,
+  void ClangInternalState::printIncludedFiles(llvm::raw_ostream& Out,
                                               SourceManager& SM) {
     for (clang::SourceManager::fileinfo_iterator I = SM.fileinfo_begin(),
            E = SM.fileinfo_end(); I != E; ++I) {
@@ -263,7 +263,7 @@
     Out.flush();
   }

-  void ClangInternalState::printLLVMModule(llvm::raw_ostream& Out,
+  void ClangInternalState::printLLVMModule(llvm::raw_ostream& Out,
                                            llvm::Module& M) {
     M.print(Out, /*AssemblyAnnotationWriter*/ 0);
   }


[ModelBuilder] Fix wrong dimension mapping for second level of tiling. (#3037)

Fix mattmul benchmark, the dimension were mapped backward.

--- experimental/ModelBuilder/test/BenchMatMulVectorGPU.cpp
+++ experimental/ModelBuilder/test/BenchMatMulVectorGPU.cpp
@@ -135,8 +135,8 @@
   Value vSubgroupY = b.create<ConstantIndexOp>(loc, numSubgroupY);
   SmallVector<linalg::ProcInfo, 2> procInfo(2);
   using namespace edsc::op;
-  procInfo[0] = {sg % vSubgroupX, vSubgroupX};
-  procInfo[1] = {sgdiv % vSubgroupY, vSubgroupY};
+  procInfo[0] = {sgdiv % vSubgroupY, vSubgroupY};
+  procInfo[1] = {sg % vSubgroupX, vSubgroupX};
   return procInfo;
 }

@@ -325,7 +325,7 @@
               linalg::LinalgTilingOptions()
                   .setLoopType(linalg::LinalgTilingLoopType::ParallelLoops)
                   .setTileSizes(
-                      {tileN / numSubgroupY, tileM / numSubgroupX, tileK})
+                      {tileM / numSubgroupY, tileN / numSubgroupX, tileK})
                   .setDistributionOptions(SGDistribute));
     }
     strategy.vectorize<linalg::MatmulOp>().unrollVector<vector::ContractionOp>(


The "." is needed for lit to parse the regex; require 5*hex.

--- interpreter/cling/test/Prompt/ValuePrinter/Assignments.C
+++ interpreter/cling/test/Prompt/ValuePrinter/Assignments.C
@@ -14,7 +14,7 @@
    const char* n = 0 // CHECK: (const char *) nullptr

 struct C {int d;} E = {22};
-E // CHECK: (struct C &) @0x{{[0-9A-Fa-f]{6,12}}}
+E // CHECK: (struct C &) @0x{{[0-9A-Fa-f]{5,12}.}}
 E.d // CHECK: (int) 22

 #include <string>
@@ -56,5 +56,5 @@
 F_t fp = 0;
 fp // CHECK: (F_t) Function @0x0
 #include <stdio.h>
-fp = (F_t)printf // CHECK: (F_t) Function @0x{{[0-9A-Fa-f]{6,12}}}
+fp = (F_t)printf // CHECK: (F_t) Function @0x{{[0-9A-Fa-f]{5,12}.}}
 .q


Don't use strlen to find length of strings to parse. May want to parse strings with null in them (as is the case with argv parsing).

--- colm/bytecode.cpp
+++ colm/bytecode.cpp
@@ -179,7 +179,7 @@

 	/* Set up the input stream. */
 	string s = sout.str();
-	InputStreamString inputStream( s.c_str(), strlen( s.c_str() ) );
+	InputStreamString inputStream( s.c_str(), s.size() );
 	init_input_stream( &inputStream );

 	FsmRun fsmRun( prg );
@@ -213,7 +213,7 @@

 		/* Set up the input stream. */
 		string s = sout.str();
-		InputStreamString inputStream( s.c_str(), strlen( s.c_str() ) );
+		InputStreamString inputStream( s.c_str(), s.size() );
 		init_input_stream( &inputStream );

 		parse_frag( sp, &inputStream, accum->fsmRun, accum->pdaRun );


Remove Memory expansion and TOD hack from call_proc_exit_cache_contained

There are actions going into fips that trigger memory expansion
correctly. This commit removes the previous hacks so we know that
the memory expansion is working properly. NOTE that exit_cache_contained
is still trigged by a SIMICS only register. This is due to issues with
how actions are executed.

Change-Id: I71fec05def230a61996b05c647101518dafb3573
RTC: 158417
CMVC-Prereq: 1004693
CMVC-Prereq: 1005024
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29033
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Reviewed-by: Martin Gloff <df0a4963746ae04ab678d064fccc7ee68adfd751@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Reviewed-by: Daniel M. Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>

--- src/usr/isteps/istep14/call_proc_exit_cache_contained.C
+++ src/usr/isteps/istep14/call_proc_exit_cache_contained.C
@@ -39,7 +39,7 @@

 //HWP Invoker
 #include    <fapi2/plat_hwp_invoker.H>
-
+#include    <p9_misc_scom_addresses.H>
 #include    <p9_exit_cache_contained.H>

@@ -52,12 +52,17 @@
 #include <kernel/console.H>                  // printk status
 #include <devicefw/userif.H>
 #include <config.h>
+#include <util/misc.H>
 // @TODO RTC:134082 remove above block

 using   namespace   ISTEP;
 using   namespace   ISTEP_ERROR;
 using   namespace   ERRORLOG;
 using   namespace   TARGETING;
+
+
+//Simics only register to trigger exit of cache containment
+#define EXIT_CACHE_CONTAINED_SCOM_ADDR 0x0000000005000003

 namespace ISTEP_14
 {
@@ -239,71 +244,36 @@

-        // no errors so extend VMM.
+        // no errors so extend Virtual Memory Map
         if(!l_errl)
         {
             TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                        "SUCCESS : call_proc_exit_cache_contained on all procs" );

-            // @TODO RTC:134082 remove below block
-#ifndef CONFIG_P9_VPO_COMPILE
-            // Add P9 - Fake trigger for memory expansion
+            size_t scom_size = sizeof(uint64_t);
             TARGETING::Target* l_masterProc = NULL;
             TARGETING::targetService()
-              .masterProcChipTargetHandle( l_masterProc );
-
-            uint64_t l_top_addr = get_top_mem_addr();
-            uint64_t l_bottom_addr = get_bottom_mem_addr();
-            uint64_t l_mem_size = l_top_addr - l_bottom_addr;
-
-            // aggregate scom data to write
-            uint64_t l_data[] = {l_bottom_addr,  // Memory Base Address
-                                 l_mem_size,     // Memory Size in bytes
-                                 1};             // Memory Valid
-            uint64_t l_addr = 0x05000000;
-            size_t scom_size = sizeof(uint64_t);
-
-            for(uint8_t i = 0;
-                i < sizeof(l_data) / sizeof(uint64_t);
-                i++)
-            {
+            .masterProcChipTargetHandle( l_masterProc );
+
+            if(Util::isSimicsRunning())
+            {
+                uint64_t l_memory_valid = 1;
+                // exit cache contained mode
                 l_errl = deviceWrite( l_masterProc,
-                                      &(l_data[i]),
-                                      scom_size,
-                                      DEVICE_SCOM_ADDRESS(l_addr+i) );
-                if( l_errl ) { break; }
-            }
-
-            if ( l_errl )
-            {
-                // Create IStep error log and cross reference to error that
-                // occurred
-                l_stepError.addErrorDetails( l_errl );
-
-                // Commit Error
-                errlCommit( l_errl, HWPF_COMP_ID );
-            }
-
-            printk("Fake Memory now set up.\n");
-
-            // exit cache contained mode
-            l_errl = deviceWrite( l_masterProc,
-                                  &(l_data[2]),
-                                  scom_size,
-                                  DEVICE_SCOM_ADDRESS(l_addr+3) );
-
-            if ( l_errl )
-            {
-                // Create IStep error log and cross reference to error that
-                // occurred
-                l_stepError.addErrorDetails( l_errl );
-
-                // Commit Error
-                errlCommit( l_errl, HWPF_COMP_ID );
-            }
-
-            printk("Cache contained mode has been exited.\n");
-            // End of Add P9 - Fake trigger for memory expansion
+                                &l_memory_valid,  //Memory is valid
+                                scom_size, //Size of Scom
+                                DEVICE_SCOM_ADDRESS(EXIT_CACHE_CONTAINED_SCOM_ADDR));
+
+                if ( l_errl )
+                {
+                    // Create IStep error log and cross reference to error that
+                    // occurred
+                    l_stepError.addErrorDetails( l_errl );
+
+                    // Commit Error
+                    errlCommit( l_errl, HWPF_COMP_ID );
+                }
+            }

             //Set PSI and FSP BARs, activate the PSI link BAR
             //TODO RTC 150260 Re-evaluate if this should be deleted or enabled
@@ -314,7 +284,7 @@
 //            l_errl = deviceWrite( l_masterProc,
 //                                  &psi,
 //                                  scom_size,
-//                                  DEVICE_SCOM_ADDRESS(0x0501290a) );
+//                                  DEVICE_SCOM_ADDRESS(PU_PSI_BRIDGE_BAR_REG) );
             if ( l_errl )
             {
                 // Create IStep error log and cross reference to error that
@@ -328,7 +298,7 @@
             l_errl = deviceWrite( l_masterProc,
                                   &fsp,
                                   scom_size,
-                                  DEVICE_SCOM_ADDRESS(0x0501290b) );
+                                  DEVICE_SCOM_ADDRESS(PU_PSI_BRIDGE_FSP_BAR_REG) );
             if ( l_errl )
             {
                 // Create IStep error log and cross reference to error that
@@ -338,59 +308,6 @@
                 // Commit Error
                 errlCommit( l_errl, HWPF_COMP_ID );
             }
-
-            //Need to default TOD registers to reasonable value
-            // aggregate scom data to write
-            uint64_t l_tod_data[] = {
-                0x40000, 0x4083000000000000,0x4083000000000000,
-                0x40001, 0x0008008011000000,0x8000000000000000,
-                0x40002, 0x8000000000000000,0x0008008000000000,
-                0x40003, 0x0008008000000000,0x8000000011000000,
-                0x40004, 0x8000000000000000,0x00C3000000000000,
-                0x40005, 0x0800c30000000000,0x00C3000000000000,
-                0x40007, 0x6900000000000000,0x0B60000000000000,
-                0x40008, 0x06661D0C00000000,0x06C06CCC00000000,
-                0x40010, 0x003F000000000000,0x003F000000000000,
-                0x40013, 0x8000000000000000,0x0000000000000000,
-            };
-
-            // Per Dean, this workaround should be run against all
-            // processor chips.
-            TARGETING::TargetHandleList l_cpuTargetList;
-            getAllChips(l_cpuTargetList, TYPE_PROC);
-
-            uint32_t l_proc_num = 0;
-            for (const auto & l_cpu_target: l_cpuTargetList)
-            {
-                assert((l_proc_num < 2),
-                       "TOD hack does not support more then 2 procs");
-
-                for(uint8_t i = 0;
-                    i < (sizeof(l_tod_data) / sizeof(uint64_t));
-                    i+=3)
-                {
-                    l_errl = deviceWrite( l_cpu_target,
-                                          &(l_tod_data[i+1+l_proc_num]),
-                                          scom_size,
-                                          DEVICE_SCOM_ADDRESS(l_tod_data[i]) );
-                    if( l_errl ) { break; }
-                }
-
-                if ( l_errl )
-                {
-                    // Create IStep error log and cross reference to error that
-                    // occurred
-                    l_stepError.addErrorDetails( l_errl );
-
-                    // Commit Error
-                    errlCommit( l_errl, HWPF_COMP_ID );
-                }
-                l_proc_num++;
-            }
-
-            printk("Fake TOD Initialized\n");
-#endif
-            // @TODO RTC:134082 remove above block

             // Call the function to extend VMM to 32MEG
             int rc = mm_extend();


Fix aspired_versions_manager_benchmark test failure - eliminate redundant notification

PiperOrigin-RevId: 388348009

--- tensorflow_serving/core/aspired_versions_manager_benchmark.cc
+++ tensorflow_serving/core/aspired_versions_manager_benchmark.cc
@@ -218,7 +218,8 @@
       pool->Schedule(run_reads_fn);
     }
     state.ResumeTiming();
-    all_read_threads_scheduled_.Notify();
+    if (!all_read_threads_scheduled_.HasBeenNotified())
+      all_read_threads_scheduled_.Notify();

     // Note that destructing the threadpool blocks on completion of all
     // scheduled execution.  This is intentional as we want all threads to
@@ -356,9 +357,8 @@
   // Ratio of requests which are asking for the latest servable as opposed to a
   // specific version.
   constexpr float kLatestRatio = 0.8;
-  static const std::vector<ServableRequest>& requests = []() {
-    std::unique_ptr<std::vector<ServableRequest>> requests(
-        new std::vector<ServableRequest>());
+  static const std::vector<ServableRequest>* requests = []() {
+    std::vector<ServableRequest>* requests(new std::vector<ServableRequest>());
     random::PhiloxRandom philox(testing::RandomSeed());
     random::SimplePhilox random(&philox);
     for (int i = 0; i < kNumRequests; ++i) {
@@ -371,14 +371,14 @@
         requests->push_back(ServableRequest::Latest(name));
       }
     }
-    return *requests.release();
+    return requests;
   }();

   ServableHandle<int64> handle;
   int i = 0;
   for (auto s : state) {
     const Status status =
-        manager->GetServableHandle(requests[i % kNumRequests], &handle);
+        manager->GetServableHandle(requests->at(i % kNumRequests), &handle);
     TF_CHECK_OK(status) << status;
     ++i;
   }


fix 32b target platform compilation

fix 32b target platform compilation

--- sjasm/sjio.cpp
+++ sjasm/sjio.cpp
@@ -694,7 +694,7 @@
 		// replay the log in 2nd+ pass
 		if (1 < pass) {
 			rlpbuf_end = rlpbuf;
-			long toCopy = std::min(8000L, (stdin_log.cend() - stdin_log_it));
+			long toCopy = std::min(8000L, (long)std::distance(stdin_log_it, stdin_log.cend()));
 			if (0 < toCopy) {
 				memcpy(rlbuf, &(*stdin_log_it), toCopy);
 				stdin_log_it += toCopy;


Init IPC attachment broker for extension process

The IPC::AttachmentBroker must be initialized within
any process that uses IPC channel, however this was not
done so far for extension process in Crosswalk.

This patch initializes the attachment brocker for extension
process with an 'AttachmentBrokerPrivileged' instance as
extension process is privileged.

BUG=XWALK-7021

--- extensions/extension_process/xwalk_extension_process.cc
+++ extensions/extension_process/xwalk_extension_process.cc
@@ -9,6 +9,7 @@
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/message_loop/message_loop.h"
+#include "ipc/attachment_broker_privileged.h"
 #include "ipc/ipc_switches.h"
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_sync_channel.h"
@@ -80,6 +81,9 @@

 void XWalkExtensionProcess::CreateBrowserProcessChannel(
     const IPC::ChannelHandle& channel_handle) {
+#if USE_ATTACHMENT_BROKER
+  IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded();
+#endif  // USE_ATTACHMENT_BROKER
   if (channel_handle.name.empty()) {
     std::string channel_id =
         base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(


INTEGRATION: CWS vgbugs07 (1.51.12); FILE MERGED 2007/06/04 13:34:44 vg 1.51.12.1: #i76605# Remove -I .../inc/module hack introduced by hedaburemove01

--- sfx2/source/control/dispatch.cxx
+++ sfx2/source/control/dispatch.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dispatch.cxx,v $
  *
- *  $Revision: 1.51 $
+ *  $Revision: 1.52 $
  *
- *  last change: $Author: vg $ $Date: 2007-05-22 20:17:44 $
+ *  last change: $Author: hr $ $Date: 2007-06-27 23:05:46 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -93,28 +93,28 @@
 // wg. nAutoPageID
 #include "appdata.hxx"
 #include "sfxhelp.hxx"
-#include "dispatch.hxx"
-#include "minstack.hxx"
-#include "msg.hxx"
-#include "objface.hxx"
-#include "bindings.hxx"
-#include "request.hxx"
-#include "app.hxx"
-#include "hintpost.hxx"
+#include <sfx2/dispatch.hxx>
+#include <sfx2/minstack.hxx>
+#include <sfx2/msg.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/hintpost.hxx>
 #include "slotserv.hxx"
-#include "ipclient.hxx"
+#include <sfx2/ipclient.hxx>
 #include "sfxtypes.hxx"
-#include "macrconf.hxx"
-#include "viewfrm.hxx"
-#include "viewsh.hxx"
-#include "childwin.hxx"
-#include "docfac.hxx"
-#include "msgpool.hxx"
-#include "module.hxx"
-#include "topfrm.hxx"
-#include "sfxuno.hxx"
-#include "docfile.hxx"
-#include "mnumgr.hxx"
+#include <sfx2/macrconf.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/docfac.hxx>
+#include <sfx2/msgpool.hxx>
+#include <sfx2/module.hxx>
+#include <sfx2/topfrm.hxx>
+#include <sfx2/sfxuno.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/mnumgr.hxx>
 #include "workwin.hxx"

 namespace css = ::com::sun::star;


[ELF] Sort a list of cases alphabetically for consistency/clarity. NFC.

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@248680 91177308-0d34-0410-b5e6-96231b3b80d8

--- ELF/SymbolTable.cpp
+++ ELF/SymbolTable.cpp
@@ -41,18 +41,18 @@

 static TargetInfo *createTarget(uint16_t EMachine) {
   switch (EMachine) {
+  case EM_386:
+    return new X86TargetInfo();
+  case EM_AARCH64:
+    return new AArch64TargetInfo();
+  case EM_ARM:
+    return new ARMTargetInfo();
   case EM_PPC:
     return new PPCTargetInfo();
-  case EM_ARM:
-    return new ARMTargetInfo();
-  case EM_AARCH64:
-    return new AArch64TargetInfo();
   case EM_PPC64:
     return new PPC64TargetInfo();
   case EM_X86_64:
     return new X86_64TargetInfo();
-  case EM_386:
-    return new X86TargetInfo();
   }
   error("Unknown target machine");
 }


#87292#: SfxHelp::OpenHelpAgent() static

--- sfx2/source/control/dispatch.cxx
+++ sfx2/source/control/dispatch.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: dispatch.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.11 $
  *
- *  last change: $Author: mba $ $Date: 2001-06-18 10:06:50 $
+ *  last change: $Author: mba $ $Date: 2001-06-21 15:36:57 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -309,10 +309,8 @@
             SfxViewFrame* pView = GetFrame();
             if ( !pView )
                 pView = SfxViewFrame::Current();
-
-//            Help* pHelp = Application::GetHelp();
-//            if ( pHelp && pView )
-//              ((SfxHelp_Impl*)pHelp)->OpenHelpAgent( pView->GetFrame(), rReq.GetSlot() );
+            if ( pView )
+              SfxHelp::OpenHelpAgent( pView->GetFrame(), rReq.GetSlot() );

             SfxExecFunc pFunc = rSlot.GetExecFnc();
             rShell.CallExec( pFunc, rReq );


Add additional logging.

Add additional logging.

--- include/JavaScriptCoreCPP/detail/JSExportClass.hpp
+++ include/JavaScriptCoreCPP/detail/JSExportClass.hpp
@@ -530,11 +530,6 @@

     auto new_object = js_context.CreateObject(JSExport<T>::Class());

-    // Delete the "default constructed" native object pointer that
-    // comes from the Initialize callback and replace it with the
-    // constructor call that takes a vector of arguments.
-    delete reinterpret_cast<T*>(new_object.GetPrivate());
-
     const auto native_object_ptr = reinterpret_cast<const T*>(js_object.GetPrivate());
     const bool result            = new_object.SetPrivate(new T(*native_object_ptr, to_vector(js_context, argument_count, arguments_array)));


Add export directives for Mac OS path utility routines (thanks to Urs Muff & Mike Garcia at Quark)

git-svn-id: 95233098a850bdf68e142cb551b6b3e756f38fc7@174205 13f79535-47bb-0310-9956-ffa450edef68

--- src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp
+++ src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp
@@ -142,18 +142,20 @@

 //	Convert fom FSRef/FSSpec to a Unicode character string path.
 //	Note that you'll need to delete [] that string after you're done with it!
-XMLCh*	XMLCreateFullPathFromFSRef(const FSRef& startingRef);
-XMLCh*	XMLCreateFullPathFromFSSpec(const FSSpec& startingSpec);
+XMLUTIL_EXPORT XMLCh*	XMLCreateFullPathFromFSRef(const FSRef& startingRef);
+XMLUTIL_EXPORT XMLCh*	XMLCreateFullPathFromFSSpec(const FSSpec& startingSpec);

 //	Convert from path to FSRef/FSSpec
 //	You retain ownership of the pathName.
-bool	XMLParsePathToFSRef(const XMLCh* const pathName, FSRef& ref);
-bool	XMLParsePathToFSSpec(const XMLCh* const pathName, FSSpec& spec);
+XMLUTIL_EXPORT bool	XMLParsePathToFSRef(const XMLCh* const pathName, FSRef& ref);
+XMLUTIL_EXPORT bool	XMLParsePathToFSSpec(const XMLCh* const pathName, FSSpec& spec);

 //	These routines copy characters between their representation in the Unicode Converter
 //	and the representation used by XMLCh. Until a recent change in Xerces, these were
 //	sometimes different on the Macintosh (with GCC), but XMLCh is now fixed at 16 bits.
 //	Code utilitizing these routines may be phased out in time, as a conversion is no
 //	longer necessary.
-XMLCh*		CopyUniCharsToXMLChs(const UniChar* src, XMLCh* dst, std::size_t charCount, std::size_t maxChars);
-UniChar*	CopyXMLChsToUniChars(const XMLCh* src, UniChar* dst, std::size_t charCount, std::size_t maxChars);
+XMLUTIL_EXPORT XMLCh*
+CopyUniCharsToXMLChs(const UniChar* src, XMLCh* dst, std::size_t charCount, std::size_t maxChars);
+XMLUTIL_EXPORT UniChar*
+CopyXMLChsToUniChars(const XMLCh* src, UniChar* dst, std::size_t charCount, std::size_t maxChars);


Remove GPU-only flag for vertices GM

Remove GPU-only flag for vertices GM

BUG=skia:1956
R=reed@google.com

Author: jvanverth@google.com

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

git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@12971 2bbb7eff-a529-9590-31e7-b0007b416f81

--- gm/vertices.cpp
+++ gm/vertices.cpp
@@ -110,13 +110,6 @@
         }
     }

-#if 1
-    virtual uint32_t onGetFlags() const {
-        // https://code.google.com/p/skia/issues/detail?id=1956
-        return kSkipGPU_Flag;
-    }
-#endif
-
 private:
     typedef skiagm::GM INHERITED;
 };


Sending folder sync messages

Sending folder sync messages

--- src/System_httpServer.cpp
+++ src/System_httpServer.cpp
@@ -125,6 +125,7 @@
       client->send("0");
     } else {
       client->send("1");
+      send_createFolder(tmp);
     }
   } else if( request.find("Rfolder") != string::npos ){
     string folderPath = string(request).substr(string(request).find("=") + 1, request.size());
@@ -160,10 +161,12 @@
     client->send(tableContent.c_str(), tableContent.size());
   } else if( request.find("Ufolder") != string::npos ){
   } else if( request.find("Dfolder") != string::npos ){
-    if(!FileSystem::deleteFolder(string(request).substr(string(request).find("=") + 1, request.size()))){
+    string tmp = string(request).substr(string(request).find("=") + 1, request.size());
+    if(!FileSystem::deleteFolder(tmp)){
       client->send("0");
     } else {
       client->send("1");
+      send_deleteFolder(tmp);
     }
   } else if( request.find("Cfile") != string::npos ){
   } else if( request.find("Rfile") != string::npos ){


Fix build.

Fix build.

Change-Id: I9676e38029c511678efed1679f9488f1f15f4f8d

--- sfx2/source/control/unoctitm.cxx
+++ sfx2/source/control/unoctitm.cxx
@@ -64,6 +64,8 @@

 #include <boost/scoped_ptr.hpp>

+#include <iostream>
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;


fix polygon handling

fix polygon handling

--- include/mapnik/markers_placements/vertext_last.hpp
+++ include/mapnik/markers_placements/vertext_last.hpp
@@ -41,42 +41,67 @@
             return false;
         }

-        double x0, y0;
-        unsigned command0 = this->locator_.vertex(&x0, &y0);
+        geometry::point<double> p0;
+        geometry::point<double> p1;
+        geometry::point<double> p_next;
+        geometry::point<double> move_to;
+        unsigned cmd0 = SEG_END;
+        unsigned cmd1 = SEG_END;
+        unsigned cmd_next = SEG_END;

-        if (agg::is_stop(command0))
+        while ((cmd_next = this->locator_.vertex(&p_next.x, &p_next.y)) != SEG_END)
+        {
+            switch (cmd_next)
+            {
+                case SEG_MOVETO:
+                    move_to = p_next;
+                    p0 = p_next;
+                    cmd0 = cmd_next;
+                    break;
+                case SEG_LINETO:
+                    p1 = p0;
+                    cmd1 = cmd0;
+                    p0 = p_next;
+                    cmd0 = cmd_next;
+                    break;
+                case SEG_CLOSE:
+                    p1 = p0;
+                    cmd1 = cmd0;
+                    p0 = move_to;
+                    cmd0 = cmd_next;
+                    break;
+            }
+        }
+
+        // Empty geometry
+        if (cmd0 == SEG_END)
         {
             this->done_ = true;
             return false;
         }

-        double next_x, next_y;
-        double x1 = x0, y1 = y0;
-        unsigned command1 = command0;
+        // Last point
+        x = p0.x;
+        y = p0.y;

-        while (!agg::is_stop(command0 = this->locator_.vertex(&next_x, &next_y)))
+        // Line or polygon
+        if (cmd0 == SEG_LINETO || cmd0 == SEG_CLOSE)
         {
-            command1 = command0;
-            x1 = x0;
-            y1 = y0;
-            x0 = next_x;
-            y0 = next_y;
-        }
-
-        x = x0;
-        y = y0;
-
-        if (agg::is_line_to(command1))
-        {
-            angle = std::atan2(y0 - y1, x0 - x1);
+            angle = std::atan2(p0.y - p1.y, p0.x - p1.x);
             if (!this->set_direction(angle))
             {
+                this->done_ = true;
                 return false;
             }
+        }
+        else
+        {
+            angle = 0.0;
         }

         if (!this->push_to_detector(x, y, angle, ignore_placement))
         {
+            this->done_ = true;
             return false;
         }


Adding links to download files

Adding links to download files

--- src/System_httpServer.cpp
+++ src/System_httpServer.cpp
@@ -206,8 +206,19 @@
       tableContent += kv.first.substr(1, kv.first.size());
       tableContent += "\")'>
";
+      tableContent += "\")'>
";
     }
     client->send(tableContent);
   } else if( request.find("Ufolder") != string::npos ){
@@ -240,7 +251,9 @@
       send_createFile(fullPath, info);
     }
   } else if( request.find("Rfile") != string::npos ){
-    //TODO
+    FileSystem::File* file = FileSystem::retrieveFile(string(request).substr(string(request).find("=") + 1, request.size()));
+    if (file)
+      client->send(file->read());
   } else if( request.find("Ufile") != string::npos ){
     string data = request.substr(request.find("=") + 1, request.size());
     string oldPath = data.substr(0, data.find("?&"));


changes

changes

--- include/tudocomp/compressors/lfs/SimSTStrategy.hpp
+++ include/tudocomp/compressors/lfs/SimSTStrategy.hpp
@@ -78,6 +78,7 @@
         dead_positions = BitVector(input.size(), 0);

+        typedef sdsl::bp_interval<long unsigned int> node_type;

         StatPhase::wrap("Constructing ST", [&]{
@@ -85,108 +86,119 @@
         });

-        DLOG(INFO)<<"computing string depth";
-
-
-        //array of vectors for bins of nodes with string depth
-        std::vector<std::vector<int> > bins;
-        bins.resize(stree.size()+1);
-
-        uint node_counter = 0;
-
-        typedef sdsl::cst_bfs_iterator<cst_t> iterator;
+
+        StatPhase::wrap("Computing LRF", [&]{
+
+            //array of vectors for bins of nodes with string depth
+            std::vector<std::vector<node_type> > bins;
+            bins.resize(stree.size()+1);
+
+            uint node_counter = 0;
+
+            typedef sdsl::cst_bfs_iterator<cst_t> iterator;
             iterator begin = iterator(&stree, stree.root());
             iterator end   = iterator(&stree, stree.root(), true, true);

-            for (iterator it = begin; it != end; ++it) {
-                bins[stree.depth(*it)].push_back(stree.id(*it));
-                node_counter++;
-            }
-
-
-
-
-        uint nts_number =0;
-
-        for(uint i = bins.size()-1; i>=min_lrf; i--){
-            auto bin_it = bins[i].begin();
-            while (bin_it!= bins[i].end()){
-
-                auto node = stree.inv_id(*bin_it);
-
-                uint offset = stree.csa[stree.lb(node)];
-                uint fac_length = stree.depth(node);
-
-                bin_it++;
-
-                if(stree.size(node)>=2){
-
-                    //iterate over corresponding sa and find min and max
-                    offset = stree.lb(node);
-                    int min = stree.csa[offset];
-                    int max = stree.csa[offset];
-                    //int min_pos = offset;
-                    //int max_pos = offset;
-                    std::vector<int> beginning_positions;
-                    for(uint c = 0;c<stree.size(node); c++){
-                        int val = stree.csa[c+offset];
-                        beginning_positions.push_back(val);
-                        if(min > val){
-                            min = val;
-                         //   min_pos = offset+c;
+            StatPhase::wrap("Iterate over ST", [&]{
+
+                for (iterator it = begin; it != end; ++it) {
+                    bins[stree.depth(*it)].push_back(*it);
+                    node_counter++;
+                }
+            });
+
+
+
+
+            uint nts_number =0;
+            StatPhase::wrap("Iterate over Node Bins", [&]{
+
+                for(uint i = bins.size()-1; i>=min_lrf; i--){
+                    auto bin_it = bins[i].begin();
+                    while (bin_it!= bins[i].end()){
+
+                        node_type node = *bin_it;
+
+                        uint offset = stree.csa[stree.lb(node)];
+                        uint fac_length = stree.depth(node);
+
+                        bin_it++;
+
+                        if(stree.size(node)>=2){
+
+                            //iterate over corresponding sa and find min and max
+                            offset = stree.lb(node);
+                            int min = stree.csa[offset];
+                            int max = stree.csa[offset];
+                            //int min_pos = offset;
+                            //int max_pos = offset;
+                            std::vector<int> beginning_positions;
+                            for(uint c = 0;c<stree.size(node); c++){
+                                int val = stree.csa[c+offset];
+                                beginning_positions.push_back(val);
+                                if(min > val){
+                                    min = val;
+                                    //   min_pos = offset+c;
+                                }
+                                if(max < val){
+                                    max = val;
+                                    //  max_pos = offset+c;
+                                }
+
+
+                            }
+                            uint dif = max -min;
+                            if(dif < stree.depth(node)){
+                                continue;
+                            }
+
+                            std::sort(beginning_positions.begin(), beginning_positions.end());
+
+
+                            //Add new rule
+
+
+
+                            //and add new non-terminal symbols
+                            std::vector<int> selected_bp = select_starting_positions(beginning_positions, stree.depth(node));
+                            if(! (selected_bp.size() >=2) ){
+                                continue;
+                            }
+
+                            //vector of text position, length
+                            std::pair<uint,uint> rule = std::make_pair(selected_bp.at(0), fac_length);
+
+
+                            dictionary.push_back(rule);
+
+                            //iterate over selected pos, add non terminal symbols
+                            for(auto bp_it = selected_bp.begin(); bp_it != selected_bp.end(); bp_it++){
+                                //(position in text, non_terminal_symbol_number, length_of_symbol);
+                                //typedef std::tuple<uint,uint,uint> non_term;
+                                non_term nts = std::make_tuple(*bp_it, nts_number, fac_length);
+                                nts_symbols.push_back(nts);
+                                //typedef std::vector<non_term> non_terminal_symbols;
+                                //mark as used
+                                for(uint pos = 0; pos<=fac_length;pos++){
+                                    dead_positions[pos+ *bp_it] = 1;
+                                }
+                            }
+                            nts_number++;
                         }
-                        if(max < val){
-                            max = val;
-                          //  max_pos = offset+c;
-                        }
-

                     }
-                    uint dif = max -min;
-                    if(dif < stree.depth(node)){
-                        continue;
-                    }
-
-                    std::sort(beginning_positions.begin(), beginning_positions.end());
-
-
-                    //Add new rule
-
-
-
-                    //and add new non-terminal symbols
-                    std::vector<int> selected_bp = select_starting_positions(beginning_positions, stree.depth(node));
-                    if(! (selected_bp.size() >=2) ){
-                        continue;
-                    }
-
-                    //vector of text position, length
-                    std::pair<uint,uint> rule = std::make_pair(selected_bp.at(0), fac_length);
-
-
-                    dictionary.push_back(rule);
-
-                    //iterate over selected pos, add non terminal symbols
-                    for(auto bp_it = selected_bp.begin(); bp_it != selected_bp.end(); bp_it++){
-                        //(position in text, non_terminal_symbol_number, length_of_symbol);
-                        //typedef std::tuple<uint,uint,uint> non_term;
-                        non_term nts = std::make_tuple(*bp_it, nts_number, fac_length);
-                        nts_symbols.push_back(nts);
-                        //typedef std::vector<non_term> non_terminal_symbols;
-                        //mark as used
-                        for(uint pos = 0; pos<=fac_length;pos++){
-                            dead_positions[pos+ *bp_it] = 1;
-                        }
-                    }
-                    nts_number++;
+
                 }

-            }
-
-        }
-
-        DLOG(INFO) << "sorting occurences";
-        std::sort(nts_symbols.begin(), nts_symbols.end());
+            });
+        });
+
+        StatPhase::wrap("Sorting occurences", [&]{
+
+            DLOG(INFO) << "sorting occurences";
+            std::sort(nts_symbols.begin(), nts_symbols.end());
+
+        });

     }
 };


get rid of shadowed variable

get rid of shadowed variable

--- sfx2/source/control/unoctitm.cxx
+++ sfx2/source/control/unoctitm.cxx
@@ -809,10 +809,10 @@
                         bFailure = aReq.IsCancelled();
                         if ( bVBARequest )
                         {
-                            SFX_REQUEST_ARG( aReq, pItem, SfxBoolItem, SID_DIALOG_RETURN, FALSE );
-                            if ( pItem )
+                            SFX_REQUEST_ARG( aReq, pDlgRet, SfxBoolItem, SID_DIALOG_RETURN, FALSE );
+                            if ( pDlgRet )
                             {
-                                bSuccess = pItem->GetValue();
+                                bSuccess = pDlgRet->GetValue();
                             }
                         }
                     }


coverity#1315002 Dereference null return value

Change-Id: Ied9081449a38704382fb24c9a66aec493c60ae00

--- sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1008,7 +1008,7 @@
         {
             SfxItemIter aIter( rChgSet );
             const SfxPoolItem* pItem = aIter.FirstItem();
-            if (!IsInvalidItem(pItem))
+            if (pItem && !IsInvalidItem(pItem))
             {
                 const sal_uInt16 nWhich = pItem->Which();


Fixing g++-4.8 build

Fixing g++-4.8 build

--- include/wigwag/detail/creation_storage_adapter.hpp
+++ include/wigwag/detail/creation_storage_adapter.hpp
@@ -39,8 +39,8 @@
 		auto get_ptr() const -> decltype(_s.get_ptr())
 		{ return _s.get_ptr(); }

-		auto operator -> () const -> decltype(&*get_ptr())
-		{ return &*get_ptr(); }
+		auto operator -> () const -> decltype(&*_s.get_ptr())
+		{ return &*_s.get_ptr(); }
 	};

 }}


INTEGRATION: CWS os8 (1.40.2); FILE MERGED 2003/04/10 07:59:03 mba 1.40.2.1: #108761#: new method to set document specific printoptions

--- sfx2/source/doc/sfxbasemodel.cxx
+++ sfx2/source/doc/sfxbasemodel.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: sfxbasemodel.cxx,v $
  *
- *  $Revision: 1.42 $
+ *  $Revision: 1.43 $
  *
- *  last change: $Author: hr $ $Date: 2003-04-04 19:24:37 $
+ *  last change: $Author: vg $ $Date: 2003-04-17 16:24:35 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -2272,7 +2272,15 @@
                     m_pData->m_aPrintOptions[nArgs-1].Value <<= aPrintFile;
                 }
             }
-            else if ( pPrintHint->GetWhich() != -2 )
+            else if ( pPrintHint->GetWhich() == -3 )
+            {
+                sal_Int32 nOld = m_pData->m_aPrintOptions.getLength();
+                sal_Int32 nAdd = pPrintHint->GetAdditionalOptions().getLength();
+                m_pData->m_aPrintOptions.realloc(  nOld + nAdd );
+                for ( sal_Int32 n=0; n<nAdd; n++ )
+                    m_pData->m_aPrintOptions[ nOld+n ] = pPrintHint->GetAdditionalOptions()[n];
+            }
+            else
             {
                 view::PrintJobEvent aEvent;
                 aEvent.Source = m_pData->m_xPrintJob;


Minor tiles related changed.

Minor tiles related changed.

--- src/Tiles/SQLiteCache.cpp
+++ src/Tiles/SQLiteCache.cpp
@@ -63,6 +63,7 @@
 			if (_createNeeded) {
 				SQLiteCache::CreateDatabase();
 				_createNeeded = false;
+				_openNeeded = false;
 			}
 	}
 	section.Unlock();
@@ -74,6 +75,11 @@
 // ***********************************************************
 CStringW SQLiteCache::get_DbName()
 {
+	if (m_dbName.GetLength() == 0)
+	{
+		return get_DefaultDbName();
+	}
+
 	return m_dbName;
 }

@@ -82,6 +88,7 @@
 // ***********************************************************
 bool SQLiteCache::set_DbName(CStringW name)
 {
+
 	if (name.MakeLower() != m_dbName.MakeLower())
 	{
 		m_dbName = name;


Fix Galois field related segfault.

Fix Galois field related segfault.

--- src/Tools/Math/Galois.cpp
+++ src/Tools/Math/Galois.cpp
@@ -37,6 +37,14 @@
 	{
 		std::stringstream message;
 		message << "'m' is supported until 20 ('m' = " << m << ").";
+		throw invalid_argument(__FILE__, __LINE__, __func__, message.str());
+	}
+
+	if ((size_t)m > sizeof(I) * 8)
+	{
+		std::stringstream message;
+		message << "'m' can't be higher than 'sizeof(I) * 8' ('m' = " << m << ", 'sizeof(I) * 8' = "
+		        << (sizeof(I) * 8) << ").";
 		throw invalid_argument(__FILE__, __LINE__, __func__, message.str());
 	}


[IRCE] Fix how IRCE checks for no-sign-overflow.

IRCE requires the induction variables it handles to not sign-overflow.
The current scheme of checking if sext({X,+,S}) == {sext(X),+,sext(S)}
fails when SCEV simplifies sext(X) too.  After this change we //also//
check no-signed-wrap by looking at the flags set on the SCEVAddRecExpr.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@233102 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -707,30 +707,40 @@
     }
   }

-  auto IsInductionVar = [&SE](const SCEVAddRecExpr *AR, bool &IsIncreasing) {
-    if (!AR->isAffine())
-      return false;
+  auto HasNoSignedWrap = [&](const SCEVAddRecExpr *AR) {
+    if (AR->getNoWrapFlags(SCEV::FlagNSW))
+      return true;

     IntegerType *Ty = cast<IntegerType>(AR->getType());
     IntegerType *WideTy =
         IntegerType::get(Ty->getContext(), Ty->getBitWidth() * 2);

+    const SCEVAddRecExpr *ExtendAfterOp =
+        dyn_cast<SCEVAddRecExpr>(SE.getSignExtendExpr(AR, WideTy));
+    if (ExtendAfterOp) {
+      const SCEV *ExtendedStart = SE.getSignExtendExpr(AR->getStart(), WideTy);
+      const SCEV *ExtendedStep =
+          SE.getSignExtendExpr(AR->getStepRecurrence(SE), WideTy);
+
+      bool NoSignedWrap = ExtendAfterOp->getStart() == ExtendedStart &&
+                          ExtendAfterOp->getStepRecurrence(SE) == ExtendedStep;
+
+      if (NoSignedWrap)
+        return true;
+    }
+
+    // We may have proved this when computing the sign extension above.
+    return AR->getNoWrapFlags(SCEV::FlagNSW) != SCEV::FlagAnyWrap;
+  };
+
+  auto IsInductionVar = [&](const SCEVAddRecExpr *AR, bool &IsIncreasing) {
+    if (!AR->isAffine())
+      return false;
+
     // Currently we only work with induction variables that have been proved to
     // not wrap.  This restriction can potentially be lifted in the future.

-    const SCEVAddRecExpr *ExtendAfterOp =
-        dyn_cast<SCEVAddRecExpr>(SE.getSignExtendExpr(AR, WideTy));
-    if (!ExtendAfterOp)
-      return false;
-
-    const SCEV *ExtendedStart = SE.getSignExtendExpr(AR->getStart(), WideTy);
-    const SCEV *ExtendedStep =
-        SE.getSignExtendExpr(AR->getStepRecurrence(SE), WideTy);
-
-    bool NoSignedWrap = ExtendAfterOp->getStart() == ExtendedStart &&
-                        ExtendAfterOp->getStepRecurrence(SE) == ExtendedStep;
-
-    if (!NoSignedWrap)
+    if (!HasNoSignedWrap(AR))
       return false;

     if (const SCEVConstant *StepExpr =


switched buffer opengl calls from ARB to non-ARB

--- TextPainter.cpp
+++ TextPainter.cpp
@@ -42,7 +42,7 @@
 		boost::mutex::scoped_lock lock(OpenGl::getMutex());

 		// create a pixel buffer object
-		glCheck(glGenBuffersARB(1, &_buf));
+		glCheck(glGenBuffers(1, &_buf));
 	}

 	LOG_ALL(textpainterlog) << "created buffer with id " << _buf << std::endl;
@@ -76,7 +76,7 @@
 		boost::mutex::scoped_lock lock(OpenGl::getMutex());

 		// delete pixel buffer object
-		glCheck(glDeleteBuffersARB(1, &_buf));
+		glCheck(glDeleteBuffers(1, &_buf));
 	}

 #endif
@@ -361,14 +361,14 @@
 	OpenGl::Guard guard;

 	// bind buffer for writing
-	glCheck(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, _buf));
+	glCheck(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _buf));

 	// discard previous buffer (so we don't have to wait for GPU until we can
 	// map) and create new buffer
-	glCheck(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, _cairoWidth*_cairoHeight*sizeof(cairo_pixel_t), 0, GL_DYNAMIC_DRAW));
+	glCheck(glBufferData(GL_PIXEL_UNPACK_BUFFER, _cairoWidth*_cairoHeight*sizeof(cairo_pixel_t), 0, GL_DYNAMIC_DRAW));

 	// bind buffer for reading
-	glCheck(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, _buf));
+	glCheck(glBindBuffer(GL_PIXEL_PACK_BUFFER, _buf));

 	LOG_ALL(textpainterlog) << "determine raster position of "
 	                        << _glRoi.minX + 1.0/_lastResolution.x << ", "
@@ -395,7 +395,7 @@
 			0));

 	// map the pixel buffer object
-	unsigned char* p = (unsigned char*)glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+	unsigned char* p = (unsigned char*)glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY);

 	// wrap the buffer in a cairo surface
 	_surface =
@@ -426,10 +426,10 @@
 	OpenGl::Guard guard;

 	// unmap the pixel buffer object
-	glCheck(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB));
+	glCheck(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER));

 	// unbind buffer
-	glCheck(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+	glCheck(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));

 #endif
 }
@@ -443,7 +443,7 @@
 	OpenGl::Guard guard;

 	// bind buffer
-	glCheck(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, _buf));
+	glCheck(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, _buf));

 	// enable alpha blending
 	glEnable(GL_BLEND);
@@ -469,7 +469,7 @@
 	glDisable(GL_BLEND);

 	// unbind buffer
-	glCheck(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
+	glCheck(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));

 #endif
 }


clang/lib/Driver/Multilib.cpp: Rewrite normalizePathSegment() to be tolerant dosish pathsep.

FIXME: It could be more simple...

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@201227 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/Driver/Multilib.cpp
+++ lib/Driver/Multilib.cpp
@@ -29,15 +29,30 @@
 using namespace clang::driver;
 using namespace clang;
 using namespace llvm::opt;
-
+using namespace llvm::sys;
+
+/// normalize Segment to "/foo/bar" or "".
 static void normalizePathSegment(std::string &Segment) {
-  if (Segment.empty() || Segment == "/." || Segment == "/" || Segment == ".") {
+  StringRef seg = Segment;
+
+  // Prune trailing "/" or "./"
+  while (1) {
+    StringRef last = *--path::end(seg);
+    if (last != ".")
+      break;
+    seg = path::parent_path(seg);
+  }
+
+  if (seg.empty() || seg == "/") {
     Segment = "";
+    return;
+  }
+
+  // Add leading '/'
+  if (seg.front() != '/') {
+    Segment = "/" + seg.str();
   } else {
-    if (StringRef(Segment).back() == '/')
-      Segment.erase(Segment.begin() + Segment.size() - 1);
-    if (StringRef(Segment).front() != '/')
-      Segment = "/" + Segment;
+    Segment = seg;
   }
 }


Suppose I should add my copyright message...

--- gpx_factory.hpp
+++ gpx_factory.hpp
@@ -5,6 +5,20 @@
  *
  * I'm writing this to some sample data dumped by the Mytracks android
  * application, so I might miss some stuff from the standard.
+ *
+ * Copyright 2013 Bruce Ide
+ *
+ *  Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
  */

 #ifndef _HPP_GPX_FACTORY


connect to particle cloud, this could help keep wifi alive

--- app/controller/Brewpi.cpp
+++ app/controller/Brewpi.cpp
@@ -91,7 +91,9 @@

     control.update();

-    WiFi.connect(WIFI_CONNECT_SKIP_LISTEN);
+    if(WiFi.hasCredentials()){
+        Particle.connect();
+    }

 	logDebug("init complete");
 }
@@ -111,6 +113,11 @@

     //listen for incoming serial connections while waiting to update
     piLink.receive();
+
+    // System thread enable mode is used so this is not necessary to keep the cloud
+    // connection is alive, but it is necessary to handle the system events, including
+    // the button, so it's here, regardless of the connection state.
+    Particle.process();
 }

 void loop() {


Update TridentTD_Ubidots.cpp

Update TridentTD_Ubidots.cpp

--- src/TridentTD_Ubidots.cpp
+++ src/TridentTD_Ubidots.cpp
@@ -185,7 +185,7 @@
   }

   if(currentValue>maxValues){
-    Serial.println(F("You are sending more than 5 consecutives variables, you just could send 10 variables. Then other variables will be deleted!"));
+    Serial.println(F("You are sending more than 10 consecutives variables, you just could send 10 variables. Then other variables will be deleted!"));
     currentValue = maxValues;
   }
 }


Minor bugfix, TwoParticleGFPart.cpp, Term::isRelevant method

git-svn-id: 10017fdc34b1464762e3d0996936d51ab14f93c2@749 10c4dfc4-00c9-b076-3360-45a67c2f8363

--- src/TwoParticleGFPart.cpp
+++ src/TwoParticleGFPart.cpp
@@ -71,7 +71,7 @@
 inline
 bool TwoParticleGFPart::TwoParticleGFTerm::IsRelevant(const ComplexType &MatrixElementProd)
 {
-    return abs(MatrixElement) > MatrixElementTolerance;
+    return abs(MatrixElementProd) > MatrixElementTolerance;
 }

 //


[analyzer] Add missing pre-post-statement callbacks for OffsetOfExpr.

This expression may or may not be evaluated in compile time, so tracking the
result symbol is of potential interest. However, run-time offsetof is not yet
supported by the analyzer, so for now this callback is only there to assist
future implementation.

Patch by Henry Wong!

Differential Revision: https://reviews.llvm.org/D42300

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@324790 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
+++ lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
@@ -33,6 +33,8 @@
                      check::PostStmt<ArraySubscriptExpr>,
                      check::PreStmt<CXXNewExpr>,
                      check::PostStmt<CXXNewExpr>,
+                     check::PreStmt<OffsetOfExpr>,
+                     check::PostStmt<OffsetOfExpr>,
                      check::PreCall,
                      check::PostCall,
                      check::NewAllocator,
@@ -91,6 +93,16 @@
       llvm::errs() << "PostStmt<CXXNewExpr>\n";
   }

+  void checkPreStmt(const OffsetOfExpr *OOE, CheckerContext &C) const {
+    if (isCallbackEnabled(C, "PreStmtOffsetOfExpr"))
+      llvm::errs() << "PreStmt<OffsetOfExpr>\n";
+  }
+
+  void checkPostStmt(const OffsetOfExpr *OOE, CheckerContext &C) const {
+    if (isCallbackEnabled(C, "PostStmtOffsetOfExpr"))
+      llvm::errs() << "PostStmt<OffsetOfExpr>\n";
+  }
+
   void checkPreCall(const CallEvent &Call, CheckerContext &C) const {
     if (isCallbackEnabled(C, "PreCall")) {
       llvm::errs() << "PreCall";


Update PYTHONPATH to use mConfigDir (-c switch)

--- gizmod/GizmoDaemon.cpp
+++ gizmod/GizmoDaemon.cpp
@@ -255,11 +255,11 @@
 		scope(GizmoDaemonModule).attr("Gizmod") = ptr(this);

 		// Modify the PYTHONPATH so import's work
-		cdbg1 << "Modifying PYTHONPATH" << endl;
+		string PathInsertion = "import sys\nsys.path.insert(0, \"" + mConfigDir + "\")\n";
+		cdbg1 << "Modifying PYTHONPATH:\n" << PathInsertion << endl;
 		handle<> ignore_path_exec((PyRun_String(
-			"import sys\n"
-			"sys.path.insert(0, \"/home/tim/projects/gizmod/gizmod3/scripts/\")\n",
-			Py_file_input, MainNamespace.ptr(), MainNamespace.ptr())));
+			PathInsertion.c_str(),
+			Py_file_input, MainNamespace.ptr(), MainNamespace.ptr())));

 		// execute the main script code
 		string ScriptFile = mConfigDir + SCRIPT_DISPATCHER;


fixed error marker reset after aws errors.

--- fuse/s3fs.cpp
+++ fuse/s3fs.cpp
@@ -296,8 +296,9 @@
          haserror=true; \
       } else{ \
          haserror=false; \
+         result=-ENOENT;\
       } \
-      result=-ENOENT;\
+      result=-EIO;\
     } catch (AWSConnectionException & conException) { \
      S3_LOG_ERROR("AWSConnectionException: "<<conException.what()); \
       haserror=true; \
@@ -305,7 +306,7 @@
     }catch (AWSException & awsException) { \
       S3_LOG_ERROR("AWSException: "<<awsException.what()); \
       haserror=true; \
-      result=-ENOENT;\
+      result=-EIO;\
     }
 #else
 #  define S3FS_CATCH(kind) \
@@ -314,14 +315,15 @@
          haserror=true; \
       } else{ \
          haserror=false; \
+         result=-ENOENT;\
       } \
-      result=-ENOENT;\
+      result=-EIO;\
     } catch (AWSConnectionException & conException) { \
       haserror=true; \
       result=-ECONNREFUSED; \
     }catch (AWSException & awsException) { \
       haserror=true; \
-      result=-ENOENT;\
+      result=-EIO;\
     }
 #endif

@@ -490,6 +492,7 @@
            trycounter++;
 					 if(haserror){
 					 	  S3_LOG_INFO("trying again: TRY " << trycounter);
+              haserror=false;
            }

            // get metadata from s3
@@ -720,6 +723,7 @@
   try{
     do{
       trycounter++;
+      haserror=false;
       S3FS_TRY
         map_t lDirMap;
         lDirMap.insert(pair_t("dir", "1"));
@@ -813,6 +817,7 @@
          trycounter++;
          ListBucketResponsePtr lRes;
          lentries="";
+         haserror=false;
          S3FS_TRY
            std::string lMarker;
            do {
@@ -873,6 +878,7 @@
     // delete folder on s3
     do{
       trycounter++;
+      haserror=false;
       S3FS_TRY
         DeleteResponsePtr lRes = lCon->del(theBucketname, lpath.substr(1));
       S3FS_CATCH(Put)
@@ -1002,6 +1008,7 @@

       do{
         trycounter++;
+        haserror=false;
         ListBucketResponsePtr lRes;
         S3FS_TRY
           std::string lMarker;
@@ -1207,6 +1214,7 @@

     do{
       trycounter++;
+      haserror=false;
       S3FS_TRY
         DeleteResponsePtr lRes = lCon->del(theBucketname, lpath.substr(1));
       S3FS_CATCH(Put)
@@ -1336,6 +1344,7 @@

       do{
         trycounter++;
+        haserror=false;
         S3_LOG_DEBUG("going to make get call to s3 for " << lpath.substr(1) << "; trycounter " << trycounter);
         S3FS_TRY
           GetResponsePtr lGet = lCon->get(theBucketname, lpath.substr(1));
@@ -1512,6 +1521,7 @@

           do{
             trycounter++;
+            haserror=false;
             S3FS_TRY
               map_t lDirMap;
               lDirMap.insert(pair_t("file", "1"));


Fix eror at lives image

Fix eror at lives image

--- interfaces.cpp
+++ interfaces.cpp
@@ -399,7 +399,7 @@
 void printLives(int lives, int posX, int posY){//Fahmi Rosdiansyah
   int i, x=posX;
   for(i=0;i<lives;i++){
-    readimagefile("assets/images/PacmanRightOpen.bmp", x, posY, x+GRIDSIZE, posY+GRIDSIZE);
+    readimagefile("assets/images/RedPacman/PacmanRightOpen.bmp", x, posY, x+GRIDSIZE, posY+GRIDSIZE);
     x+=GRIDSIZE;
     if((i+1)%5==0){
       posY+=GRIDSIZE;


document some host functions

document some host functions

--- libraries/chain/include/eosio/chain/webassembly/interface.hpp
+++ libraries/chain/include/eosio/chain/webassembly/interface.hpp
@@ -952,7 +952,7 @@

          /**
           * Find the table row in a secondary 64-bit integer index table that matches the lowerbound condition for a given secondary key.
-          * Lowerbound secondary index is the first secondary index which key is <= the given secondary index key
+          * Lowerbound secondary index is the first secondary index which key is <= the given secondary index key.
           *
           * @ingroup database uint64_t-secondary-index
           * @param code - the name of the owner of the table.
@@ -970,13 +970,13 @@

          /**
           * Find the table row in a secondary 64-bit integer index table that matches the upperbound condition for a given secondary key.
-          * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key
+          * The table row that matches the upperbound condition is the first table row in the table with the lowest secondary key that is > the given key.
           *
           * @ingroup database uint64_t-secondary-index
           * @param code - the name of the owner of the table.
           * @param scope - the scope where the table resides.
           * @param table - the table name.
-          * @param seconday - pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
+          * @param secondary - pointer to secondary key first used to determine the upperbound and which is then replaced with the secondary key of the found table row.
           * @param primary - pointer to a `uint64_t` variable which will have its value set to the primary key of the found table row.
           *
           * @return iterator to the found table row or the end iterator of the table if the table row could not be found.
@@ -1000,7 +1000,7 @@
           *
           * @ingroup database uint64_t-secondary-index
           * @param iterator - the iterator to the referenced table row.
-          * @param primary - pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row.
+          * @param[out] primary - pointer to a `uint64_t` variable which will have its value set to the primary key of the next table row.
           *
           * @return iterator to the table row following the referenced table row (or the end iterator of the table if the referenced table row is the last one in the table).
           * @pre `iterator` points to an existing table row in the table.
@@ -1013,7 +1013,7 @@
           *
           * @ingroup database uint64_t-secondary-index
           * @param iterator - the iterator to the referenced table row.
-          * @param primary - pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row.
+          * @param[out] primary - pointer to a `uint64_t` variable which will have its value set to the primary key of the previous table row.
           *
           * @return iterator to the table row preceding the referenced table row assuming one exists (it will return -1 if the referenced table row is the first one in the table).
           * @pre `iterator` points to an existing table row in the table or it is the end iterator of the table.


Be lenient on types so that programs that are not very typesafe will work

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@1104 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -192,13 +192,13 @@
 }

 // void "exit"(int)
-GenericValue lle_Vi_exit(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_exit(MethodType *M, const vector<GenericValue> &Args) {
   TheInterpreter->exitCalled(Args[0]);
   return GenericValue();
 }

 // void *malloc(uint)
-GenericValue lle_PI_malloc(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_malloc(MethodType *M, const vector<GenericValue> &Args) {
   assert(Args.size() == 1 && "Malloc expects one argument!");
   GenericValue GV;
   GV.PointerVal = (uint64_t)malloc(Args[0].UIntVal);
@@ -206,13 +206,13 @@
 }

 // void free(void *)
-GenericValue lle_VP_free(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_free(MethodType *M, const vector<GenericValue> &Args) {
   free((void*)Args[0].PointerVal);
   return GenericValue();
 }

 // double pow(double, double)
-GenericValue lle_DDD_pow(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_pow(MethodType *M, const vector<GenericValue> &Args) {
   GenericValue GV;
   GV.DoubleVal = pow(Args[0].DoubleVal, Args[1].DoubleVal);
   return GV;
@@ -220,7 +220,7 @@

 // int printf(sbyte *, ...) - a very rough implementation to make output useful.
-GenericValue lle_iP_printf(MethodType *M, const vector<GenericValue> &Args) {
+GenericValue lle_X_printf(MethodType *M, const vector<GenericValue> &Args) {
   const char *FmtStr = (const char *)Args[0].PointerVal;
   unsigned ArgNo = 1;

@@ -292,13 +292,13 @@
   FuncNames["lle_X_printFloat"] = lle_X_printFloat;
   FuncNames["lle_X_printDouble"] = lle_X_printDouble;
   FuncNames["lle_X_printPointer"] = lle_X_printPointer;
-  FuncNames["lle_Vb_putchar"] = lle_Vb_putchar;
-  FuncNames["lle_ii_putchar"] = lle_ii_putchar;
-  FuncNames["lle_VB_putchar"] = lle_VB_putchar;
-  FuncNames["lle_V___main"] = lle_V___main;
-  FuncNames["lle_Vi_exit"] = lle_Vi_exit;
-  FuncNames["lle_PI_malloc"] = lle_PI_malloc;
-  FuncNames["lle_VP_free"] = lle_VP_free;
-  FuncNames["lle_DDD_pow"] = lle_DDD_pow;
-  FuncNames["lle_iP_printf"] = lle_iP_printf;
-}
+  FuncNames["lle_Vb_putchar"]     = lle_Vb_putchar;
+  FuncNames["lle_ii_putchar"]     = lle_ii_putchar;
+  FuncNames["lle_VB_putchar"]     = lle_VB_putchar;
+  FuncNames["lle_V___main"]       = lle_V___main;
+  FuncNames["lle_X_exit"]         = lle_X_exit;
+  FuncNames["lle_X_malloc"]       = lle_X_malloc;
+  FuncNames["lle_X_free"]         = lle_X_free;
+  FuncNames["lle_X_pow"]          = lle_X_pow;
+  FuncNames["lle_X_printf"]       = lle_X_printf;
+}


iox-#25: Improve concurrent var names

iox-#25: Improve concurrent var names

Signed-off-by: Hintz Martin (CC-AD/ESW1) <cfa934f6a18d8fc1b7e02e9604aec5d1a5fb6d87@de.bosch.com>

--- iceoryx_posh/test/integrationtests/test_popo_port_user_building_blocks.cpp
+++ iceoryx_posh/test/integrationtests/test_popo_port_user_building_blocks.cpp
@@ -110,8 +110,8 @@
     MemoryManager m_memoryManager;

     using ConcurrentCaproMessageVector_t = iox::concurrent::smart_lock<vector<CaproMessage, 1>>;
-    ConcurrentCaproMessageVector_t m_concurrentCaproMessageVector;
-    iox::concurrent::smart_lock<vector<CaproMessage, 1>> m_caproMessageRx;
+    ConcurrentCaproMessageVector_t m_concurrentCaproMessageExchange;
+    ConcurrentCaproMessageVector_t m_concurrentCaproMessageRx;

     // subscriber port for single producer
     SubscriberPortData m_subscriberPortDataSingleProducer{
@@ -168,7 +168,7 @@
         bool finished{false};

         // Wait for publisher to be ready
-        auto caproMessage = waitForCaproMessage(m_concurrentCaproMessageVector, CaproMessageType::OFFER);
+        auto caproMessage = waitForCaproMessage(m_concurrentCaproMessageExchange, CaproMessageType::OFFER);

         // Subscribe to publisher
         subscriberPortUser.subscribe();
@@ -176,7 +176,7 @@
         if (maybeCaproMessage.has_value())
         {
             caproMessage = maybeCaproMessage.value();
-            m_concurrentCaproMessageVector->push_back(caproMessage);
+            m_concurrentCaproMessageExchange->push_back(caproMessage);
         }
         else
         {
@@ -185,7 +185,7 @@
         }

         // Wait for subscription ACK from publisher
-        caproMessage = waitForCaproMessage(m_concurrentCaproMessageVector, CaproMessageType::ACK);
+        caproMessage = waitForCaproMessage(m_concurrentCaproMessageExchange, CaproMessageType::ACK);

         // Let RouDi change state to finish subscription
         static_cast<void>(subscriberPortRouDi.dispatchCaProMessage(caproMessage));
@@ -236,7 +236,7 @@
             if (maybeCaproMessage.has_value())
             {
                 caproMessage = maybeCaproMessage.value();
-                m_concurrentCaproMessageVector->push_back(caproMessage);
+                m_concurrentCaproMessageExchange->push_back(caproMessage);
             }
             else
             {
@@ -245,15 +245,15 @@
             }

             // Wait for subscriber to subscribe
-            caproMessage = waitForCaproMessage(m_concurrentCaproMessageVector, CaproMessageType::SUB);
-            m_caproMessageRx->push_back(caproMessage);
+            caproMessage = waitForCaproMessage(m_concurrentCaproMessageExchange, CaproMessageType::SUB);
+            m_concurrentCaproMessageRx->push_back(caproMessage);

             // Send ACK to subscriber
-            maybeCaproMessage = publisherPortRouDi.dispatchCaProMessage(m_caproMessageRx->back());
+            maybeCaproMessage = publisherPortRouDi.dispatchCaProMessage(m_concurrentCaproMessageRx->back());
             if (maybeCaproMessage.has_value())
             {
                 caproMessage = maybeCaproMessage.value();
-                m_concurrentCaproMessageVector->push_back(caproMessage);
+                m_concurrentCaproMessageExchange->push_back(caproMessage);
             }
             else
             {
@@ -270,9 +270,9 @@
             {
                 std::this_thread::sleep_for(std::chrono::microseconds(10));

-                if (m_caproMessageRx->size() != 0)
+                if (m_concurrentCaproMessageRx->size() != 0)
                 {
-                    caproMessageRouDi = m_caproMessageRx->back();
+                    caproMessageRouDi = m_concurrentCaproMessageRx->back();
                 }

             } while (caproMessageRouDi.m_type != CaproMessageType::SUB);


Remove redundant objects from memory unit tests (#686)

--- simulator/memory/t/unit_test.cpp
+++ simulator/memory/t/unit_test.cpp
@@ -74,9 +74,8 @@

 TEST_CASE( "Func_memory: Read_Method_Test")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    ElfLoader( valid_elf_file).load_to( ptr.get());
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();
+    ElfLoader( valid_elf_file).load_to( func_mem.get());

     // read 4 bytes from the func_mem start addr
     CHECK( func_mem->read<uint32, Endian::little>( dataSectAddr) == 0x03020100);
@@ -101,9 +100,8 @@

 TEST_CASE( "Func_memory: Write_Read_Initialized_Mem_Test")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    ElfLoader( valid_elf_file).load_to( ptr.get());
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();
+    ElfLoader( valid_elf_file).load_to( func_mem.get());

     // write 1 into the byte pointed by dataSectAddr
     func_mem->write<uint8, Endian::little>( 1, dataSectAddr);
@@ -123,9 +121,8 @@

 TEST_CASE( "Func_memory: Write_Read_Not_Initialized_Mem_Test")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    ElfLoader( valid_elf_file).load_to( ptr.get());
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();
+    ElfLoader( valid_elf_file).load_to( func_mem.get());

     uint64 write_addr = 0x3FFFFE;

@@ -143,8 +140,7 @@

 TEST_CASE( "Func_memory: Host_Guest_Memcpy_1b")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();

     // Single byte
     const Byte write_data_1{ 0xA5};
@@ -161,8 +157,7 @@

 TEST_CASE( "Func_memory: Host_Guest_Memcpy_8b")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();

     // 8 bytes
     const constexpr size_t size = 8;
@@ -184,8 +179,7 @@

 TEST_CASE( "Func_memory: Host_Guest_Memcpy_1024b")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();

     // 1 KByte
     const  constexpr size_t size = 1024;
@@ -207,9 +201,8 @@

 TEST_CASE( "Func_memory: Dump")
 {
-    auto ptr = FuncMemory::create_hierarchied_memory();
-    ElfLoader( valid_elf_file).load_to( ptr.get());
-    std::shared_ptr<FuncMemory> func_mem = ptr;
+    auto func_mem = FuncMemory::create_hierarchied_memory();
+    ElfLoader( valid_elf_file).load_to( func_mem.get());

     CHECK( func_mem->dump() ==
         "addr 0x400095: data 0xc\n"


script support address

script support address

Signed-off-by: bess <776536184@qq.com>

Former-commit-id: 84c67a95274ee2ac743557fcac3f2bd1ea338229

--- src/VmScript/CVir8051.cpp
+++ src/VmScript/CVir8051.cpp
@@ -555,16 +555,30 @@
 	CVmScriptRun *pVmScript = (CVmScriptRun *)pVmScriptRun;
 	vector<std::shared_ptr < vector<unsigned char> > > retdata;

-    if(!GetData(ipara,retdata) ||retdata.size() != 1|| retdata.at(0).get()->size() != 6)
+    if(!GetData(ipara,retdata) ||retdata.size() != 1)  //|| retdata.at(0).get()->size() != 6)
     {
     	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
     	return std::make_tuple (false, tem);
     }
     bool flag = true;

+	auto GetKeyId = [](string const &addr,CKeyID &KeyId) {
+		if (!CRegID::GetKeyID(addr, KeyId)) {
+			KeyId=CKeyID(addr);
+			if (KeyId.IsEmpty())
+			return false;
+		}
+		return true;
+	};
+	string addr((*retdata[0]).begin(), (*retdata[0]).end());
+	CKeyID addrKeyId;
+	if (!GetKeyId(addr, addrKeyId)) {
+    	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
+    	return std::make_tuple (false, tem);
+	}
+
+	CUserID userid(addrKeyId);
 	CAccount aAccount;
-	CRegID regid(*retdata.at(0));
-	CUserID userid(regid);
 	if (!pVmScript->GetCatchView()->GetAccount(userid, aAccount)) {
 		flag = false;
 	}
@@ -587,15 +601,31 @@
 static RET_DEFINE ExQueryAccountBalanceFunc(unsigned char * ipara,void * pVmScriptRun) {
 	CVmScriptRun *pVmScript = (CVmScriptRun *)pVmScriptRun;
 	vector<std::shared_ptr < vector<unsigned char> > > retdata;
-    if(!GetData(ipara,retdata) ||retdata.size() != 1|| retdata.at(0).get()->size() != 6)
+    if(!GetData(ipara,retdata) ||retdata.size() != 1)//|| retdata.at(0).get()->size() != 6)
     {
     	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
     	return std::make_tuple (false, tem);
     }
 	bool flag = true;
+
+	auto GetKeyId = [](string const &addr,CKeyID &KeyId) {
+		if (!CRegID::GetKeyID(addr, KeyId)) {
+			KeyId=CKeyID(addr);
+			if (KeyId.IsEmpty())
+			return false;
+		}
+		return true;
+	};
+	string addr((*retdata[0]).begin(), (*retdata[0]).end());
+	CKeyID addrKeyId;
+	if (!GetKeyId(addr, addrKeyId)) {
+    	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
+    	return std::make_tuple (false, tem);
+	}
+
+	CUserID userid(addrKeyId);
 	CAccount aAccount;
-	CRegID regid(*retdata.at(0));
-	CUserID userid(regid);
+
 	if (!pVmScript->GetCatchView()->GetAccount(userid, aAccount)) {
 		flag = false;
 	}
@@ -968,9 +998,24 @@
 	memcpy(&money,&retdata.at(1).get()->at(0),sizeof(money));

 	bool flag = true;
+
+	auto GetKeyId = [](string const &addr,CKeyID &KeyId) {
+		if (!CRegID::GetKeyID(addr, KeyId)) {
+			KeyId=CKeyID(addr);
+			if (KeyId.IsEmpty())
+			return false;
+		}
+		return true;
+	};
+	string addr((*retdata[0]).begin(), (*retdata[0]).end());
+	CKeyID addrKeyId;
+	if (!GetKeyId(addr, addrKeyId)) {
+    	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
+    	return std::make_tuple (false, tem);
+	}
+
+	CUserID userid(addrKeyId);
 	CAccount aAccount;
-	CRegID regid(*retdata.at(0));
-	CUserID userid(regid);
 	if (!pVmScriptRun->GetCatchView()->GetAccount(userid, aAccount)) {
 		flag = false;
 	}
@@ -1165,15 +1210,30 @@
 	CVmScriptRun *pVmScriptRun = (CVmScriptRun *)pVmScript;
 	vector<std::shared_ptr < vector<unsigned char> > > retdata;

-    if(!GetData(ipara,retdata) ||retdata.size() != 1 || retdata.at(0).get()->size() != 6)
+    if(!GetData(ipara,retdata) ||retdata.size() != 1 )//|| retdata.at(0).get()->size() != 6)
     {
     	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
     	return std::make_tuple (false, tem);
     }
 	bool flag = true;
+
+	auto GetKeyId = [](string const &addr,CKeyID &KeyId) {
+		if (!CRegID::GetKeyID(addr, KeyId)) {
+			KeyId=CKeyID(addr);
+			if (KeyId.IsEmpty())
+			return false;
+		}
+		return true;
+	};
+	string addr((*retdata[0]).begin(), (*retdata[0]).end());
+	CKeyID addrKeyId;
+	if (!GetKeyId(addr, addrKeyId)) {
+    	auto tem =  make_shared<std::vector< vector<unsigned char> > >();
+    	return std::make_tuple (false, tem);
+	}
+
+	CUserID userid(addrKeyId);
 	CAccount aAccount;
-	CRegID regid(*retdata.at(0));
-	CUserID userid(regid);
 	if (!pVmScriptRun->GetCatchView()->GetAccount(userid, aAccount)) {
 		flag = false;
 	}


Made MpodAlsa::disableDevice more tolerant of situations.
It was very rigid of everything being in the "perfect" enabled state.
Such that it would bail out of disabling sometimes, leaving the MpodAlsa
with mIsEnabled == TRUE and no way to set it to FALSE.  Hense we get an
assert when deleting the MpodAlsa as it is still "enabled".

git-svn-id: 8a77b5e12cf30fc5f8c95b12d648985d6db39537@12521 a612230a-c5fa-0310-af8b-88eea846685b

--- sipXmediaLib/src/mp/MpodAlsa.cpp
+++ sipXmediaLib/src/mp/MpodAlsa.cpp
@@ -82,6 +82,10 @@
                                MpFrameTime currentFrameTime,
                                OsCallback &frameTicker)
 {
+#ifdef TEST_PRINT
+   OsSysLog::add(FAC_MP, PRI_DEBUG,
+                 "MpodAlsa::enableDevice start");
+#endif
    OsStatus ret;
    if (isEnabled())
    {
@@ -129,6 +133,10 @@
    {
       return ret;
    }
+#ifdef TEST_PRINT
+   OsSysLog::add(FAC_MP, PRI_DEBUG,
+                 "MpodAlsa::enableDevice set");
+#endif
    mIsEnabled = TRUE;

    return ret;
@@ -136,24 +144,57 @@

 OsStatus MpodAlsa::disableDevice()
 {
-   OsStatus ret;
+#ifdef TEST_PRINT
+   OsSysLog::add(FAC_MP, PRI_DEBUG,
+                 "MpodAlsa::disableDevice start");
+#endif
+   OsStatus ret = OS_SUCCESS;
    if (!isEnabled())
    {
+#ifdef TEST_PRINT
+       OsSysLog::add(FAC_MP, PRI_DEBUG,
+                     "MpodAlsa::disableDevice not enabled");
+#endif
        return OS_FAILED;
    }

    // If the device is not valid, let the user know it's bad.
    if (!isDeviceValid())
    {
-      return OS_INVALID_STATE;
-   }
-
-   ret = pDevWrapper->detachWriter();
-   if (ret != OS_SUCCESS)
-   {
-      return ret;
+#ifdef TEST_PRINT
+       OsSysLog::add(FAC_MP, PRI_DEBUG,
+                     "MpodAlsa::disableDevice not valid");
+#endif
+      ret = OS_INVALID_STATE;
+   }
+
+   if(ret != OS_SUCCESS)
+   {
+       // Attempt the detach despite the prior error, but
+       // don't hide the prior error.
+       pDevWrapper->detachWriter();
+#ifdef TEST_PRINT
+       OsSysLog::add(FAC_MP, PRI_DEBUG,
+                     "MpodAlsa::disableDevice detach no ret check");
+#endif
+   }
+   else
+   {
+       ret = pDevWrapper->detachWriter();
+       if (ret != OS_SUCCESS)
+       {
+#ifdef TEST_PRINT
+           OsSysLog::add(FAC_MP, PRI_DEBUG,
+                         "MpodAlsa::disableDevice detach ret: %d",
+                         ret);
+#endif
+       }
    }
    delete[] mAudioFrame;
+#ifdef TEST_PRINT
+   OsSysLog::add(FAC_MP, PRI_DEBUG,
+                 "MpodAlsa::disableDevice set");
+#endif
    mIsEnabled = FALSE;

    pDevWrapper->freeOutputDevice();


Updated to use new style functions.

Updated to use new style functions.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@879 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/LibUtilities/Interpreter/ExpressionEvaluator.cpp
+++ library/LibUtilities/Interpreter/ExpressionEvaluator.cpp
@@ -35,14 +35,14 @@
         // requires the first argument to be an integer.
         static double Jn (double i, double x)
         {
-            return jn((int) i, x);
+            return _jn((int) i, x);
         }

         // Bessel function of the second kind. This is used since the math.h function
         // requires the first argument to be an integer.
         static double Yn (double i, double x)
         {
-            return yn((int) i, x);
+            return _yn((int) i, x);
         }

         // ---------------------------------------------------------------------
@@ -104,12 +104,12 @@
                     ("sqrt",	sqrt)
                     ("tan",		tan)
                     ("tanh",	tanh)
-                    ("hypot",	hypot)
-                    ("j0",		j0)
-                    ("j1",		j1)
+                    ("hypot",	_hypot)
+                    ("j0",		_j0)
+                    ("j1",		_j1)
                     ("jn",		Jn)
-                    ("y0",		y0)
-                    ("y1",		y1)
+                    ("y0",		_y0)
+                    ("y1",		_y1)
                     ("yn",		Yn)

                     // These won't work because they require pointer or integer input.


Fix bug in method getBoundingBox() (matrix transformation)

--- glc_mesh2.cpp
+++ glc_mesh2.cpp
@@ -99,7 +99,8 @@
         pBoundingBox->combine(iEntry.value());
         ++iEntry;
     }
-
+
+    pBoundingBox->transform(m_MatPos);
 	return pBoundingBox;
 }


Turn serialization back on in GM.

Turn serialization back on in GM.

With https://codereview.appspot.com/6503106/ it is now safe to do
serialization by default.

Review URL: https://codereview.appspot.com/6498121

git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@5551 2bbb7eff-a529-9590-31e7-b0007b416f81

--- gm/gmmain.cpp
+++ gm/gmmain.cpp
@@ -775,7 +775,7 @@
         SkDebugf(gRec[i].fName);
     }
     SkDebugf(" ]\n");
-    SkDebugf("    [--noreplay] [--nopipe] [--serialize] [--forceBWtext] [--nopdf] \n"
+    SkDebugf("    [--noreplay] [--nopipe] [--noserialize] [--forceBWtext] [--nopdf] \n"
              "    [--tiledPipe] \n"
              "    [--nodeferred] [--match substring] [--notexturecache]\n"
              "    [-h|--help]\n"
@@ -791,7 +791,7 @@
     SkDebugf("    --nopipe: Skip SkGPipe replay.\n");
     SkDebugf("    --tiledPipe: Exercise tiled SkGPipe replay.\n");
     SkDebugf(
-             "    --serialize: exercise SkPicture serialization & deserialization.\n");
+             "    --noserialize: do not exercise SkPicture serialization & deserialization.\n");
     SkDebugf("    --forceBWtext: disable text anti-aliasing.\n");
     SkDebugf("    --nopdf: skip the pdf rendering test pass.\n");
     SkDebugf("    --nodeferred: skip the deferred rendering test pass.\n");
@@ -888,7 +888,7 @@
     bool doReplay = true;
     bool doPipe = true;
     bool doTiledPipe = false;
-    bool doSerialize = false;
+    bool doSerialize = true;
     bool doDeferred = true;
     bool disableTextureCache = false;
     SkTDArray<size_t> configs;
@@ -941,7 +941,11 @@
         } else if (strcmp(*argv, "--enable-missing-warning") == 0) {
             gNotifyMissingReadReference = true;
         } else if (strcmp(*argv, "--serialize") == 0) {
+            // Leaving in this option so that a user need not modify their command line arguments
+            // to still run.
             doSerialize = true;
+        } else if (strcmp(*argv, "--noserialize") == 0) {
+            doSerialize = false;
         } else if (strcmp(*argv, "--match") == 0) {
             ++argv;
             if (argv < stop && **argv) {


Removing outdated comment.

Removing outdated comment.

--- googledataresource.cpp
+++ googledataresource.cpp
@@ -70,8 +70,6 @@
 	Q_UNUSED( parts );
 	const QString entry_id = item.remoteId();
 	QString temp;
-	/* I assume that here I can report the atom::entry data?
-	 */
 	Item newItem(item);
 	gcal_contact_t contact;
 	KABC::Addressee addressee;


Improved exception handling in function template

--- modules/matlab/generator/templates/template_function_base.cpp
+++ modules/matlab/generator/templates/template_function_base.cpp
@@ -37,7 +37,11 @@

   // call the opencv function
   // [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
-  {{fun.name}}();
+  try {
+    {{fun.name}}();
+  } catch(...) {
+    mexErrMsgTxt("Uncaught exception occurred in {{fun.name}}");
+  }
   {% block fcall %}
   {% endblock %}


Prediction: treat latitude and longitude dist in TrackingAdaptation

--- modules/prediction/container/obstacles/obstacles_container.cc
+++ modules/prediction/container/obstacles/obstacles_container.cc
@@ -217,7 +217,8 @@
       while (curr != nullptr) {
         int obs_id = curr->key;
         curr = curr->next;
-        if (seen_perception_ids.find(obs_id) != seen_perception_ids.end() ||
+        if (obs_id < 0 ||
+            seen_perception_ids.find(obs_id) != seen_perception_ids.end() ||
             seen_prediction_ids.find(obs_id) != seen_prediction_ids.end()) {
           // this obs_id has already been processed
           continue;
@@ -300,9 +301,15 @@
     double obs_y = obstacle_ptr->latest_feature().position().y() + (timestamp_ -
                    obstacle_ptr->latest_feature().timestamp()) *
                    obstacle_ptr->latest_feature().raw_velocity().y();
-    double dist = std::hypot(perception_obstacle.position().x() - obs_x,
-                             perception_obstacle.position().y() - obs_y);
-    if (dist < FLAGS_max_tracking_dist) {
+    double v_heading = std::atan2(
+        obstacle_ptr->latest_feature().raw_velocity().y(),
+        obstacle_ptr->latest_feature().raw_velocity().x());
+    double dist_x = perception_obstacle.position().x() - obs_x;
+    double dist_y = perception_obstacle.position().y() - obs_y;
+    double dist = std::hypot(dist_x, dist_y);
+    double angle = std::atan2(dist_y, dist_x) - v_heading;
+    if (std::abs(dist * std::cos(angle)) < FLAGS_max_tracking_dist &&
+        std::abs(dist * std::sin(angle)) < FLAGS_max_tracking_dist / 3) {
       return true;
     }
   }