Fix typo

Fix typo

--- src/ui/px4_configuration/PX4RCCalibration.cc
+++ src/ui/px4_configuration/PX4RCCalibration.cc
@@ -258,7 +258,7 @@
 ///     @param fval Current value for channel
 void PX4RCCalibration::_remoteControlChannelRawChanged(int chan, float fval)
 {
-    Q_ASSERT(chan >=0 and chan <= _chanMax);
+    Q_ASSERT(chan >=0 && chan <= _chanMax);

     // We always update raw values
     _rcRawValue[chan] = fval;


Update g_dfs_server.cpp

Update g_dfs_server.cpp

--- module/gdfs/gdfsserver/src/g_dfs_server.cpp
+++ module/gdfs/gdfsserver/src/g_dfs_server.cpp
@@ -28,9 +28,11 @@

 DfsServer::~DfsServer()
 {
+    G_LOG_IN();
     gcom::ServerFactory::intance().destroyServer(m_httpServer);
     gcom::ServerFactory::intance().destroyServer(m_ftpServer);
     gcom::ServerFactory::intance().destroyServer(m_cliServer);
+    G_LOG_OUT();
 }

 GResult DfsServer::start()
@@ -53,6 +55,11 @@
     m_httpServer = gcom::ServerFactory::intance().createServer(HTTP_SERVER);
     m_ftpServer = gcom::ServerFactory::intance().createServer(FTP_SERVER);
     m_cliServer = gcom::ServerFactory::intance().createServer(CLI_SERVER);
+
+    // startup all service
+    m_httpServer->start();
+    m_ftpServer->start();
+    m_cliServer->start();

     // start routine() thread
     this->startTask();
@@ -82,13 +89,9 @@
 {
     G_LOG_IN();

-    m_httpServer->start();
-    m_ftpServer->start();
-    m_cliServer->start();
-
     for (;;)
     {
-        // startup all server
+        // keep all service is running
         gcom::NetworkServerMonitor::keepServer(m_httpServer);
         gcom::NetworkServerMonitor::keepServer(m_ftpServer);
         gcom::NetworkServerMonitor::keepServer(m_cliServer);


add const to member function of PDBReader

--- includes/PDBReader.hpp
+++ includes/PDBReader.hpp
@@ -1,8 +1,8 @@
 /*!
   @file PDBReader.hpp
-  @brief definition of a class that reads pdb atom.
+  @brief pdb reader.

-  read pdb file and store the information as std::vector of shared_ptr of PDBAtom
+  read pdb atoms from input stream and parse atoms as chains.

   @author Toru Niina (niina.toru.68u@gmail.com)
   @date 2016-06-10 13:00
@@ -40,17 +40,17 @@
     PDBReader() = default;
     ~PDBReader() = default;

-    std::vector<chain_type> parse(const std::vector<atom_type>& atoms);
+    std::vector<chain_type> parse(const std::vector<atom_type>& atoms) const;

-    std::vector<atom_type> read(const std::string& fname);
-    std::vector<atom_type> read(const std::string& fname, const std::size_t model_idx);
-    std::vector<atom_type> read(std::basic_istream<char>& fname);
-    std::vector<atom_type> read(std::basic_istream<char>& fname, const std::size_t model_idx);
+    std::vector<atom_type> read(const std::string& fname) const;
+    std::vector<atom_type> read(const std::string& fname, const std::size_t model_idx) const;
+    std::vector<atom_type> read(std::basic_istream<char>& fname) const;
+    std::vector<atom_type> read(std::basic_istream<char>& fname, const std::size_t model_idx) const;
 };

 template<typename vectorT>
 std::vector<typename PDBReader<vectorT>::atom_type>
-PDBReader<vectorT>::read(const std::string& fname)
+PDBReader<vectorT>::read(const std::string& fname) const
 {
     std::ifstream ifs(fname);
     if(not ifs.good()) throw std::runtime_error("file open error: " + fname);
@@ -61,7 +61,7 @@

 template<typename vectorT>
 std::vector<typename PDBReader<vectorT>::atom_type>
-PDBReader<vectorT>::read(const std::string& fname, const std::size_t model_idx)
+PDBReader<vectorT>::read(const std::string& fname, const std::size_t model_idx) const
 {
     std::ifstream ifs(fname);
     if(not ifs.good()) throw std::runtime_error("file open error: " + fname);
@@ -72,7 +72,7 @@

 template<typename vectorT>
 std::vector<typename PDBReader<vectorT>::atom_type>
-PDBReader<vectorT>::read(std::basic_istream<char>& ifs, const std::size_t model_idx)
+PDBReader<vectorT>::read(std::basic_istream<char>& ifs, const std::size_t model_idx) const
 {
     while(not ifs.eof())
     {
@@ -95,7 +95,7 @@

 template<typename vectorT>
 std::vector<typename PDBReader<vectorT>::atom_type>
-PDBReader<vectorT>::read(std::basic_istream<char>& ifs)
+PDBReader<vectorT>::read(std::basic_istream<char>& ifs) const
 {
     std::vector<atom_type> atoms;
     while(not ifs.eof())
@@ -113,7 +113,7 @@

 template<typename vectorT>
 std::vector<typename PDBReader<vectorT>::chain_type>
-PDBReader<vectorT>::parse(const std::vector<atom_type>& atoms)
+PDBReader<vectorT>::parse(const std::vector<atom_type>& atoms) const
 {
     std::vector<residue_type> residues;
     residue_type tmp_residue;


--HG--
extra : convert_revision : ef3db3c9d9d95ad6f322beee89461d1274ee21a7

--- pkg/trunk/motion_planning/ompl/code/ompl/extension/samplingbased/kinematic/extension/ik/src/GAIK.cpp
+++ pkg/trunk/motion_planning/ompl/code/ompl/extension/samplingbased/kinematic/extension/ik/src/GAIK.cpp
@@ -87,18 +87,7 @@
     {
 	generations++;
 	std::sort(pool.begin(), pool.end(), gs);
-	for (unsigned int i = 0 ; i < 5 ; ++i)
-	{
-	    if (si->isValid(static_cast<SpaceInformationKinematic::StateKinematic_t>(pool[i].state)))
-	    {
-		if (tryToSolve(pool[i].state, &(pool[i].distance)))
-		{
-		    solved = true;
-		    solution = i;
-		    break;
-		}
-	    }
-	}
+
 	for (unsigned int i = m_poolSize ; i < maxPoolSize ; ++i)
 	{
 	    si->sampleNear(pool[i].state, pool[i%m_poolSize].state, range);
@@ -124,6 +113,13 @@
 	path->states.push_back(st);
 	goal_r->setDifference(pool[solution].distance);
 	goal_r->setSolutionPath(path);
+
+
+	double dist = goal_r->getDifference();
+	tryToSolve(path->states[0], &dist);
+	goal_r->setDifference(dist);
+
+
     }
     else
     {
@@ -139,6 +135,14 @@
 		path->states.push_back(st);
 		goal_r->setDifference(pool[i].distance);
 		goal_r->setSolutionPath(path, true);
+
+
+
+		double dist = goal_r->getDifference();
+		tryToSolve(path->states[0], &dist);
+		goal_r->setDifference(dist);
+
+
 		break;
 	    }
 	}
@@ -152,28 +156,11 @@

 bool ompl::GAIK::tryToSolve(SpaceInformationKinematic::StateKinematic_t state, double *distance)
 {
-    double dist = *distance;
-
-    if (tryToSolveFact(1.01, state, distance))
-	return true;
-
-    if (dist > *distance)
-    {
-	dist = *distance;
-	if (tryToSolveFact(1.003, state, distance))
-	    return true;
-    }
-    else
-	return false;
-
-    if (dist > *distance)
-    {
-	dist = *distance;
-	if (tryToSolveFact(1.001, state, distance))
-	    return true;
-    }
-
-    return false;
+    tryToSolveFact(1.1, state, distance);
+    tryToSolveFact(1.01, state, distance);
+    tryToSolveFact(1.001, state, distance);
+    tryToSolveFact(1.0001, state, distance);
+    return true;
 }

 bool ompl::GAIK::tryToSolveFact(double factorP, SpaceInformationKinematic::StateKinematic_t state, double *distance)


Pass texture name by reference

Pass texture name by reference

--- src/core/Loader.cpp
+++ src/core/Loader.cpp
@@ -2,9 +2,9 @@

 namespace Kvant {

-static std::vector<std::string> process_material_texture(aiMaterial *mat,
-                                                         aiTextureType type,
-                                                         std::string typeName) {
+static std::vector<std::string>
+process_material_texture(aiMaterial *mat, aiTextureType type,
+                         const std::string &typeName) {
   std::vector<std::string> textures;

   for (unsigned int t = 0; t < mat->GetTextureCount(type); t++) {


Makes ScrollbarTheme call through to theme engine for corner (2)

Hopefully the last bit of wiring needed to let the theme engine draw
the corner.

BUG=333499
TEST=none
R=jamesr@chromium.org

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@166630 bbb929c8-8fbe-4397-9dbb-9b2b20218538

--- Source/platform/scroll/ScrollbarTheme.cpp
+++ Source/platform/scroll/ScrollbarTheme.cpp
@@ -31,6 +31,12 @@
 #include "platform/scroll/ScrollbarThemeMock.h"
 #include "platform/scroll/ScrollbarThemeOverlayMock.h"

+#if !OS(MACOSX)
+#include "public/platform/Platform.h"
+#include "public/platform/WebRect.h"
+#include "public/platform/default/WebThemeEngine.h"
+#endif
+
 namespace WebCore {

 ScrollbarTheme* ScrollbarTheme::theme()
@@ -292,7 +298,14 @@

 void ScrollbarTheme::paintScrollCorner(GraphicsContext* context, const IntRect& cornerRect)
 {
+    if (cornerRect.isEmpty())
+        return;
+
+#if OS(MACOSX)
     context->fillRect(cornerRect, Color::white);
+#else
+    blink::Platform::current()->themeEngine()->paint(context->canvas(), blink::WebThemeEngine::PartScrollbarCorner, blink::WebThemeEngine::StateNormal, blink::WebRect(cornerRect), 0);
+#endif
 }

 IntRect ScrollbarTheme::thumbRect(ScrollbarThemeClient* scrollbar)


remove disabled mask load and store code

Things ran slower when we attempted to turn it on,
and we've already removed the analog in SkJumper_stages.cpp.

Change-Id: I61afa38990bf54d1bff2b1902f09a14df4e17da9
Reviewed-on: https://skia-review.googlesource.com/37080
Reviewed-by: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@chromium.org>
Commit-Queue: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@chromium.org>

--- src/jumper/SkJumper_stages_8bit.cpp
+++ src/jumper/SkJumper_stages_8bit.cpp
@@ -256,39 +256,6 @@
     unaligned_store(dst, v);
 }

-#if 0 && defined(__AVX2__)
-    SI U32 mask(size_t tail) {
-        // We go a little out of our way to avoid needing large constant values here.
-
-        // It's easiest to build the mask as 8 8-bit values, either 0x00 or 0xff.
-        // Start fully on, then shift away lanes from the top until we've got our mask.
-        uint64_t mask = 0xffffffffffffffff >> 8*(kStride-tail);
-
-        // Sign-extend each mask lane to its full width, 0x00000000 or 0xffffffff.
-        using S8  = int8_t  __attribute__((ext_vector_type(8)));
-        using S32 = int32_t __attribute__((ext_vector_type(8)));
-        return (U32)__builtin_convertvector(unaligned_load<S8>(&mask), S32);
-    }
-
-    template <>
-    inline U32 load(const uint32_t* src, size_t tail) {
-        __builtin_assume(tail < kStride);
-        if (__builtin_expect(tail, 0)) {
-            return _mm256_maskload_epi32((const int*)src, mask(tail));
-        }
-        return unaligned_load<U32>(src);
-    }
-
-    template <>
-    inline void store(uint32_t* dst, U32 v, size_t tail) {
-        __builtin_assume(tail < kStride);
-        if (__builtin_expect(tail, 0)) {
-            return _mm256_maskstore_epi32((int*)dst, mask(tail), v);
-        }
-        unaligned_store(dst, v);
-    }
-#endif
-
 // Used by load_ and store_ stages to get to the right (x,y) starting point of contiguous memory.
 template <typename T>
 SI T* ptr_at_xy(const SkJumper_MemoryCtx* ctx, int x, int y) {


IWorkController interface

IWorkController interface


Improved zlib error message

Improved zlib error message

Sometimes writing to compressed files can result in an unhelpful error message:
"zlib deflate failed:"
Which does not contain details because a message field is not given to us by zlib in all
cases. This patch addresses one of those cases mentioned in the zlib documentation, namely
when the output buffer is too small to hold the compressed input.

Change-Id: I4aa53083f79caf424c47ed6978789ad09ac82b63
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5159
Reviewed-by: Victor Bittorf <7b0a82a581d2903422f8daab53468fd68be74b9a@cloudera.com>
Tested-by: jenkins


Portability: rev 4211 should compile under Linux too.

git-svn-id: 6fc9ba494899942902f7488ac93c4c58960a7ec4@4213 1f79f812-37fb-46fe-a122-30589dd2bf55

--- src/core/Report.cpp
+++ src/core/Report.cpp
@@ -18,7 +18,6 @@

 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/stat.h>
 #include <errno.h>

 #include <sstream>
@@ -51,25 +50,26 @@

 static bool isFileUnicode(const stringT &fname)
 {
-  struct _stat statbuf;
-
-  int status = _tstat(fname.c_str(), &statbuf);
-  // Need file to exist and length at least 2 for BOM
-  if (status != 0 || statbuf.st_size < 2)
-    return false;
-
-  const unsigned char BOM[] = {0xff, 0xfe};
-  unsigned char buffer[] = {0x00, 0x00};
-
   // Check if the first 2 characters are the BOM
+  // (Need file to exist and length at least 2 for BOM)
   // Need to use FOpen as cannot pass wchar_t filename to a std::istream
   // and cannot convert a wchar_t filename/path to char if non-Latin characters
   // present
-  FILE *fn = pws_os::FOpen(fname.c_str(), _T("rb"));
-  fread(buffer, 1, 2, fn);
+  const unsigned char BOM[] = {0xff, 0xfe};
+  unsigned char buffer[] = {0x00, 0x00};
+  bool retval = false;
+
+  FILE *fn = pws_os::FOpen(fname, _T("rb"));
+  if (fn == NULL)
+    return false;
+  if (pws_os::fileLength(fn) < 2)
+    retval = false;
+  else {
+    fread(buffer, 1, 2, fn);
+    retval = (buffer[0] == BOM[0] && buffer[1] == BOM[1]);
+  }
   fclose(fn);
-
-  return (buffer[0] == BOM[0] && buffer[1] == BOM[1]);
+  return retval;
 }

 /*


Reduce simulation time tested in test_EASBrickIso_Grav.cpp

--- src/unit_tests/fea/test_EASBrickIso_Grav.cpp
+++ src/unit_tests/fea/test_EASBrickIso_Grav.cpp
@@ -41,7 +41,7 @@
 const double step_size = 1e-3;  // Step size
 double sim_time = 2;            // Simulation time for generation of reference file
 double precision = 1e-6;        // Precision value used to assess results
-double sim_time_UT = 0.1;       // Simulation time for unit test 0.05
+double sim_time_UT = 0.05;       // Simulation time for unit test 0.05

 int main(int argc, char* argv[]) {
     bool output = 0;  // Determines whether it tests (0) or generates golden file (1)


Prof::Metric::RStdDev::eval: handle divide by 0

--- src/lib/prof-juicy/Metric-AExpr.cpp
+++ src/lib/prof-juicy/Metric-AExpr.cpp
@@ -70,6 +70,8 @@
 # define AEXPR_CHECK(x)
 #endif

+static double epsilon = 0.000001;
+
 //****************************************************************************

 namespace Prof {
@@ -543,8 +545,12 @@
 RStdDev::eval(const ScopeInfo* si) const{

   std::pair<double, double> v_m = eval_variance(si, m_opands, m_sz);
-  double sdev = sqrt(v_m.first);
-  double result = (sdev / v_m.second) * 100;
+  double sdev = sqrt(v_m.first); // always non-negative
+  double mean = v_m.second;
+  double result = 0.0;
+  if (mean > epsilon) {
+    result = (sdev / mean) * 100;
+  }

   //IFTRACE << "r-stddev=" << result << endl;
   AEXPR_CHECK(result);


fixing ascii stl loading. GRRRRR

fixing ascii stl loading. GRRRRR

--- modules/SofaGeneralLoader/MeshSTLLoader.cpp
+++ modules/SofaGeneralLoader/MeshSTLLoader.cpp
@@ -231,8 +231,7 @@

         std::getline(dataFile, buffer);
         std::stringstream line;
-
-        std::clog << line.str() << std::endl;
+        line << buffer;

         std::string bufferWord;
         line >> bufferWord;


BaseGL: constrain slice shift to min/max in VolumeSliceGL

--- modules/basegl/processors/volumeslicegl.cpp
+++ modules/basegl/processors/volumeslicegl.cpp
@@ -493,22 +493,37 @@

 void VolumeSliceGL::shiftSlice(int shift) {
     switch (sliceAlongAxis_.get()) {
-        case 0:  // x axis
-            sliceX_.set(sliceX_.get() + shift);
-            break;
-        case 1:  // y axis
-            sliceY_.set(sliceY_.get() + shift);
-            break;
-        case 2:  // z axis
-            sliceZ_.set(sliceZ_.get() + shift);
-            break;
-        case 3: {
-            vec3 newPos = planePosition_.get() +
-                          static_cast<float>(shift) / 100.0f * glm::normalize(planeNormal_.get());
-            newPos = glm::clamp(newPos, vec3(0.0f), vec3(1.0f));
-            planePosition_.set(newPos);
+    case 0:  // x axis
+        {
+            int newValue = sliceX_.get() + shift;
+            newValue = glm::clamp(newValue, sliceX_.getMinValue(), sliceX_.getMaxValue());
+            sliceX_.set(newValue);
             break;
         }
+    case 1:  // y axis
+        {
+            int newValue = sliceY_.get() + shift;
+            newValue = glm::clamp(newValue, sliceY_.getMinValue(), sliceY_.getMaxValue());
+            sliceY_.set(newValue);
+            break;
+
+        }
+    case 2:  // z axis
+        {
+            int newValue = sliceZ_.get() + shift;
+            newValue = glm::clamp(newValue, sliceZ_.getMinValue(), sliceZ_.getMaxValue());
+            sliceZ_.set(newValue);
+            break;
+
+        }
+    default:
+    case 3: {
+        vec3 newPos = planePosition_.get() +
+                        static_cast<float>(shift) / 100.0f * glm::normalize(planeNormal_.get());
+        newPos = glm::clamp(newPos, vec3(0.0f), vec3(1.0f));
+        planePosition_.set(newPos);
+        break;
+    }
     }
 }


Add default parameters for SGBM::create

Add default parameters for SGBM::create

Added default parameters for minDisparity, numDisparities and blockSize. This fixes a bug where SGBM::load would not compile.

--- modules/calib3d/include/opencv2/calib3d.hpp
+++ modules/calib3d/include/opencv2/calib3d.hpp
@@ -1917,7 +1917,7 @@
     set StereoSGBM::numDisparities at minimum. The second constructor enables you to set each parameter
     to a custom value.
      */
-    CV_WRAP static Ptr<StereoSGBM> create(int minDisparity, int numDisparities, int blockSize,
+    CV_WRAP static Ptr<StereoSGBM> create(int minDisparity = 0, int numDisparities = 16, int blockSize = 3,
                                           int P1 = 0, int P2 = 0, int disp12MaxDiff = 0,
                                           int preFilterCap = 0, int uniquenessRatio = 0,
                                           int speckleWindowSize = 0, int speckleRange = 0,


TcpPortsGatherer: Fix compilation with MinGW/4.6.

Change-Id: I28666ac73688e937dfe87996b723311a95464ba6
Reviewed-by: Fawzi Mohamed <7388270c57edd0fabd71d8eb0322d66e3c40e57e@nokia.com>

--- src/libs/utils/tcpportsgatherer.cpp
+++ src/libs/utils/tcpportsgatherer.cpp
@@ -42,6 +42,28 @@
 #include <ws2tcpip.h>
 #include <iphlpapi.h>
 #endif
+
+#if defined(Q_OS_WIN) && defined(Q_CC_MINGW)
+
+// Missing declarations for MinGW. This requires MinGW with gcc 4.6.
+typedef enum { } MIB_TCP_STATE;
+
+typedef struct _MIB_TCP6ROW {
+    MIB_TCP_STATE State;
+    IN6_ADDR LocalAddr;
+    DWORD dwLocalScopeId;
+    DWORD dwLocalPort;
+    IN6_ADDR RemoteAddr;
+    DWORD dwRemoteScopeId;
+    DWORD dwRemotePort;
+} MIB_TCP6ROW, *PMIB_TCP6ROW;
+
+typedef struct _MIB_TCP6TABLE {
+    DWORD dwNumEntries;
+    MIB_TCP6ROW table[ANY_SIZE];
+} MIB_TCP6TABLE, *PMIB_TCP6TABLE;
+
+#endif // defined(Q_OS_WIN) && defined(Q_CC_MINGW)

 namespace Utils {
 namespace Internal {


size changes

size changes

Former-commit-id: e6323889ce25fd8111526438bcb4f058474191db [formerly 2f654d737deb923f6b03d29e301fdb088859eec7]
Former-commit-id: 10f84c078c1feb53d9d592da36c000db369a3e28

--- src/lineFollowing/lineFollowing.cpp
+++ src/lineFollowing/lineFollowing.cpp
@@ -52,7 +52,7 @@
     printf("Adding in %d lines\n", (int) lines.size());
     for (size_t i = 0; i < lines.size(); i++) {
       Vec4i l = lines[i];
-      line(frame, Point(l[0], l[1]), Point(l[2], l[3]), Scalar(0, 0, 255), 3, CV_AA);
+      line(frame, Point(l[0], l[1]), Point(l[2], l[3]), Scalar(0, 0, 255), 1, CV_AA);
       // break;
     }
 //    if (lines.size() < 1) continue;


Remove renderingComplete test

Remove renderingComplete test

There is no guarantee that two consecutive frames with
no frame dependencies will not complete out of order.

Components: EGL
Affects: dEQP-EGL.functional.get_frame_timestamps
Test: atest CtsDeqpTestCases
Bug: https://issuetracker.google.com/174941611

Change-Id: Ia70b92be27e301e94e936d9465a6e9dc9ec38928

--- modules/egl/teglGetFrameTimestampsTests.cpp
+++ modules/egl/teglGetFrameTimestampsTests.cpp
@@ -263,9 +263,6 @@
 	check_lt(result, frame1.dequeueReady, frame2.dequeueReady, "Dequeue ready times not monotonic.");

 	// GPU timeline.
-	// Same rendering complete time is fine.
-	check_le(result, frame1.renderingComplete, frame2.renderingComplete, "Rendering complete times not monotonic.");
-
 	if (timestampValid(frame1.firstCompositionGpuFinished) && timestampValid(frame2.firstCompositionGpuFinished))
 		check_lt(result, frame1.firstCompositionGpuFinished, frame2.firstCompositionGpuFinished, "Composition GPU work complete times not monotonic.");


Fix markdown format.

Fix markdown format.

--- modules/imgproc/include/opencv2/imgproc.hpp
+++ modules/imgproc/include/opencv2/imgproc.hpp
@@ -1285,7 +1285,7 @@
 You may also use the higher-level GaussianBlur.
 @param ksize Aperture size. It should be odd ( \f$\texttt{ksize} \mod 2 = 1\f$ ) and positive.
 @param sigma Gaussian standard deviation. If it is non-positive, it is computed from ksize as
-`sigma = 0.3\*((ksize-1)\*0.5 - 1) + 0.8`.
+`sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8`.
 @param ktype Type of filter coefficients. It can be CV_32F or CV_64F .
 @sa  sepFilter2D, getDerivKernels, getStructuringElement, GaussianBlur
  */


build fails on msvc. error C2999

build fails on msvc. error C2999

--- src/base/ossimXmlAttribute.cpp
+++ src/base/ossimXmlAttribute.cpp
@@ -216,7 +216,9 @@

    bool is_empty = false;
    //then this could be empty with two qoutes
-    if(theValue.size() == 2 && theValue[0] == startQuote && theValue[1] == startQuote)
+   std::string::size_type p = 0;
+   //then this could be empty with two qoutes
+    if(theValue.size() == 2 && theValue[p] == startQuote && theValue[p+1] == startQuote)
     {
        theValue = "";
        is_empty = true;


Fix typos.

Fix typos.

--- modules/imgproc/include/opencv2/imgproc.hpp
+++ modules/imgproc/include/opencv2/imgproc.hpp
@@ -416,7 +416,7 @@
 //! connected components algorithm
 enum ConnectedComponentsAlgorithmsTypes {
     CCL_WU      = 0,  //!< SAUF algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
-    CCL_DEFAULT = -1, //!< BBDT algortihm for 8-way connectivity, SAUF algorithm for 4-way connectivity
+    CCL_DEFAULT = -1, //!< BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
     CCL_GRANA   = 1   //!< BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
 };

@@ -816,7 +816,7 @@
 };

 //! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.
-//! Detects position only without traslation and rotation
+//! Detects position only without translation and rotation
 class CV_EXPORTS GeneralizedHoughBallard : public GeneralizedHough
 {
 public:
@@ -830,7 +830,7 @@
 };

 //! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
-//! Detects position, traslation and rotation
+//! Detects position, translation and rotation
 class CV_EXPORTS GeneralizedHoughGuil : public GeneralizedHough
 {
 public:
@@ -985,7 +985,7 @@
     -  The point is outside the subdivision reference rectangle. The function returns PTLOC_OUTSIDE_RECT
        and no pointers are filled.
     -  One of input arguments is invalid. A runtime error is raised or, if silent or “parent” error
-       processing mode is selected, CV_PTLOC_ERROR is returnd.
+       processing mode is selected, CV_PTLOC_ERROR is returned.
      */
     CV_WRAP int locate(Point2f pt, CV_OUT int& edge, CV_OUT int& vertex);

@@ -1397,7 +1397,7 @@

 /** @brief Blurs an image using the box filter.

-The function smoothes an image using the kernel:
+The function smooths an image using the kernel:

 \f[\texttt{K} =  \alpha \begin{bmatrix} 1 & 1 & 1 &  \cdots & 1 & 1  \\ 1 & 1 & 1 &  \cdots & 1 & 1  \\ \hdotsfor{6} \\ 1 & 1 & 1 &  \cdots & 1 & 1 \end{bmatrix}\f]

@@ -1449,7 +1449,7 @@

 /** @brief Blurs an image using the normalized box filter.

-The function smoothes an image using the kernel:
+The function smooths an image using the kernel:

 \f[\texttt{K} =  \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 &  \cdots & 1 & 1  \\ 1 & 1 & 1 &  \cdots & 1 & 1  \\ \hdotsfor{6} \\ 1 & 1 & 1 &  \cdots & 1 & 1  \\ \end{bmatrix}\f]

@@ -3574,7 +3574,7 @@

 //! @} imgproc_misc

-// main function for all demosaicing procceses
+// main function for all demosaicing processes
 CV_EXPORTS_W void demosaicing(InputArray _src, OutputArray _dst, int code, int dcn = 0);

 //! @addtogroup imgproc_shape
@@ -3756,7 +3756,7 @@
 std::vector<std::vector<cv::Point> >).
 @param hierarchy Optional output vector (e.g. std::vector<cv::Vec4i>), containing information about the image topology. It has
 as many elements as the number of contours. For each i-th contour contours[i], the elements
-hierarchy[i][0] , hiearchy[i][1] , hiearchy[i][2] , and hiearchy[i][3] are set to 0-based indices
+hierarchy[i][0] , hierarchy[i][1] , hierarchy[i][2] , and hierarchy[i][3] are set to 0-based indices
 in contours of the next and previous contours at the same hierarchical level, the first child
 contour and the parent contour, respectively. If for the contour i there are no next, previous,
 parent, or nested contours, the corresponding elements of hierarchy[i] will be negative.
@@ -4044,7 +4044,7 @@

 /** @brief Finds out if there is any intersection between two rotated rectangles.

-If there is then the vertices of the interesecting region are returned as well.
+If there is then the vertices of the intersecting region are returned as well.

 Below are some examples of intersection configurations. The hatched pattern indicates the
 intersecting region and the red vertices are returned by the function.
@@ -4064,11 +4064,11 @@
 CV_EXPORTS_W Ptr<CLAHE> createCLAHE(double clipLimit = 40.0, Size tileGridSize = Size(8, 8));

 //! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.
-//! Detects position only without traslation and rotation
+//! Detects position only without translation and rotation
 CV_EXPORTS Ptr<GeneralizedHoughBallard> createGeneralizedHoughBallard();

 //! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
-//! Detects position, traslation and rotation
+//! Detects position, translation and rotation
 CV_EXPORTS Ptr<GeneralizedHoughGuil> createGeneralizedHoughGuil();

 //! Performs linear blending of two images


base: Fix windows build am: 65c898e6e2 am: 58ee913c1b am: 1ad8925c7b
am: 4f441f1176

Change-Id: I11c0ff0f9799ff9c1e710a65b67c2ba6ac463260

--- src/base/test/vm_test_utils.cc
+++ src/base/test/vm_test_utils.cc
@@ -25,12 +25,14 @@
 #include <string.h>

 #if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
+#include <vector>
+
 #include <Windows.h>
 #include <Psapi.h>
-#else
+#else  // PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
 #include <sys/mman.h>
 #include <sys/stat.h>
-#endif
+#endif  // PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)

 #include "perfetto/base/build_config.h"
 #include "perfetto/base/logging.h"


bugfix: check if start and end point are valid

--- NaoTHSoccer/Source/Core/Cognition/Modules/Perception/VisualCortex/Detectors/ScanLineEdgelDetector.cpp
+++ NaoTHSoccer/Source/Core/Cognition/Modules/Perception/VisualCortex/Detectors/ScanLineEdgelDetector.cpp
@@ -136,6 +136,12 @@

   const int step = 2;

+  if(end.y + step > start.y || end.y + step >= (int)getImage().height()) {
+    endPoint.posInImage.y = end.y;
+    return endPoint;
+  }
+
+
   // no scan if the start is at the top of the image
   if(start.y <= step) {
     return endPoint;


Some clean up (extra spaces etc …)

Some clean up (extra spaces etc …)

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@41186 27541ba8-7e3a-0410-8455-c3a389f83636

--- hist/hist/src/TGraph.cxx
+++ hist/hist/src/TGraph.cxx
@@ -362,18 +362,18 @@
    // the third column.
    // For files separated by a specific delimiter different from ' ' and '\t' (e.g. ';' in csv files)
    // you can avoid using %*s to bypass this delimiter by explicitly specify the "option" argument,
-   // e.g. option=" \t,;" for columns of figures separated by any of these characters (' ', '\t', ',', ';')
-   // used once (e.g. "1;1") or in a combined way (" 1;,;;  1").
+   // e.g. option=" \t,;" for columns of figures separated by any of these characters (' ', '\t', ',', ';')
+   // used once (e.g. "1;1") or in a combined way (" 1;,;;  1").
    // Note in that case, the instanciation is about 2 times slower.

-   Double_t x,y;
+   Double_t x, y;
    TString fname = filename;
    gSystem->ExpandPathName(fname);

    ifstream infile(fname.Data());
-   if(!infile.good()){
+   if (!infile.good()) {
       MakeZombie();
-      Error("TGraph", "Cannot open file: %s, TGraph is Zombie",filename);
+      Error("TGraph", "Cannot open file: %s, TGraph is Zombie", filename);
       fNpoints = 0;
       return;
    } else {
@@ -381,10 +381,10 @@
    }
    if (!CtorAllocate()) return;
    std::string line;
-   Int_t np=0;
+   Int_t np = 0;

    // No delimiters specified (standard constructor).
-   if (strcmp(option,"")==0) {
+   if (strcmp(option, "") == 0) {

       while (std::getline(infile, line, '\n')) {
          if (2 != sscanf(line.c_str(), format, &x, &y)) {
@@ -395,7 +395,7 @@
       }
       Set(np);

-   // A delimiter has been specified in "option"
+      // A delimiter has been specified in "option"
    } else {

       // Checking format and creating its boolean counterpart
@@ -440,7 +440,7 @@
       // Looping
       while (std::getline(infile, line, '\n')) {
          if (line != "") {
-            strlcpy(buffer, line.c_str(),10000) ;  //necessary stage for strtok?
+            strlcpy(buffer, line.c_str(), 10000) ; //necessary stage for strtok?
             token = strtok(buffer, option) ;
             while (token != NULL && value_idx < 2) {
                if (isTokenToBeSaved[token_idx]) {
@@ -949,7 +949,7 @@
    //
    //  if Middle button clicked, the line is moved parallel to itself
    //     until the button is released.
-
+
    TVirtualGraphPainter *painter = TVirtualGraphPainter::GetPainter();
    if (painter) painter->ExecuteEventHelper(this, event, px, py);
 }
@@ -1949,7 +1949,7 @@
 void TGraph::Paint(Option_t *option)
 {
    // Draw this graph with its current attributes.
-
+
    TVirtualGraphPainter *painter = TVirtualGraphPainter::GetPainter();
    if (painter) painter->PaintHelper(this, option);
 }
@@ -1959,7 +1959,7 @@
 void TGraph::PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
 {
    // Draw the (x,y) as a graph.
-
+
    TVirtualGraphPainter *painter = TVirtualGraphPainter::GetPainter();
    if (painter) painter->PaintGraph(this, npoints, x, y, chopt);
 }
@@ -1969,7 +1969,7 @@
 void TGraph::PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
 {
    // Draw the (x,y) as a histogram.
-
+
    TVirtualGraphPainter *painter = TVirtualGraphPainter::GetPainter();
    if (painter) painter->PaintGrapHist(this, npoints, x, y, chopt);
 }
@@ -1979,7 +1979,7 @@
 void TGraph::PaintStats(TF1 *fit)
 {
    // Draw the stats
-
+
    TVirtualGraphPainter *painter = TVirtualGraphPainter::GetPainter();
    if (painter) painter->PaintStats(this, fit);
 }


test update because changed Sobel Normalization

--- modules/objdetect/test/test_softcascade.cpp
+++ modules/objdetect/test/test_softcascade.cpp
@@ -92,5 +92,5 @@
         total++;
     }
     std::cout << "detected: " << (int)objects.size() << std::endl;
-    ASSERT_EQ((int)objects.size(), 1501);
+    ASSERT_EQ((int)objects.size(), 1469);
 }


small change on log in prediction module

--- modules/prediction/common/prediction_map.cc
+++ modules/prediction/common/prediction_map.cc
@@ -163,11 +163,8 @@
           candidate_lane->get_nearest_point(vec_point, &distance);
       double nearest_point_heading =
           PathHeading(candidate_lane, nearest_point);
-      AINFO << "heading = " << heading;
-      AINFO << "nearest point heading = " << nearest_point_heading;
       double diff = std::fabs(
           apollo::common::math::AngleDiff(heading, nearest_point_heading));
-      AINFO << "angle diff = " << diff;
       if (diff <= FLAGS_max_lane_angle_diff) {
         lanes->push_back(candidate_lane);
       }
@@ -197,7 +194,8 @@
   std::shared_ptr<const LaneInfo> lane = LaneById(id);
   apollo::common::PointENU hdmap_point = lane->get_smooth_point(s);
   *heading = PathHeading(lane, hdmap_point);
-  AINFO << "lane_s = ["
+  AINFO << "lane_id = " << id.id() << ", "
+        << "lane_s = ["
         << std::fixed << std::setprecision(6) << s << "], "
         << "hdmap pt = ["
         << std::fixed << std::setprecision(6)


Prediction: reformatting

Prediction: reformatting

--- modules/prediction/common/prediction_map.cc
+++ modules/prediction/common/prediction_map.cc
@@ -47,28 +47,32 @@
   return {point.x(), point.y()};
 }

-double PredictionMap::HeadingOnLane(std::shared_ptr<const LaneInfo> lane_info,
-                                    const double s) {
+double PredictionMap::HeadingOnLane(
+    std::shared_ptr<const LaneInfo> lane_info,
+    const double s) {
   const std::vector<double>& headings = lane_info->headings();
   const std::vector<double>& accumulated_s = lane_info->accumulate_s();
   CHECK(headings.size() == accumulated_s.size());
   size_t size = headings.size();
+
   if (size == 0) {
     return 0.0;
   }
+
   if (size == 1) {
     return headings[0];
   }
+
   const auto low_itr =
       std::lower_bound(accumulated_s.begin(), accumulated_s.end(), s);
-  // CHECK(low_itr != accumulated_s.end());
   size_t index = low_itr - accumulated_s.begin();
   if (index >= size - 1) {
     return headings.back();
-  }
-  return apollo::common::math::slerp(headings[index], accumulated_s[index],
-                                     headings[index + 1],
-                                     accumulated_s[index + 1], s);
+  } else {
+    return apollo::common::math::slerp(headings[index], accumulated_s[index],
+                                       headings[index + 1],
+                                       accumulated_s[index + 1], s);
+  }
 }

 double PredictionMap::LaneTotalWidth(
@@ -86,10 +90,11 @@
       apollo::hdmap::MakeMapId(str_id));
 }

-void PredictionMap::GetProjection(const Eigen::Vector2d& position,
-                                  std::shared_ptr<const LaneInfo> lane_info,
-                                  double* s,
-                                  double* l) {
+void PredictionMap::GetProjection(
+    const Eigen::Vector2d& position,
+    std::shared_ptr<const LaneInfo> lane_info,
+    double* s,
+    double* l) {
   if (lane_info == nullptr) {
     return;
   }
@@ -154,8 +159,9 @@
   }
 }

-double PredictionMap::PathHeading(std::shared_ptr<const LaneInfo> lane_info,
-                                  const apollo::common::PointENU& point) {
+double PredictionMap::PathHeading(
+    std::shared_ptr<const LaneInfo> lane_info,
+    const apollo::common::PointENU& point) {
   apollo::common::math::Vec2d vec_point = {point.x(), point.y()};
   double s = -1.0;
   double l = 0.0;
@@ -163,10 +169,11 @@
   return HeadingOnLane(lane_info, s);
 }

-int PredictionMap::SmoothPointFromLane(const std::string& id,
-                                       const double s, const double l,
-                                       Eigen::Vector2d* point,
-                                       double* heading) {
+int PredictionMap::SmoothPointFromLane(
+    const std::string& id,
+    const double s, const double l,
+    Eigen::Vector2d* point,
+    double* heading) {
   if (point == nullptr || heading == nullptr) {
     return -1;
   }


r5730/sofa-dev : DECFluidModel(2D) outputs velocity and vorticity to VTK files

 //partial sync (1/2 changes)//

--- modules/sofa/component/misc/VTKExporter.cpp
+++ modules/sofa/component/misc/VTKExporter.cpp
@@ -325,6 +325,7 @@
     for (int i=0 ; i<topology->getNbPoints() ; i++)
     {
         *outfile << topology->getPX(i) << " " << topology->getPY(i) << " " << topology->getPZ(i) << std::endl;
+//		std::cout << topology->getPX(i) << " " << topology->getPY(i) << " " << topology->getPZ(i) << std::endl;
     }

     *outfile << std::endl;


Fix type of local encoded length variable from uint32_t to size_t.

BUG=chromium:571594

Review URL: https://codereview.webrtc.org/1635083002

Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#11383}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 7fd881743ce1bae98e79f57d30c6f6f2b72fc541

--- modules/video_coding/codecs/vp8/vp8_impl.cc
+++ modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -978,7 +978,7 @@
            NULL) {
       switch (pkt->kind) {
         case VPX_CODEC_CX_FRAME_PKT: {
-          uint32_t length = encoded_images_[encoder_idx]._length;
+          size_t length = encoded_images_[encoder_idx]._length;
           if (pkt->data.frame.sz + length >
               encoded_images_[encoder_idx]._size) {
             uint8_t* buffer = new uint8_t[pkt->data.frame.sz + length];


Fixed Doc Errors Bug#4282

Fixed Doc Errors Bug#4282

--- modules/videoio/include/opencv2/videoio.hpp
+++ modules/videoio/include/opencv2/videoio.hpp
@@ -528,27 +528,27 @@
     /** @brief Sets a property in the VideoCapture.

     @param propId Property identifier. It can be one of the following:
-     -   **CV_CAP_PROP_POS_MSEC** Current position of the video file in milliseconds.
-     -   **CV_CAP_PROP_POS_FRAMES** 0-based index of the frame to be decoded/captured next.
-     -   **CV_CAP_PROP_POS_AVI_RATIO** Relative position of the video file: 0 - start of the
+     -   **CAP_PROP_POS_MSEC** Current position of the video file in milliseconds.
+     -   **CAP_PROP_POS_FRAMES** 0-based index of the frame to be decoded/captured next.
+     -   **CAP_PROP_POS_AVI_RATIO** Relative position of the video file: 0 - start of the
          film, 1 - end of the film.
-     -   **CV_CAP_PROP_FRAME_WIDTH** Width of the frames in the video stream.
-     -   **CV_CAP_PROP_FRAME_HEIGHT** Height of the frames in the video stream.
-     -   **CV_CAP_PROP_FPS** Frame rate.
-     -   **CV_CAP_PROP_FOURCC** 4-character code of codec.
-     -   **CV_CAP_PROP_FRAME_COUNT** Number of frames in the video file.
-     -   **CV_CAP_PROP_FORMAT** Format of the Mat objects returned by retrieve() .
-     -   **CV_CAP_PROP_MODE** Backend-specific value indicating the current capture mode.
-     -   **CV_CAP_PROP_BRIGHTNESS** Brightness of the image (only for cameras).
-     -   **CV_CAP_PROP_CONTRAST** Contrast of the image (only for cameras).
-     -   **CV_CAP_PROP_SATURATION** Saturation of the image (only for cameras).
-     -   **CV_CAP_PROP_HUE** Hue of the image (only for cameras).
-     -   **CV_CAP_PROP_GAIN** Gain of the image (only for cameras).
-     -   **CV_CAP_PROP_EXPOSURE** Exposure (only for cameras).
-     -   **CV_CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted
+     -   **CAP_PROP_FRAME_WIDTH** Width of the frames in the video stream.
+     -   **CAP_PROP_FRAME_HEIGHT** Height of the frames in the video stream.
+     -   **CAP_PROP_FPS** Frame rate.
+     -   **CAP_PROP_FOURCC** 4-character code of codec.
+     -   **CAP_PROP_FRAME_COUNT** Number of frames in the video file.
+     -   **CAP_PROP_FORMAT** Format of the Mat objects returned by retrieve() .
+     -   **CAP_PROP_MODE** Backend-specific value indicating the current capture mode.
+     -   **CAP_PROP_BRIGHTNESS** Brightness of the image (only for cameras).
+     -   **CAP_PROP_CONTRAST** Contrast of the image (only for cameras).
+     -   **CAP_PROP_SATURATION** Saturation of the image (only for cameras).
+     -   **CAP_PROP_HUE** Hue of the image (only for cameras).
+     -   **CAP_PROP_GAIN** Gain of the image (only for cameras).
+     -   **CAP_PROP_EXPOSURE** Exposure (only for cameras).
+     -   **CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted
          to RGB.
-     -   **CV_CAP_PROP_WHITE_BALANCE** Currently unsupported
-     -   **CV_CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported
+     -   **CAP_PROP_WHITE_BALANCE** Currently unsupported
+     -   **CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported
          by DC1394 v 2.x backend currently)
     @param value Value of the property.
      */
@@ -557,28 +557,28 @@
     /** @brief Returns the specified VideoCapture property

     @param propId Property identifier. It can be one of the following:
-     -   **CV_CAP_PROP_POS_MSEC** Current position of the video file in milliseconds or video
+     -   **CAP_PROP_POS_MSEC** Current position of the video file in milliseconds or video
          capture timestamp.
-     -   **CV_CAP_PROP_POS_FRAMES** 0-based index of the frame to be decoded/captured next.
-     -   **CV_CAP_PROP_POS_AVI_RATIO** Relative position of the video file: 0 - start of the
+     -   **CAP_PROP_POS_FRAMES** 0-based index of the frame to be decoded/captured next.
+     -   **CAP_PROP_POS_AVI_RATIO** Relative position of the video file: 0 - start of the
          film, 1 - end of the film.
-     -   **CV_CAP_PROP_FRAME_WIDTH** Width of the frames in the video stream.
-     -   **CV_CAP_PROP_FRAME_HEIGHT** Height of the frames in the video stream.
-     -   **CV_CAP_PROP_FPS** Frame rate.
-     -   **CV_CAP_PROP_FOURCC** 4-character code of codec.
-     -   **CV_CAP_PROP_FRAME_COUNT** Number of frames in the video file.
-     -   **CV_CAP_PROP_FORMAT** Format of the Mat objects returned by retrieve() .
-     -   **CV_CAP_PROP_MODE** Backend-specific value indicating the current capture mode.
-     -   **CV_CAP_PROP_BRIGHTNESS** Brightness of the image (only for cameras).
-     -   **CV_CAP_PROP_CONTRAST** Contrast of the image (only for cameras).
-     -   **CV_CAP_PROP_SATURATION** Saturation of the image (only for cameras).
-     -   **CV_CAP_PROP_HUE** Hue of the image (only for cameras).
-     -   **CV_CAP_PROP_GAIN** Gain of the image (only for cameras).
-     -   **CV_CAP_PROP_EXPOSURE** Exposure (only for cameras).
-     -   **CV_CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted
+     -   **CAP_PROP_FRAME_WIDTH** Width of the frames in the video stream.
+     -   **CAP_PROP_FRAME_HEIGHT** Height of the frames in the video stream.
+     -   **CAP_PROP_FPS** Frame rate.
+     -   **CAP_PROP_FOURCC** 4-character code of codec.
+     -   **CAP_PROP_FRAME_COUNT** Number of frames in the video file.
+     -   **CAP_PROP_FORMAT** Format of the Mat objects returned by retrieve() .
+     -   **CAP_PROP_MODE** Backend-specific value indicating the current capture mode.
+     -   **CAP_PROP_BRIGHTNESS** Brightness of the image (only for cameras).
+     -   **CAP_PROP_CONTRAST** Contrast of the image (only for cameras).
+     -   **CAP_PROP_SATURATION** Saturation of the image (only for cameras).
+     -   **CAP_PROP_HUE** Hue of the image (only for cameras).
+     -   **CAP_PROP_GAIN** Gain of the image (only for cameras).
+     -   **CAP_PROP_EXPOSURE** Exposure (only for cameras).
+     -   **CAP_PROP_CONVERT_RGB** Boolean flags indicating whether images should be converted
          to RGB.
-     -   **CV_CAP_PROP_WHITE_BALANCE** Currently not supported
-     -   **CV_CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported
+     -   **CAP_PROP_WHITE_BALANCE** Currently not supported
+     -   **CAP_PROP_RECTIFICATION** Rectification flag for stereo cameras (note: only supported
          by DC1394 v 2.x backend currently)

     **Note**: When querying a property that is not supported by the backend used by the VideoCapture


created function to get only overloads

created function to get only overloads


Fixed how html links to definitions are generated. It is no longer
dependent on html output generation order within a pass/file, but is
now the correct way of using the defPoint link in the AST to obtain
the module name (i.e., rather than the AST traversal order, use the AST).

git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@6491 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

--- compiler/AST/view.cpp
+++ compiler/AST/view.cpp
@@ -9,8 +9,10 @@
 #include "chpl_log.h"

-static Map<int, char*> *symid2file;         // map symbol id to html file w/ tag
-
+static char*
+html_file_name( int pass, char *module) {
+  return stringcat( "pass", intstring(pass), "_module_", module, ".html");
+}

 static void
 view_ast(BaseAST* ast, bool number = false, long mark = -1, int indent = 0) {
@@ -208,16 +210,17 @@
 }

 static void
-html_print_symbol(char *filename, FILE* html_file, Symbol* sym, bool def) {
+html_print_symbol(FILE* html_file, int pass, Symbol* sym, bool def) {
   if (!sym->isUnresolved) {
     if (def) {
       fprintf(html_file, "", sym->id);
-      symid2file->put( sym->id, filename);
     } else {
-      if (char *deffile = symid2file->get( sym->id)) {
-        fprintf(html_file, "", deffile, sym->id);
+      if (sym->defPoint) {
+        fprintf(html_file, "",
+                html_file_name( pass, sym->defPoint->getModule()->name),
+                sym->id);
       } else {
-        fprintf(html_file, "", sym->id);
+        fprintf(html_file, "", sym->id);
       }
     }
   }
@@ -240,17 +243,17 @@
       sym->type->symbol &&
       sym->type != dtUnknown) {
     fprintf(html_file, ":");
-    html_print_symbol( filename, html_file, sym->type->symbol, false);
+    html_print_symbol( html_file, pass, sym->type->symbol, false);
   }
 }

 static void
-html_print_fnsymbol(char* filename, FILE* html_file, FnSymbol* fn) {
+html_print_fnsymbol( FILE* html_file, int pass, FnSymbol* fn) {
   if (fn->_this) {
-    html_print_symbol( filename, html_file, fn->_this->type->symbol, false);
+    html_print_symbol( html_file, pass, fn->_this->type->symbol, false);
     fprintf(html_file, " . ");
   }
-  html_print_symbol( filename, html_file, fn, true);
+  html_print_symbol( html_file, pass, fn, true);
   fprintf(html_file, " ( ");
   bool first = true;
   for_alist(DefExpr, arg, fn->formals) {
@@ -259,17 +262,17 @@
     } else {
       first = false;
     }
-    html_print_symbol( filename, html_file, arg->sym, true);
+    html_print_symbol( html_file, pass, arg->sym, true);
   }
   fprintf(html_file, " ) ");
   if (fn->retType->symbol) {
     fprintf(html_file, " : ");
-    html_print_symbol( filename, html_file, fn->retType->symbol, false);
+    html_print_symbol( html_file, pass, fn->retType->symbol, false);
   }
 }

 static void
-html_view_ast(char *filename, FILE* html_file, BaseAST* ast) {
+html_view_ast( FILE* html_file, int pass, BaseAST* ast) {
   if (Stmt* stmt = dynamic_cast<Stmt*>(ast)) {
     fprintf(html_file, "
\n");
     if (BlockStmt *b=dynamic_cast<BlockStmt*>(stmt)) {
@@ -292,7 +295,7 @@
       case goto_continue: fprintf(html_file, "continue "); break;
       }
       if (s->label)
-        html_print_symbol( filename, html_file, s->label, true);
+        html_print_symbol( html_file, pass, s->label, true);
     } else if (dynamic_cast<CondStmt*>(stmt)) {
       fprintf(html_file, "if ");
     } else if (ReturnStmt* s = dynamic_cast<ReturnStmt*>(stmt)) {
@@ -312,23 +315,23 @@
         fprintf(html_file, "
\n
");
         fprintf(html_file, "<CHPLTAG=\"FN%ld\">\n", fn->id);
         fprintf(html_file, "function ");
-        html_print_fnsymbol( filename, html_file, fn);
+        html_print_fnsymbol( html_file, pass, fn);
         fprintf(html_file, "
\n");
       } else if (structuralTypeSymbol(e->sym)) {
         fprintf(html_file, "
\n");
         fprintf(html_file, "
type ");
-        html_print_symbol( filename, html_file, e->sym, true);
+        html_print_symbol( html_file, pass, e->sym, true);
         fprintf(html_file, "
\n");
       } else if (dynamic_cast<TypeSymbol*>(e->sym)) {
         fprintf(html_file, "type ");
-        html_print_symbol( filename, html_file, e->sym, true);
+        html_print_symbol( html_file, pass, e->sym, true);
       } else if (VarSymbol* vs=dynamic_cast<VarSymbol*>(e->sym)) {
         if (vs->on_heap)
           fprintf( html_file, "heap ");
         if (vs->is_ref)
           fprintf( html_file, "ref  ");
         fprintf(html_file, "var ");
-        html_print_symbol( filename, html_file, e->sym, true);
+        html_print_symbol( html_file, pass, e->sym, true);
       } else if (ArgSymbol* s = dynamic_cast<ArgSymbol*>(e->sym)) {
         switch (s->intent) {
           case INTENT_IN: fprintf(html_file, "in "); break;
@@ -341,13 +344,13 @@
           default: break;
         }
         fprintf(html_file, "arg ");
-        html_print_symbol( filename, html_file, e->sym, true);
+        html_print_symbol( html_file, pass, e->sym, true);
       } else if (dynamic_cast<LabelSymbol*>(e->sym)) {
         fprintf(html_file, "label ");
-        html_print_symbol( filename, html_file, e->sym, true);
+        html_print_symbol( html_file, pass, e->sym, true);
       } else {
         fprintf(html_file, "def ");
-        html_print_symbol( filename, html_file, e->sym, true);
+        html_print_symbol( html_file, pass, e->sym, true);
       }
     } else if (VarSymbol* e = get_constant(expr)) {
       if (e->immediate->const_kind == IF1_CONST_KIND_STRING) {
@@ -356,7 +359,7 @@
         fprintf(html_file, "%s", e->cname);
       }
     } else if (SymExpr* e = dynamic_cast<SymExpr*>(expr)) {
-      html_print_symbol( filename, html_file, e->var, false);
+      html_print_symbol( html_file, pass, e->var, false);
     } else if (NamedExpr* e = dynamic_cast<NamedExpr*>(expr)) {
       fprintf(html_file, "(%s = ", e->name);
     } else if (CallExpr* e = dynamic_cast<CallExpr*>(expr)) {
@@ -378,7 +381,7 @@
   Vec<BaseAST*> asts;
   get_ast_children(ast, asts);
   forv_Vec(BaseAST, ast, asts)
-    html_view_ast(filename, html_file, ast);
+    html_view_ast( html_file, pass, ast);

   if (Stmt* stmt = dynamic_cast<Stmt*>(ast)) {
     if (dynamic_cast<BlockStmt*>(stmt))
@@ -408,9 +411,10 @@
   static int uid = 1;
   FILE* html_file;
   char* filename;
-  symid2file = new Map<int, char*>;
+
   forv_Vec(ModuleSymbol, mod, allModules) {
-    filename = stringcat("pass", intstring(uid), "_module_", mod->name, ".html");
+    // filename = stringcat("pass", intstring(uid), "_module_", mod->name, ".html");
+    filename = html_file_name( uid, mod->name);
     fprintf(html_index_file, "  %s\n", filename, mod->name);
     html_file = fopen(stringcat(log_dir, filename), "w");
     fprintf(html_file, "<CHPLTAG=\"%s\">\n", currentTraversal);
@@ -425,10 +429,9 @@
     fprintf(html_file, "
\n\n");
     fprintf(html_file, "module %s\n", mod->name);
     for_alist(Stmt, stmt, mod->stmts)
-      html_view_ast(filename, html_file, stmt);
+      html_view_ast( html_file, uid, stmt);
     fprintf(html_file, "\n");
     fclose(html_file);
   }
   uid++;
-  delete symid2file;
-}
+}


Adopt SPI driver usage

Adopt SPI driver usage

--- src/xpcc/driver/display/siemens_s65_impl.hpp
+++ src/xpcc/driver/display/siemens_s65_impl.hpp
@@ -94,9 +94,9 @@
 xpcc::SiemensS65Common<SPI, CS, RS, Reset>::writeReg(uint8_t reg)
 {
 	CS::reset();
-	SPI::write(0x74); // start byte, RS = 0, R/W = 0, write index register
-	SPI::write(0x00);
-	SPI::write(reg);
+	SPI::writeReadBlocking(0x74); // start byte, RS = 0, R/W = 0, write index register
+	SPI::writeReadBlocking(0x00);
+	SPI::writeReadBlocking(reg);
 	CS::set();
 }

@@ -105,9 +105,9 @@
 xpcc::SiemensS65Common<SPI, CS, RS, Reset>::writeData(uint16_t data)
 {
 	CS::reset();
-	SPI::write(0x76);	// start byte, RS = 1, R/W = 0, write instruction or RAM data
-	SPI::write(data>>8);
-	SPI::write(data);
+	SPI::writeReadBlocking(0x76);	// start byte, RS = 1, R/W = 0, write instruction or RAM data
+	SPI::writeReadBlocking(data>>8);
+	SPI::writeReadBlocking(data);
 	CS::set();
 }

@@ -171,7 +171,7 @@
 	writeReg(0x22);

 	CS::reset();
-	SPI::write(0x76);	// start byte
+	SPI::writeReadBlocking(0x76);	// start byte

 	// start data transmission

@@ -198,8 +198,8 @@
 	uint8_t c1 = colour >> 8;
 	uint8_t c2 = colour & 0xff;
 	for (uint16_t i = 0; i < (132 * 176); ++i) {
-		SPI::write(c1);
-		SPI::write(c2);
+		SPI::writeReadBlocking(c1);
+		SPI::writeReadBlocking(c2);
 	}
 #endif

@@ -217,7 +217,7 @@

 	// WRITE MEMORY
 	CS::reset();
-	SPI::write(0x76);	// start byte
+	SPI::writeReadBlocking(0x76);	// start byte

 	const uint16_t maskBlank  = 0x0000; // RRRR RGGG GGGB BBBB
 	const uint16_t maskFilled = 0x37e0; // RRRR RGGG GGGB BBBB
@@ -295,8 +295,7 @@
 			} // pix

 			// use transfer() of SPI to transfer spiBuffer
-			SPI::setBuffer(16, spiBuffer);
-			SPI::transfer(SPI::TRANSFER_SEND_BUFFER_DISCARD_RECEIVE);
+			SPI::transferBlocking(spiBuffer, nullptr, 16);
 		} // y
 	} // x
 #endif
@@ -315,7 +314,7 @@

 	// WRITE MEMORY
 	CS::reset();
-	SPI::write(0x76);	// start byte
+	SPI::writeReadBlocking(0x76);	// start byte

 	const uint16_t maskBlank  = 0x0000; // RRRR RGGG GGGB BBBB
 	const uint16_t maskFilled = 0x37e0; // RRRR RGGG GGGB BBBB
@@ -399,8 +398,7 @@
 			} // pix

 			// use transfer() of SPI to transfer spiBuffer
-			SPI::setBuffer(bufSize, spiBuffer);
-			SPI::transfer(SPI::TRANSFER_SEND_BUFFER_DISCARD_RECEIVE);
+			SPI::transferBlocking(spiBuffer, nullptr, bufSize);
 		} // y
 	} // x
 #endif


Replace IMPL_STATIC_LINK[_TYPED] with more useful variants

Change-Id: Ic91c8126b8e9a5a7eeed4c356b783c8bebccecf3


Reduce default tile+texture cache size to 9Mb (was 16Mb)

Change-Id: I15b753b0dd3a78afb9063139886bf76fba4681bd
Reviewed-by: Cristian Adam <d7e76fcf52e73eb28ca5f2c423e8bb0a00c1fb3c@nokia.com>
Reviewed-by: Thomas Lowe <02ef35f2b5ffabc77f5e36c1ccbe561158ecef1a@nokia.com>
Reviewed-by: Ian Chen <4647cc84a579898a3b0880227eafb39d49b3bbfd@nokia.com>
Reviewed-by: Alex Wilson <75fe28a89a52dd8f665f8aed10f0a66d41b4f1d0@nokia.com>

--- src/location/maps/qgeotilecache.cpp
+++ src/location/maps/qgeotilecache.cpp
@@ -124,8 +124,8 @@

     // default values
     setMaxDiskUsage(20 * 1024 * 1024);
-    setMaxMemoryUsage(4 * 1024 * 1024);
-    setExtraTextureUsage(12 * 1024 * 1024);
+    setMaxMemoryUsage(3 * 1024 * 1024);
+    setExtraTextureUsage(6 * 1024 * 1024);

     loadTiles();
 }


Gray out the set power button if there's no aim!

--- digitanks/src/ui/hud.cpp
+++ digitanks/src/ui/hud.cpp
@@ -342,7 +342,7 @@
 		else
 			m_pButton3->SetButtonColor(Color(100, 100, 100));

-		if (m_bHUDActive && (!CDigitanksWindow::Get()->GetControlMode() || CDigitanksWindow::Get()->GetControlMode() == MODE_FIRE))
+		if (m_bHUDActive && pCurrentTank && pCurrentTank->HasDesiredAim() && (!CDigitanksWindow::Get()->GetControlMode() || CDigitanksWindow::Get()->GetControlMode() == MODE_FIRE))
 			m_pButton4->SetButtonColor(Color(150, 0, 150));
 		else
 			m_pButton4->SetButtonColor(Color(100, 100, 100));


AndroidConfig::apiLevelNamesFor: Rewrite using Utils::transform

Change-Id: I93f5f3248dc83ab5d53def6e86431354b431c26f
Reviewed-by: BogDan Vatra <0dff48f39d8b3988baa3d54696a54fd63218fa17@kde.org>

--- src/plugins/android/androidconfigurations.cpp
+++ src/plugins/android/androidconfigurations.cpp
@@ -337,10 +337,7 @@

 QStringList AndroidConfig::apiLevelNamesFor(const QList<SdkPlatform> &platforms)
 {
-    QStringList results;
-    foreach (const SdkPlatform &platform, platforms)
-        results << QLatin1String("android-") + QString::number(platform.apiLevel);
-    return results;
+    return Utils::transform(platforms, AndroidConfig::apiLevelNameFor);
 }

 QString AndroidConfig::apiLevelNameFor(const SdkPlatform &platform)


COMP: Fixing warnings related to unused variable in function argument. Now using itkNotUsed() macro.

--- Testing/Code/IO/itkAnalyzeImageIOTest.cxx
+++ Testing/Code/IO/itkAnalyzeImageIOTest.cxx
@@ -95,7 +95,7 @@
   big_img.close();
   return EXIT_SUCCESS;
 }
-static void RemoveByteSwapTestFiles(const std::string AugmentName)
+static void RemoveByteSwapTestFiles(const std::string & itkNotUsed(AugmentName) )
 {
 //--//  Remove(AugmentName+"LittleEndian.hdr");
 //--//  Remove(AugmentName+"LittleEndian.img");
@@ -103,7 +103,7 @@
 //--//  Remove(AugmentName+"BigEndian.img");
 }

-static int TestByteSwap(const std::string AugmentName)
+static int TestByteSwap(const std::string & AugmentName)
 {
   int rval;
   typedef itk::Image<double, 3> ImageType ;
@@ -161,7 +161,7 @@
   return rval;
 }

-template <typename T> int MakeImage(const std::string AugmentName)
+template <typename T> int MakeImage(const std::string & AugmentName)
 {
   typedef itk::Image<T, 3> ImageType ;
   typedef itk::ImageFileReader< ImageType > ImageReaderType ;


FIX: Warnings on MSVS.

FIX: Warnings on MSVS.

--- Testing/Code/Numerics/FEM/itkFEMTests.cxx
+++ Testing/Code/Numerics/FEM/itkFEMTests.cxx
@@ -1,5 +1,11 @@
 // this file defines the itkFEMTests for the test driver
 // and all it expects is that you have a function called RegisterTests
+
+// disable debug warnings in MS compiler
+#ifdef _MSC_VER
+#pragma warning(disable: 4786)
+#endif
+
 #include <iostream>
 #include "itkTestMain.h"


improve error messages for sc's filters-test

--- sc/qa/unit/filters-test.cxx
+++ sc/qa/unit/filters-test.cxx
@@ -102,7 +102,9 @@
     catch (const orcus::csv_parse_error& e)
     {
         std::cout << "reading csv content file failed: " << e.what() << std::endl;
-        CPPUNIT_ASSERT_MESSAGE("csv parser error", false);
+        rtl::OStringBuffer aErrorMsg("csv parser error: ");
+        aErrorMsg.append(e.what());
+        CPPUNIT_ASSERT_MESSAGE(aErrorMsg.getStr(), false);
     }
 }

@@ -124,7 +126,9 @@
     catch (const orcus::csv_parse_error& e)
     {
         std::cout << "reading csv content file failed: " << e.what() << std::endl;
-        CPPUNIT_ASSERT_MESSAGE("csv parser error", false);
+        rtl::OStringBuffer aErrorMsg("csv parser error: ");
+        aErrorMsg.append(e.what());
+        CPPUNIT_ASSERT_MESSAGE(aErrorMsg.getStr(), false);
     }

 }
@@ -153,7 +157,7 @@
      */
     void testCVEs();

-    //ods filter tests
+    //ods, xls, xlsx filter tests
     void testRangeName();
     void testContent();
     void testFunctions();
@@ -597,7 +601,7 @@
     double aValue;
     pDoc->GetValue(0,0,0,aValue);
     std::cout << aValue << std::endl;
-    CPPUNIT_ASSERT_MESSAGE("",aValue==2);
+    CPPUNIT_ASSERT_MESSAGE("script did not change the value of Sheet1.A1",aValue==2);
     xDocSh->DoClose();
 }

@@ -630,7 +634,7 @@
     double aValue;
     pDoc->GetValue(0,0,0,aValue);
     std::cout << aValue << std::endl;
-    CPPUNIT_ASSERT_MESSAGE("",aValue==2);
+    CPPUNIT_ASSERT_MESSAGE("script did not change the value of Sheet1.A1",aValue==2);
     xDocSh->DoClose();
 }


INTEGRATION: CWS pdf01 (1.10.110); FILE MERGED 2004/08/06 19:48:52 pl 1.10.110.2: RESYNC: (1.10-1.11); FILE MERGED 2004/07/22 14:50:39 nn 1.10.110.1: #i31946# handle notes in PDF export

--- sc/source/ui/inc/output.hxx
+++ sc/source/ui/inc/output.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: output.hxx,v $
  *
- *  $Revision: 1.12 $
- *
- *  last change: $Author: hr $ $Date: 2004-08-02 17:02:56 $
+ *  $Revision: 1.13 $
+ *
+ *  last change: $Author: hr $ $Date: 2004-09-08 16:04:26 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -289,7 +289,8 @@
     void    DrawClipMarks();

     void    DrawNoteMarks();
-    void    PrintNoteMarks( const List& rPosList );     // Liste of ScAddress
+    void    AddPDFNotes();
+    void    PrintNoteMarks( const List& rPosList );     // List of ScAddress
 };


INTEGRATION: CWS fwkbugfix04 (1.8.110); FILE MERGED 2004/12/15 13:09:11 mba 1.8.110.1: obsolete sfx headers removed

--- sc/source/ui/inc/ui_pch.hxx
+++ sc/source/ui/inc/ui_pch.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: ui_pch.hxx,v $
  *
- *  $Revision: 1.8 $
- *
- *  last change: $Author: kz $ $Date: 2004-10-04 20:18:56 $
+ *  $Revision: 1.9 $
+ *
+ *  last change: $Author: kz $ $Date: 2005-01-18 15:48:40 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -179,7 +179,6 @@
 #include <svtools/intitem.hxx>
 #include <so3/ipclient.hxx>
 #include <so3/client.hxx>
-#include <sfx2/cfgitem.hxx>
 #include <svtools/confitem.hxx>
 #include <markdata.hxx>
 #include <svx/optgrid.hxx>


[test] Benchmark: use base class recording

...where possible.

--- test/Benchmark.cpp
+++ test/Benchmark.cpp
@@ -344,10 +344,6 @@
         test_write_io(block);
     }

-    double speed_in_mbs() override {
-        return speed_write;
-    }
-
     std::string id() override {
         return "W";
     }
@@ -381,11 +377,10 @@
             }

         } while ((ms = sw.ms()) < 3*1000);
-        speed_write = calc_speed_mbs(ms, iterations);
-    }
-
-private:
-    double        speed_write;
+
+        this->count = iterations;
+        this->millis = ms;
+    }
 };

@@ -399,7 +394,7 @@

     void test_read_io(nix::Block block) {
         nix::DataArray da = openDataArray(block);
-        speed_read = test_read_io(da);
+        millis = test_read_io(da);
     }

     double test_read_io(nix::DataArray da) {
@@ -417,23 +412,17 @@
             }
         });

-        return calc_speed_mbs(ms, N);
+        this->count = N;
+        return ms;
     }

     void run(nix::Block block) override {
         test_read_io(block);
     }

-    double speed_in_mbs() override {
-        return speed_read;
-    }
-
     std::string id() override {
         return "R";
     }
-
-private:
-    double        speed_read;
 };

@@ -446,26 +435,17 @@

     void test_read_io_polynom(nix::Block block) {
         nix::DataArray da = openDataArray(block);
-
         da.polynomCoefficients({3, 4, 5, 6});
-
-        speed_read_poly = test_read_io(da);
+        millis = test_read_io(da);
     }

     void run(nix::Block block) override {
         test_read_io_polynom(block);
     }

-    double speed_in_mbs() override {
-        return speed_read_poly;
-    }
-
     std::string id() override {
         return "P";
     }
-
-private:
-    double        speed_read_poly;
 };

 /* ************************************ */


INTEGRATION: CWS pchfix02 (1.17.186); FILE MERGED 2006/09/01 17:26:29 kaib 1.17.186.1: #i68856# Added header markers and pch files

--- extensions/source/dbpilots/controlwizard.cxx
+++ extensions/source/dbpilots/controlwizard.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: controlwizard.cxx,v $
  *
- *  $Revision: 1.17 $
- *
- *  last change: $Author: rt $ $Date: 2005-09-08 19:26:58 $
+ *  $Revision: 1.18 $
+ *
+ *  last change: $Author: obo $ $Date: 2006-09-16 12:58:55 $
  *
  *  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_extensions.hxx"

 #ifndef _EXTENSIONS_DBP_CONTROLWIZARD_HXX
 #include "controlwizard.hxx"


cpplint

cpplint

--- stan/math/rev/mat/fun/cholesky_decompose.hpp
+++ stan/math/rev/mat/fun/cholesky_decompose.hpp
@@ -11,6 +11,7 @@
 #include <stan/math/prim/mat/err/check_pos_definite.hpp>
 #include <stan/math/prim/mat/err/check_square.hpp>
 #include <stan/math/prim/mat/err/check_symmetric.hpp>
+#include <algorithm>

 namespace stan {
   namespace math {
@@ -23,10 +24,11 @@
       vari** variRefA_;
       vari** variRefL_;

-      /* Constructor for cholesky function
+      /**
+       * Constructor for cholesky function.
        *
-       * Stores varis for A
-       * Instantiates and stores varis for L
+       * Stores varis for A.
+       * Instantiates and stores varis for L.
        * Instantiates and stores dummy vari for
        * upper triangular part of var result returned
        * in cholesky_decompose function call
@@ -38,11 +40,11 @@
        * cholesky_decompose.
        *
        * block_size_ determined using the same
-       * calculation Eigen/LLT.h
+       * calculation Eigen/LLT.h
        *
        * @param matrix A
        * @param matrix L, cholesky factor of A
-       * */
+       */
       cholesky_decompose_v_vari(const Eigen::Matrix<var, -1, -1>& A,
                                 const Eigen::Matrix<double, -1, -1>& L_A)
         : vari(0.0),
@@ -54,7 +56,7 @@
             size_t pos = 0;
          block_size_ = M_/8;
          block_size_ = (block_size_/16)*16;
-         block_size_ = (std::min)((std::max)(block_size_,8), 128);
+         block_size_ = (std::min)((std::max)(block_size_, 8), 128);
         for (size_type j = 0; j < M_; ++j) {
           for (size_type i = j; i < M_; ++i) {
             variRefA_[pos] = A.coeffRef(i, j).vi_;
@@ -67,7 +69,6 @@
       inline void symbolic_rev(Block_& L,
                                Block_& Lbar,
                                int size) {
-
         using Eigen::Lower;
         using Eigen::Upper;
         using Eigen::StrictlyUpper;
@@ -79,13 +80,14 @@
         L.triangularView<Upper>().solveInPlace(Lbar.transpose());
       }

-      /* Reverse mode differentiation
+      /**
+       * Reverse mode differentiation
        * algorithm refernce:
        *
-       * Iain Murray: Differentiation of
+       * Iain Murray: Differentiation of
        * the Cholesky decomposition, 2016.
        *
-       * */
+       */
       virtual void chain() {
         using Eigen::MatrixXd;
         using Eigen::Lower;
@@ -117,7 +119,7 @@
           Block_ Bbar = Lbar.block(k, 0, M_ - k, j);
           Block_ Cbar = Lbar.block(k, j, M_ - k, k - j);
           if (Cbar.size() > 0) {
-            Cbar
+            Cbar
               = D.transpose().triangularView<Upper>()
               .solve(Cbar.transpose()).transpose();
             Bbar.noalias() -= Cbar * R;
@@ -131,12 +133,13 @@
         }
         pos = 0;
         for (size_type j = 0; j < M_; ++j)
-          for (size_type i = j; i < M_; ++i)
-            variRefA_[pos++]->adj_ += Lbar.coeffRef(i,j);
+          for (size_type i = j; i < M_; ++i)
+            variRefA_[pos++]->adj_ += Lbar.coeffRef(i, j);
       }
     };

-    /* Reverse mode specialization of
+    /**
+     * Reverse mode specialization of
      * cholesky decomposition
      *
      * Internally calls llt rather than using
@@ -163,7 +166,7 @@
       check_pos_definite("cholesky_decompose", "m", L_factor);
       L_A = L_factor.matrixL();

-      // Memory allocated in arena.
+      // Memory allocated in arena.
       cholesky_decompose_v_vari *baseVari
         = new cholesky_decompose_v_vari(A, L_A);
       vari dummy(0.0, false);


fix error in config init for on the fly spellcheck

svn path=/trunk/KDE/kdelibs/kate/; revision=994116

--- part/utils/kateconfig.cpp
+++ part/utils/kateconfig.cpp
@@ -105,6 +105,7 @@
    m_searchDirConfigDepthSet (true),
    m_backupPrefixSet (true),
    m_backupSuffixSet (true),
+   m_onTheFlySpellCheckSet (true),
    m_doc (0)
 {
   s_global = this;
@@ -132,7 +133,7 @@
    m_searchDirConfigDepthSet (false),
    m_backupPrefixSet (false),
    m_backupSuffixSet (false),
-   m_onTheFlySpellCheck (false),
+   m_onTheFlySpellCheckSet (false),
    m_doc (doc)
 {
   m_proberTypeForEncodingAutoDetection=s_global->encodingProberType();


federated: compilation errors and crash fixed. test still fails.

--- sql/ha_federated.cc
+++ sql/ha_federated.cc
@@ -376,12 +376,12 @@
     parse_url()
       share     pointer to FEDERATED share
       table     pointer to current TABLE class
-
+
   DESCRIPTION
     populates the share with information about the connection
     to the remote database that will serve as the data source.
     This string must be specified (currently) in the "comment" field,
-    listed in the CREATE TABLE statement.
+    listed in the CREATE TABLE statement.

     This string MUST be in the format of any of these:

@@ -401,10 +401,10 @@

   RETURN VALUE
     0   success
-    -1  failure, wrong string format
-
-*/
-int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_flag)
+    -1  failure, wrong string format
+
+*/
+static int parse_url(FEDERATED_SHARE *share, TABLE *table, uint table_create_flag)
 {
   DBUG_ENTER("ha_federated::parse_url");

@@ -429,7 +429,7 @@
     }
     share->username+= 3;

-    if (share->hostname= strchr(share->username, '@'))
+    if (share->hostname= strchr(share->username, '@'))
     {
       share->username[share->hostname - share->username]= '\0';
       share->hostname++;
@@ -1522,7 +1522,7 @@
 {
   DBUG_ENTER("ha_federated::position");
   //ha_store_ptr Add seek storage
-  ha_store_ptr(ref, ref_length, current_position);
+  *(MYSQL_ROW_OFFSET *)ref=current_position;
   DBUG_VOID_RETURN;
 }

@@ -1541,7 +1541,7 @@
 {
   DBUG_ENTER("ha_federated::rnd_pos");
   statistic_increment(table->in_use->status_var.ha_read_rnd_count,&LOCK_status);
-  current_position= ha_get_ptr(pos,ref_length);
+  current_position= *(MYSQL_ROW_OFFSET *)pos;
   result->current_row= 0;
   result->data_cursor= current_position;
   DBUG_RETURN(rnd_next(buf));
@@ -1706,10 +1706,10 @@
 int ha_federated::create(const char *name, TABLE *table_arg,
                        HA_CREATE_INFO *create_info)
 {
+  int retcode;
+  FEDERATED_SHARE tmp;
   DBUG_ENTER("ha_federated::create");
-  int retcode;
-  FEDERATED_SHARE *tmp;
-  retcode= parse_url(tmp, table_arg, 1);
+  retcode= parse_url(&tmp, table_arg, 1);
   if (retcode < 0)
   {
     DBUG_PRINT("ha_federated::create",


Don't use _popcnt intrinsec on windows. (#431)

Not all CPUs support it.

--- src/cubeb_mixer.cpp
+++ src/cubeb_mixer.cpp
@@ -14,9 +14,6 @@
 #include <climits>
 #include <cmath>
 #include <cstdlib>
-#ifdef _MSC_VER
-#include <intrin.h>
-#endif
 #include <memory>
 #include <type_traits>
 #include "cubeb-internal.h"
@@ -80,8 +77,6 @@
 {
 #if __GNUC__ || __clang__
   return __builtin_popcount (x);
-#elif _MSC_VER
-  return __popcnt(x);
 #else
   x -= (x >> 1) & 0x55555555;
   x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
@@ -90,6 +85,7 @@
   return (x + (x >> 16)) & 0x3F;
 #endif
 }
+
 struct MixerContext {
   MixerContext(cubeb_sample_format f,
                uint32_t in_channels,


item_strfunc.cc:   The result didn't return proper collation

--- sql/item_strfunc.cc
+++ sql/item_strfunc.cc
@@ -1663,13 +1663,16 @@
 String *Item_func_elt::val_str(String *str)
 {
   uint tmp;
+  String *res;
   if ((tmp=(uint) item->val_int()) == 0 || tmp > arg_count)
   {
     null_value=1;
     return NULL;
   }
   null_value=0;
-  return args[tmp-1]->val_str(str);
+  res= args[tmp-1]->val_str(str);
+  res->set_charset(charset());
+  return res;
 }


Adjust Hume versioning output.

Adjust Hume versioning output.

Now, whenever logging output starts, the version of the library
that is in use will be displayed.

--- Logger.cpp
+++ Logger.cpp
@@ -85,7 +85,7 @@
 	void Logger::initSession()
 	{
 		ofs.open("log.txt", std::ios::app | std::ios::out);
-		ofs << "NEW LOGGING SESSION = " << " HUME v" << MAJOR_VERSION << "." << MINOR_VERSION << "." << REVISION_VERSION << " ================" << std::endl;
+		ofs << "NEW LOGGING SESSION ===== " << "HUME v" << MAJOR_VERSION << "." << MINOR_VERSION << "." << REVISION_VERSION << " ===========" << std::endl;
 		return;
 	}


item_strfunc.cc	renamed MD5* to my_MD5* to avoid name clashes with openssl library

sql/item_strfunc.cc:
  renamed MD5* to my_MD5* to avoid name clashes with openssl library

--- sql/item_strfunc.cc
+++ sql/item_strfunc.cc
@@ -30,7 +30,6 @@
 #ifdef HAVE_CRYPT_H
 #include <crypt.h>
 #endif
-
 #include "md5.h"

 String empty_string("");
@@ -66,13 +65,13 @@
   String * sptr= args[0]->val_str(str);
   if (sptr)
   {
-    MD5_CTX context;
+    my_MD5_CTX context;
     unsigned char digest[16];

     null_value=0;
-    MD5Init (&context);
-    MD5Update (&context,(unsigned char *) sptr->ptr(), sptr->length());
-    MD5Final (digest, &context);
+    my_MD5Init (&context);
+    my_MD5Update (&context,(unsigned char *) sptr->ptr(), sptr->length());
+    my_MD5Final (digest, &context);
     str->alloc(32);				// Ensure that memory is free
     sprintf((char *) str->ptr(),
 	    "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",


allocate shared memory for portal heap, which is needed for params storage. Param list seems working

--- src/postgres/backend/utils/mmgr/portalmem.cpp
+++ src/postgres/backend/utils/mmgr/portalmem.cpp
@@ -219,11 +219,13 @@
 	portal = (Portal) MemoryContextAllocZero(PortalMemory, sizeof *portal);

 	/* initialize portal heap context; typically it won't store much */
-	portal->heap = AllocSetContextCreate(PortalMemory,
+	// TODO: Peloton Changes, params for prepared stmt are built in heap
+	portal->heap = SHMAllocSetContextCreate(PortalMemory,
 	                                     "PortalHeapMemory",
 	                                     ALLOCSET_SMALL_MINSIZE,
 	                                     ALLOCSET_SMALL_INITSIZE,
-	                                     ALLOCSET_SMALL_MAXSIZE);
+	                                     ALLOCSET_SMALL_MAXSIZE,
+	                                     SHM_DEFAULT_SEGMENT);

 	/* create a resource owner for the portal */
 	portal->resowner = ResourceOwnerCreate(CurTransactionResourceOwner,


Don't crash if the ring buffer doesn't contain the requested audio Apple bug number 9523959

--- ThirdParty/PublicUtility/CARingBuffer.cpp
+++ ThirdParty/PublicUtility/CARingBuffer.cpp
@@ -260,6 +260,12 @@
 	if (err) return err;
 	size = endRead - startRead;

+	// Don't perform out-of-bounds writes
+	if((startRead - startRead0) > nFrames || (endRead0 - endRead) > nFrames) {
+		ZeroABL(abl, 0, nFrames * mBytesPerFrame);
+		return noErr;
+	}
+
 	SInt32 destStartOffset = startRead - startRead0;
 	if (destStartOffset > 0) {
 		ZeroABL(abl, 0, destStartOffset * mBytesPerFrame);


Added more test cases for mark to ligature positioning...

--- Tools/Tester/TextProcessorTester_GPOS.cpp
+++ Tools/Tester/TextProcessorTester_GPOS.cpp
@@ -271,28 +271,28 @@
 {
     Builder builder;

-    /* Test with unmatching base glyph. */
+    /* Test with unmatching mark 1 glyph. */
     testPositioning(builder.createMarkToBasePos(1, {
                         {2, {0, builder.createAnchor(100, 200)}}
                     }, {
                         {1, { builder.createAnchor(900, 800) }}
                     }),
                     { 0, 2 }, { {0, 0}, {0, 0} }, { 0, 0 });
-    /* Test with unmatching mark glyph. */
+    /* Test with unmatching mark 2 glyph. */
     testPositioning(builder.createMarkToBasePos(1, {
                         {2, {0, builder.createAnchor(100, 200)}}
                     }, {
                         {1, { builder.createAnchor(900, 800) }}
                     }),
                     { 1, 0 }, { {0, 0}, {0, 0} }, { 0, 0 });
-    /* Test with a mark belonging to zero class. */
+    /* Test with a mark 2 belonging to zero class. */
     testPositioning(builder.createMarkToBasePos(1, {
                         {2, {0, builder.createAnchor(100, 200)}}
                     }, {
                         {1, { builder.createAnchor(900, 800) }}
                     }),
                     { 1, 2 }, { {0, 0}, {800, 600} }, { 0, 0 });
-    /* Test with a mark belonging to a non-zero class. */
+    /* Test with a mark 2 belonging to a non-zero class. */
     testPositioning(builder.createMarkToBasePos(2, {
                         {2, {1, builder.createAnchor(100, 200)}}
                     }, {
@@ -325,72 +325,58 @@

 void TextProcessorTester::testMarkToLigaturePositioning()
 {
-    Glyph markGlyphs[] = { 2 };
-
-    CoverageTable markCoverage;
-    markCoverage.coverageFormat = 1;
-    markCoverage.format1.glyphCount = sizeof(markGlyphs) / sizeof(Glyph);
-    markCoverage.format1.glyphArray = markGlyphs;
-
-    Glyph ligatureGlyphs[] = { 1 };
-
-    CoverageTable ligatureCoverage;
-    ligatureCoverage.coverageFormat = 1;
-    ligatureCoverage.format1.glyphCount = sizeof(ligatureGlyphs) / sizeof(Glyph);
-    ligatureCoverage.format1.glyphArray = ligatureGlyphs;
-
-    AnchorTable markAnchor;
-    markAnchor.anchorFormat = 1;
-    markAnchor.xCoordinate = 50;
-    markAnchor.yCoordinate = -50;
-
-    MarkRecord markRecord;
-    markRecord.clazz = 0;
-    markRecord.markAnchor = &markAnchor;
-
-    MarkArrayTable markArray;
-    markArray.markCount = 1;
-    markArray.markRecord = &markRecord;
-
-    AnchorTable ligatureAnchor;
-    ligatureAnchor.anchorFormat = 1;
-    ligatureAnchor.xCoordinate = -50;
-    ligatureAnchor.yCoordinate = 50;
-
-    ComponentRecord componentRecord;
-    componentRecord.ligatureAnchor = &ligatureAnchor;
-
-    LigatureAttachTable ligatureAttach;
-    ligatureAttach.componentCount = 1;
-    ligatureAttach.componentRecord = &componentRecord;
-
-    LigatureArrayTable ligatureArray;
-    ligatureArray.ligatureCount = 1;
-    ligatureArray.ligatureAttach = &ligatureAttach;
-
-    MarkToLigatureAttachmentPosSubtable subtable;
-    subtable.posFormat = 1;
-    subtable.markCoverage = &markCoverage;
-    subtable.ligatureCoverage = &ligatureCoverage;
-    subtable.classCount = 1;
-    subtable.markArray = &markArray;
-    subtable.ligatureArray = &ligatureArray;
-
-    SFAlbum album;
-    SFAlbumInitialize(&album);
-
-    SFCodepoint input[] = { 1, 2 };
-    processGPOS(&album, input, sizeof(input) / sizeof(SFCodepoint), subtable);
-
-    /* Test the output. */
-    const SFPoint *actualOffsets = SFAlbumGetGlyphOffsetsPtr(&album);
-    const SFAdvance *actualAdvances = SFAlbumGetGlyphAdvancesPtr(&album);
-    const SFPoint expectedOffsets[] = { { 0, 0 }, { -100, 100, } };
-    const SFAdvance expectedAdvances[] = { 0, 0 };
-
-    SFAssert(SFAlbumGetGlyphCount(&album) == (sizeof(expectedOffsets) / sizeof(SFPoint)));
-    SFAssert(memcmp(actualOffsets, expectedOffsets, sizeof(expectedOffsets) / sizeof(SFPoint)) == 0);
-    SFAssert(memcmp(actualAdvances, expectedAdvances, sizeof(expectedAdvances) / sizeof(SFAdvance)) == 0);
+    Builder builder;
+
+    /* Test with unmatching ligature glyph. */
+    testPositioning(builder.createMarkToLigaturePos(1, {
+                        {2, {0, builder.createAnchor(100, 200)}}
+                    }, {
+                        {1, { { builder.createAnchor(900, 800) } }}
+                    }),
+                    { 0, 2 }, { {0, 0}, {0, 0} }, { 0, 0 });
+    /* Test with unmatching mark glyph. */
+    testPositioning(builder.createMarkToLigaturePos(1, {
+                        {2, {0, builder.createAnchor(100, 200)}}
+                    }, {
+                        {1, { { builder.createAnchor(900, 800) } }}
+                    }),
+                    { 1, 0 }, { {0, 0}, {0, 0} }, { 0, 0 });
+    /* Test with a mark belonging to zero class. */
+    testPositioning(builder.createMarkToLigaturePos(1, {
+                        {2, {0, builder.createAnchor(100, 200)}}
+                    }, {
+                        {1, { { builder.createAnchor(900, 800) } }}
+                    }),
+                    { 1, 2 }, { {0, 0}, {800, 600} }, { 0, 0 });
+    /* Test with a mark belonging to a non-zero class. */
+    testPositioning(builder.createMarkToLigaturePos(2, {
+                        {2, {1, builder.createAnchor(100, 200)}}
+                    }, {
+                        {1, { { builder.createAnchor(0, 0), builder.createAnchor(900, 800) } }}
+                    }),
+                    { 1, 2 }, { {0, 0}, {800, 600} }, { 0, 0 });
+    /* Test with middle matching rules. */
+    testPositioning(builder.createMarkToLigaturePos(1, {
+                        {2, {0, builder.createAnchor(100, 200)}},
+                        {4, {0, builder.createAnchor(300, 400)}},
+                        {6, {0, builder.createAnchor(450, 475)}},
+                    }, {
+                        {1, { { builder.createAnchor(900, 800) } }},
+                        {3, { { builder.createAnchor(700, 600) } }},
+                        {5, { { builder.createAnchor(550, 525) } }},
+                    }),
+                    { 3, 4 }, { {0, 0}, {400, 200} }, { 0, 0 });
+    /* Test with last matching rules. */
+    testPositioning(builder.createMarkToLigaturePos(1, {
+                        {2, {0, builder.createAnchor(100, 200)}},
+                        {4, {0, builder.createAnchor(300, 400)}},
+                        {6, {0, builder.createAnchor(450, 475)}},
+                    }, {
+                        {1, { { builder.createAnchor(900, 800) } }},
+                        {3, { { builder.createAnchor(700, 600) } }},
+                        {5, { { builder.createAnchor(550, 525) } }},
+                    }),
+                    { 5, 6 }, { {0, 0}, {100, 50} }, { 0, 0 });
 }

 void TextProcessorTester::testMarkToMarkPositioning()


enh: New 'sum' argument of -divide-by option of calculate-element-wise [Applications]

--- Applications/src/calculate-element-wise.cc
+++ Applications/src/calculate-element-wise.cc
@@ -190,15 +190,15 @@
   cout << "  -mul, -multiply-with, -times <value> | <file> [<scalars>]\n";
   cout << "      Multiply by constant value or data sequence read from specified file.\n";
   cout << "      Another name for this option is the '*' sign, see Examples.\n";
-  cout << "  -div, -divide-by, -over <value> | <file> [<scalars>]\n";
+  cout << "  -div, -divide-by, -over <value> | sum | <file> [<scalars>]\n";
   cout << "      Divide by constant value or data sequence read from specified file.\n";
+  cout << "      When the argument is \"sum\", the divisor is the sum of the values.\n";
   cout << "      When dividing by zero values in the input file, the result is NaN.\n";
   cout << "      Use :option:`-mask` with argument NaN and :option:`-pad` to replace\n";
   cout << "      these undefined values by a constant such as zero.\n";
   cout << "      Another name for this option is the '/' sign, see Examples.\n";
-  cout << "  -div-with-zero <file> [<scalars>]\n";
-  cout << "      Same as :option:`-div` but set result to zero instead of NaN in case of\n";
-  cout << "      a division by zero due to a zero value in the specified file.\n";
+  cout << "  -div-with-zero <value> | sum | <file> [<scalars>]\n";
+  cout << "      Same as :option:`-div`, but set result to zero in case of division by zero.\n";
   cout << "  -abs\n";
   cout << "      Replace values by their respective absolute value.\n";
   cout << "  -pow, -power <exponent>\n";
@@ -753,7 +753,12 @@
     } else if (OPTION("-div") || OPTION("-divide-by") || OPTION("-over") || OPTION("/")) {
       const char *arg = ARGUMENT;
       double c;
-      if (FromString(arg, c)) {
+      if (ToLower(arg) == "sum") {
+        Statistic *a = new Sum();
+        a->Hidden(verbose < 1);
+        ops.push_back(UniquePtr<Op>(a));
+        ops.push_back(UniquePtr<Op>(new Div(&a->Value())));
+      } else if (FromString(arg, c)) {
         if (fequal(c, .0)) {
           cerr << "Invalid -div argument, value must not be zero!" << endl;
           exit(1);
@@ -784,28 +789,39 @@
         ops.push_back(UniquePtr<Op>(op.release()));
       }
     } else if (OPTION("-div-with-zero")) {
-      const char *fname = ARGUMENT;
-      const char *aname = nullptr;
-      if (HAS_ARGUMENT) {
-        aname = ARGUMENT;
+      const char *arg = ARGUMENT;
+      double c;
+      if (ToLower(arg) == "sum") {
+        Statistic *a = new Sum();
+        a->Hidden(verbose < 1);
+        ops.push_back(UniquePtr<Op>(a));
+        ops.push_back(UniquePtr<Op>(new DivWithZero(&a->Value())));
+      } else if (FromString(arg, c)) {
+        ops.push_back(UniquePtr<Op>(new DivWithZero(c)));
       } else {
-        #if MIRTK_Image_WITH_VTK
-          if (dataset && arrays->HasArray(fname)) {
-            aname = fname;
-            fname = input_name;
-          }
-        #endif
-      }
-      UniquePtr<DivWithZero> op(new DivWithZero(fname));
-      if (aname) {
-        #if MIRTK_Image_WITH_VTK
-          op->ArrayName(aname);
-          op->IsCellData(cell_data);
-        #else
-          FatalError("Cannot read point set files when build without VTK or wrong usage!");
-        #endif
-      }
-      ops.push_back(UniquePtr<Op>(op.release()));
+        const char *fname = arg;
+        const char *aname = nullptr;
+        if (HAS_ARGUMENT) {
+          aname = ARGUMENT;
+        } else {
+          #if MIRTK_Image_WITH_VTK
+            if (dataset && arrays->HasArray(fname)) {
+              aname = fname;
+              fname = input_name;
+            }
+          #endif
+        }
+        UniquePtr<DivWithZero> op(new DivWithZero(fname));
+        if (aname) {
+          #if MIRTK_Image_WITH_VTK
+            op->ArrayName(aname);
+            op->IsCellData(cell_data);
+          #else
+            FatalError("Cannot read point set files when build without VTK or wrong usage!");
+          #endif
+        }
+        ops.push_back(UniquePtr<Op>(op.release()));
+      }
     } else if (OPTION("-abs")) {
       ops.push_back(UniquePtr<Op>(new Abs()));
     } else if (OPTION("-pow") || OPTION("-power")) {


Fix detection of wheel direction

Fix detection of wheel direction

--- Arduino/sketches/RC2Robot/wheelencoder.cpp
+++ Arduino/sketches/RC2Robot/wheelencoder.cpp
@@ -30,6 +30,11 @@
 static volatile int last_right_state;
 static volatile long last_right_time;

+// Encodes how much to increment the ticks based on the last state and the new state.
+// The states are encoded as "B<<1 | A" for the A & B interrupt pins.
+// Indices into the array are:
+//   last_state<<2 | new_state
+// The commend next to each value shows "last_state -> new_state".
 static const signed char ENC_STATES [] = {
   0,  // 00 -> 00
   1,  // 00 -> 01
@@ -62,15 +67,15 @@

 // Update the left encoder when either encoder pin changes.
 static void leftISR() {
-  int new_state = FastGPIO::Pin<LEFT_ENCODER_PIN_A>::isInputHigh()<<1
-     | FastGPIO::Pin<LEFT_ENCODER_PIN_B>::isInputHigh();
+  int new_state = FastGPIO::Pin<LEFT_ENCODER_PIN_A>::isInputHigh()
+     | FastGPIO::Pin<LEFT_ENCODER_PIN_B>::isInputHigh()<<1;
   updateTicks(left_ticks, last_left_state, last_left_time, new_state);
 }

 // Update the encoder when the right A pin changes.
 static void rightISR() {
-  int new_state = FastGPIO::Pin<RIGHT_ENCODER_PIN_A>::isInputHigh()<<1
-     | FastGPIO::Pin<RIGHT_ENCODER_PIN_B>::isInputHigh();
+  int new_state = FastGPIO::Pin<RIGHT_ENCODER_PIN_A>::isInputHigh()
+     | FastGPIO::Pin<RIGHT_ENCODER_PIN_B>::isInputHigh()<<1;
   updateTicks(right_ticks, last_right_state, last_right_time, new_state);
 }


Fix #24470 Atlas Texture with margin setting cause error in editor.

--- scene/resources/texture.cpp
+++ scene/resources/texture.cpp
@@ -1087,8 +1087,12 @@
 	if (!atlas.is_valid())
 		return true;

-	int x = p_x + region.position.x + margin.position.x;
-	int y = p_y + region.position.y + margin.position.y;
+	int x = p_x + region.position.x - margin.position.x;
+	int y = p_y + region.position.y - margin.position.y;
+
+	// margin edge may outside of atlas
+	if (x < 0 || x >= atlas->get_width()) return false;
+	if (y < 0 || y >= atlas->get_height()) return false;

 	return atlas->is_pixel_opaque(x, y);
 }


determine min and max of data when loading vtk meshes

--- src/data/loader.cpp
+++ src/data/loader.cpp
@@ -189,6 +189,9 @@

         QVector<QVector<float> > values = lv->getPointData();

+        float min = std::numeric_limits<float>().max();
+        float max = std::numeric_limits<float>().min();
+
         if ( values.size() > 0 )
         {
             QVector<float> data = values[0];
@@ -196,6 +199,8 @@
             {
                 for ( int i = 0; i < numPoints; ++i )
                 {
+                    min = qMin( min, data[i] );
+                    max = qMax( max, data[i] );
                     mesh->setVertexData( i, data[i] );
                 }
             }
@@ -214,6 +219,8 @@

         mesh->finalize();
         DatasetMesh* dataset = new DatasetMesh( mesh, fn );
+        dataset->properties()->set( Fn::Property::D_MIN, min );
+        dataset->properties()->set( Fn::Property::D_MAX, max );
         m_dataset.push_back( dataset );
         delete lv;
         return true;


Initialise new member of ImageTestParams struct

This doesn't appear to be used in the tests, but without this it
generates compiler warnings on some of our platforms.

Components: Vulkan
VK-GL-CTS issue: 3240
Affects: dEQP-VK.memory.requirements.*

Change-Id: I5c4dfd0443f0f318d45e89ae22d5103a1dae198e

--- external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp
+++ external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp
@@ -887,6 +887,7 @@

 		params.flags		=  imageFlagsCases[flagsNdx].flags;
 		params.transient	=  imageFlagsCases[flagsNdx].transient;
+		params.useMaint4	=  false;
 		caseName			<< imageFlagsCases[flagsNdx].name;

 		if (tilingNdx != 0)


[TestBlock] change Throw asserts checks to expect UninitializedEntity

--- test/TestBlock.cpp
+++ test/TestBlock.cpp
@@ -90,7 +90,7 @@
 void TestBlock::testSourceAccess() {
     vector<string> names = { "source_a", "source_b", "source_c", "source_d", "source_e" };
     Source s;
-    CPPUNIT_ASSERT_THROW(block.hasSource(s), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.hasSource(s), UninitializedEntity);
     CPPUNIT_ASSERT(block.sourceCount() == 0);
     CPPUNIT_ASSERT(block.sources().size() == 0);
     CPPUNIT_ASSERT(block.getSource("invalid_id") == false);
@@ -151,7 +151,7 @@
     CPPUNIT_ASSERT_THROW(block.createDataArray(names[0], "channel", DataType::Double, nix::NDSize({ 0 })),
                          DuplicateName);
     CPPUNIT_ASSERT(block.hasDataArray(data_array));
-    CPPUNIT_ASSERT_THROW(block.hasDataArray(a), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.hasDataArray(a), UninitializedEntity);
     CPPUNIT_ASSERT(block.dataArrayCount() == names.size());
     CPPUNIT_ASSERT(block.dataArrays().size() == names.size());

@@ -181,7 +181,7 @@

         block.deleteDataArray(*it);
     }
-    CPPUNIT_ASSERT_THROW(block.deleteDataArray(a), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.deleteDataArray(a), UninitializedEntity);
     CPPUNIT_ASSERT(block.dataArrayCount() == 0);
     CPPUNIT_ASSERT(block.dataArrays().size() == 0);
     CPPUNIT_ASSERT(block.getDataArray("invalid_id") == false);
@@ -205,7 +205,7 @@
     CPPUNIT_ASSERT(block.tagCount() == 0);
     CPPUNIT_ASSERT(block.tags().size() == 0);
     CPPUNIT_ASSERT(block.getTag("invalid_id") == false);
-    CPPUNIT_ASSERT_THROW(block.hasTag(t), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.hasTag(t), UninitializedEntity);

     vector<string> ids;
     for (auto it = names.begin(); it != names.end(); ++it) {
@@ -232,7 +232,7 @@
     tag = block.createTag("test", "test", {0.0});
     CPPUNIT_ASSERT(block.hasTag(tag));
     CPPUNIT_ASSERT_NO_THROW(block.deleteTag(tag));
-    CPPUNIT_ASSERT_THROW(block.deleteTag(t), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.deleteTag(t), UninitializedEntity);

     CPPUNIT_ASSERT(block.tagCount() == 0);
     CPPUNIT_ASSERT(block.tags().size() == 0);
@@ -261,7 +261,7 @@
     CPPUNIT_ASSERT(block.multiTagCount() == 0);
     CPPUNIT_ASSERT(block.multiTags().size() == 0);
     CPPUNIT_ASSERT(block.getMultiTag("invalid_id") == false);
-    CPPUNIT_ASSERT_THROW(block.hasMultiTag(m), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.hasMultiTag(m), UninitializedEntity);
     vector<string> ids;
     for (auto it = names.begin(); it != names.end(); it++) {
         mtag = block.createMultiTag(*it, "segment", positions);
@@ -284,7 +284,7 @@
     }
     mtag = block.createMultiTag("test", "test", positions);
     CPPUNIT_ASSERT(block.hasMultiTag(mtag));
-    CPPUNIT_ASSERT_THROW(block.deleteMultiTag(m), std::runtime_error);
+    CPPUNIT_ASSERT_THROW(block.deleteMultiTag(m), UninitializedEntity);
     CPPUNIT_ASSERT_NO_THROW(block.deleteMultiTag(mtag));
     CPPUNIT_ASSERT(block.multiTagCount() == 0);
     CPPUNIT_ASSERT(block.multiTags().size() == 0);


Partial revert of CL 8054: Fix invalid layout transitions in some dynamic rendering tests

This image barrier change was wrong. I thought this was a duplicate
barrier for the color attachment image, but it was actually
one for the depth/stencil attachment image.

Affects:

dEQP-VK.multiview.dynamic_rendering.depth.*
dEQP-VK.multiview.dynamic_rendering.stencil.*

Components: Vulkan

VK-GL-CTS issue: 3164

Change-Id: Id65e226eaec2c158289d684a0a997d8a929a5f45

--- external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp
+++ external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp
@@ -3632,9 +3632,9 @@
 		m_parameters.extent.depth,									//deUint32				layerCount;
 	};
 	imageBarrier(*m_device, *m_cmdBuffer, m_dsAttachment->getImage(), subresourceRange,
-		VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
-		VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
-		VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
+		VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+		0, VK_ACCESS_TRANSFER_WRITE_BIT,
+		VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);

 	const tcu::Vec4		baseColor	= getQuarterRefColor(0u, 0u, 0u, false);
 	const float			clearDepth	= baseColor[0];


Print annotations

Print annotations

--- lib/prettyprinter.cpp
+++ lib/prettyprinter.cpp
@@ -409,7 +409,7 @@
             assert(false);
             break;
           }
-          bool needParen = (uo.e()->isa<BinOp>() || uo.e()->isa<UnOp>());
+          bool needParen = (uo.e()->isa<BinOp>() || uo.e()->isa<UnOp>() || uo.ann()!=NULL);
           if (needParen)
             os << "(";
           p(uo.e());
@@ -488,6 +488,9 @@
           }
           p(ti.type(),ti.domain());
         }
+      }
+      if (e->ann() && !e->isa<VarDecl>()) {
+        p(e->ann());
       }
     }


commit

commit

--- examples/circuits/noisy_teleport_qubit_circuit.cpp
+++ examples/circuits/noisy_teleport_qubit_circuit.cpp
@@ -32,27 +32,27 @@
     // initialize the noisy quantum engine with an amplitude damping noise model
     // and a quantum circuit; in C++17 you can make use of the class template
     // argument deduction rules to simply write
-    // QNoisyEngine qNoisyEngine{qc, QubitAmplitudeDampingNoise{0.99}};
-    QNoisyEngine<QubitAmplitudeDampingNoise> qNoisyEngine{
+    // QNoisyEngine noisy_engine{qc, QubitAmplitudeDampingNoise{0.99}};
+    QNoisyEngine<QubitAmplitudeDampingNoise> noisy_engine{
         qc, QubitAmplitudeDampingNoise{0.99}};

     // display the quantum circuit
     std::cout << ">> BEGIN CIRCUIT\n";
-    std::cout << qNoisyEngine.get_circuit() << '\n';
+    std::cout << noisy_engine.get_circuit() << '\n';
     std::cout << ">> END CIRCUIT\n\n";

     // execute the circuit
     for (auto&& step : qc)
-        qNoisyEngine.execute(step);
+        noisy_engine.execute(step);

     // display the measurement statistics
     std::cout << ">> BEGIN AFTER RUNNING\n";
-    std::cout << qNoisyEngine << '\n';
+    std::cout << noisy_engine << '\n';
     std::cout << ">> END AFTER RUNNING\n\n";

     // verify how successful the teleportation was
     ket psi_initial = U * 0_ket;
-    ket psi_final = qNoisyEngine.get_psi();
+    ket psi_final = noisy_engine.get_psi();
     std::cout << ">> Initial state:\n";
     std::cout << disp(psi_initial) << '\n';
     std::cout << ">> Teleported state:\n";


launch结束时断连接

launch结束时断连接

--- src/dbg_request.cpp
+++ src/dbg_request.cpp
@@ -241,6 +241,7 @@
 		}
 		lua_pop(L, 1);
 		set_state(state::terminated);
+		network_->close();
 		return false;
 	}


Remove conflicting functions from incremental present tests

Change-Id: I9612cc9cb9000f9d2d34ad20d00366b2a1e848a9

--- external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp
+++ external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp
@@ -213,25 +213,6 @@
 	}
 }

-vk::VkQueue getDeviceQueue (const vk::DeviceInterface& vkd, vk::VkDevice device, deUint32 queueFamilyIndex, deUint32 queueIndex)
-{
-	vk::VkQueue queue = (vk::VkQueue)0;
-	vkd.getDeviceQueue(device, queueFamilyIndex, queueIndex, &queue);
-	return queue;
-}
-
-vk::Move<vk::VkSemaphore> createSemaphore (const vk::DeviceInterface&	vkd,
-										   vk::VkDevice					device)
-{
-	const vk::VkSemaphoreCreateInfo createInfo =
-	{
-		vk::VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO,
-		DE_NULL,
-		0u
-	};
-	return vk::createSemaphore(vkd, device, &createInfo);
-}
-
 void initSemaphores (const vk::DeviceInterface&		vkd,
 					 vk::VkDevice					device,
 					 std::vector<vk::VkSemaphore>&	semaphores)
@@ -253,18 +234,6 @@
 	}

 	semaphores.clear();
-}
-
-vk::Move<vk::VkFence> createFence (const vk::DeviceInterface&	vkd,
-								   vk::VkDevice					device)
-{
-	const vk::VkFenceCreateInfo createInfo =
-	{
-		vk::VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
-		DE_NULL,
-		0u
-	};
-	return vk::createFence(vkd, device, &createInfo);
 }

 void initFences (const vk::DeviceInterface&	vkd,


cleanall now cleans all

cleanall now cleans all

--- src/busy/commands/cleanAll.cpp
+++ src/busy/commands/cleanAll.cpp
@@ -12,20 +12,7 @@
 void cleanAll() {
 	utils::rm("./build", true);
 	utils::mkdir("./build");
-
-	//!TODO reset lastCompileTime
-
-	auto dirs = utils::listDirs(".busy", true);
-	for (auto d : dirs) {
-		utils::rm(".busy/" + d, true);
-	}
-
-	auto files = utils::listFiles(".busy", false);
-	for (auto f : files) {
-		if (f != "workspace.bin") {
-			utils::rm(".busy/" + f, false);
-		}
-	}
+	utils::rm(".busy", true, true);
 	std::cout << "clean all done" << std::endl;