ENH: Remove redundant code in MakeDataSuitable().

--- Rendering/vtkOpenGLImageActor.cxx
+++ Rendering/vtkOpenGLImageActor.cxx
@@ -81,7 +81,6 @@
                                                      int &release,
                                                      int &reuseTexture)
 {
-  int contiguous = 0;
   int numComp = this->Input->GetNumberOfScalarComponents();

   // the texture can only be reused under certain circumstances
@@ -125,61 +124,6 @@
   this->Coords[10] =
     this->ComputedDisplayExtent[2 + (ydim == 1)]*spacing[1] + origin[1];
   this->Coords[11] = this->ComputedDisplayExtent[5]*spacing[2] + origin[2];
-
-  // now contiguous would require that xdim = 0 and ydim = 1
-  // OR xextent = 1 pixel and xdim = 1 and ydim = 2
-  // OR xdim = 0 and ydim = 2 and yextent = i pixel. In addition
-  // the corresponding x display extents must match the
-  // extent of the data
-  int *ext = this->Input->GetExtent();
-
-  if ( ( xdim == 0 && ydim == 1 &&
-         this->ComputedDisplayExtent[0] == ext[0] &&
-         this->ComputedDisplayExtent[1] == ext[1] )||
-       ( ext[0] == ext[1] && xdim == 1 &&
-         this->ComputedDisplayExtent[2] == ext[2] &&
-         this->ComputedDisplayExtent[3] == ext[3] ) ||
-       ( ext[2] == ext[3] && xdim == 0 && ydim == 2 &&
-         this->ComputedDisplayExtent[0] == ext[0] &&
-         this->ComputedDisplayExtent[1] == ext[1] ) )
-    {
-    contiguous = 1;
-
-    // are the dimensions a power of two already?
-    if (xsizeImage > 0 && (xsizeImage & (xsizeImage-1)) == 0 &&
-        ysizeImage > 0 && (ysizeImage & (ysizeImage-1)) == 0)
-      {
-      // the image can be loaded directly
-      release = 0;
-      xsize = xsizeImage;
-      ysize = ysizeImage;
-
-      this->TCoords[0] = 0.5/xsize;
-      this->TCoords[1] = 0.5/ysize;
-      this->TCoords[2] = (xsize - 0.5)/xsize;
-      this->TCoords[3] = this->TCoords[1];
-      this->TCoords[4] = this->TCoords[2];
-      this->TCoords[5] = (ysize - 0.5)/ysize;
-      this->TCoords[6] = this->TCoords[0];
-      this->TCoords[7] = this->TCoords[5];
-
-#ifdef GL_VERSION_1_1
-      // if texture size hasn't changed, reuse old texture
-      if (xsize == this->TextureSize[0] &&
-          ysize == this->TextureSize[1] &&
-          numComp == this->TextureBytesPerPixel)
-        {
-        reuseTexture = 1;
-        }
-#endif
-
-      return static_cast<unsigned char *>(
-        this->Input->GetScalarPointerForExtent(this->ComputedDisplayExtent));
-      }
-    }
-
-  // if we made it here then we must copy the data and
-  // possibly pad its size to a power of two

   // find the target size of the texture
   int xsizeTexture = 1;
@@ -220,15 +164,36 @@
     }
 #endif

-  // if contiguous and texture size hasn't changed, don't copy or pad
-  if (reuseTexture && contiguous)
-    {
-    release = 0;
-    return static_cast<unsigned char *>(
-      this->Input->GetScalarPointerForExtent(this->ComputedDisplayExtent));
-    }
-
-  // allocate the memory
+  // if the image is already of the desired size
+  if (xsize == xsizeImage && ysize == ysizeImage)
+    {
+    // Check if the data needed for the texture is a contiguous region
+    // of the input data: this requires that xdim = 0 and ydim = 1
+    // OR xextent = 1 pixel and xdim = 1 and ydim = 2
+    // OR xdim = 0 and ydim = 2 and yextent = 1 pixel.
+    // In addition the corresponding x display extents must match the
+    // extent of the data
+    int *extent = this->Input->GetExtent();
+
+    if ( ( xdim == 0 && ydim == 1 &&
+           this->ComputedDisplayExtent[0] == extent[0] &&
+           this->ComputedDisplayExtent[1] == extent[1] )||
+         ( extent[0] == extent[1] && xdim == 1 &&
+           this->ComputedDisplayExtent[2] == extent[2] &&
+           this->ComputedDisplayExtent[3] == extent[3] ) ||
+         ( extent[2] == extent[3] && xdim == 0 && ydim == 2 &&
+           this->ComputedDisplayExtent[0] == extent[0] &&
+           this->ComputedDisplayExtent[1] == extent[1] ) )
+      {
+      // if contiguous, then use the input data as-is
+      release = 0;
+      return static_cast<unsigned char *>(
+        this->Input->GetScalarPointerForExtent(
+          this->ComputedDisplayExtent));
+      }
+    }
+
+  // could not directly use input data, so allocate a new array
   unsigned char *res = new unsigned char [ysize*xsize*numComp];
   release = 1;


ENH: Corrected a few typoes

ENH: Corrected a few typoes

--- Examples/IO/DicomSeriesReadPrintTags.cxx
+++ Examples/IO/DicomSeriesReadPrintTags.cxx
@@ -18,7 +18,7 @@
 //  Software Guide : BeginLatex
 //
 //  This example illustrates how to read a DICOM series into a volume
-//  and then save this volume in another file format.
+//  and then print most of the DICOM header information (binary field are skipped)
 //
 //  Software Guide : EndLatex

@@ -103,7 +103,8 @@
 //  Software Guide : EndLatex

-    std::string entryId = "Patient Name";
+    //std::string entryId = "Patient Name"; //DICOM 2002
+    std::string entryId = "Patient's Name"; //DICOM 2003
     itk::MetaDataObjectBase::ConstPointer  entry = dictionary[entryId];

     MetaDataStringType::ConstPointer entryvalue =


BUG: check against GL_MAX_TEXTURE_SIZE before doing proxy texture check - hopefully fix mac issue?

--- Rendering/vtkOpenGLImageActor.cxx
+++ Rendering/vtkOpenGLImageActor.cxx
@@ -26,8 +26,12 @@

 #include "vtkOpenGL.h"

+#ifndef GL_MAX_TEXTURE_SIZE
+#define GL_MAX_TEXTURE_SIZE 1024
+#endif
+
 #ifndef VTK_IMPLEMENT_MESA_CXX
-vtkCxxRevisionMacro(vtkOpenGLImageActor, "1.29");
+vtkCxxRevisionMacro(vtkOpenGLImageActor, "1.30");
 vtkStandardNewMacro(vtkOpenGLImageActor);
 #endif

@@ -462,12 +466,19 @@
   // the texture is too big
 #ifdef GL_VERSION_1_1

+  // Do a quick test to see if we are too large
+  if ( size[0] > GL_MAX_TEXTURE_SIZE ||
+       size[1] > GL_MAX_TEXTURE_SIZE )
+    {
+    return 0;
+    }
+
   // Test the texture to see if it fits in memory
   glTexImage2D( GL_PROXY_TEXTURE_2D, 0, GL_RGBA8,
                 size[0], size[1],
                 0, GL_RGBA, GL_UNSIGNED_BYTE, (unsigned char *)NULL );

-  GLint params[1];
+  GLint params[1];
   glGetTexLevelParameteriv ( GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, params );

   // if it does, we will render it later. define the texture here


FIX (#3060): Readded accidently removed line of code.

--- Modules/Bundles/org.mitk.gui.qt.deformableregistration/src/internal/QmitkDeformableRegistrationView.cpp
+++ Modules/Bundles/org.mitk.gui.qt.deformableregistration/src/internal/QmitkDeformableRegistrationView.cpp
@@ -335,7 +335,7 @@
   cherry::ISelectionService* s = GetSite()->GetWorkbenchWindow()->GetSelectionService();
   if(s)
     s->RemovePostSelectionListener(m_SelListener);
-
+  m_SelListener = NULL;
 }

 void QmitkDeformableRegistrationView::Hidden()


Fixed cellular value/distance error

Fixed cellular value/distance error

--- FastNoiseSIMD/FastNoiseSIMD_internal.cpp
+++ FastNoiseSIMD/FastNoiseSIMD_internal.cpp
@@ -1611,7 +1611,7 @@
 				\
 				xd = SIMDf_MUL_ADD(xd, invMag, xcf);\
 				yd = SIMDf_MUL_ADD(yd, invMag, ycf);\
-				zd = SIMDf_MUL_ADD(zd, invMag, SIMDf_SUB(SIMDf_CONVERT_TO_FLOAT(zc), z));\
+				zd = SIMDf_MUL_ADD(zd, invMag, zcf);\
 				\
 				SIMDf newCellValue = SIMDf_MUL(SIMDf_NUM(hash2Float), SIMDf_CONVERT_TO_FLOAT(hash));\
 				SIMDf newDistance = distanceFunc##_DISTANCE(xd, yd, zd);\
@@ -1809,7 +1809,7 @@
 				\
 				xd = SIMDf_MUL_ADD(xd, invMag, xcf);\
 				yd = SIMDf_MUL_ADD(yd, invMag, ycf);\
-				zd = SIMDf_MUL_ADD(zd, invMag, SIMDf_SUB(SIMDf_CONVERT_TO_FLOAT(zc), z));\
+				zd = SIMDf_MUL_ADD(zd, invMag, zcf);\
 				\
 				SIMDf newDistance = distanceFunc##_DISTANCE(xd, yd, zd);\
 				\
@@ -1963,10 +1963,6 @@
 CELLULAR_LOOKUP_SINGLE(Manhattan)
 CELLULAR_LOOKUP_SINGLE(Natural)

-CELLULAR_DISTANCE2CAVE_SINGLE(Euclidean)
-CELLULAR_DISTANCE2CAVE_SINGLE(Manhattan)
-CELLULAR_DISTANCE2CAVE_SINGLE(Natural)
-
 #undef Natural_DISTANCE
 #define Natural_DISTANCE(_x, _y, _z) SIMDf_MUL(Euclidean_DISTANCE(_x,_y,_z), Manhattan_DISTANCE(_x,_y,_z))

@@ -1984,6 +1980,10 @@
 CELLULAR_DISTANCE2_MULTI(Distance2Sub)
 CELLULAR_DISTANCE2_MULTI(Distance2Div)
 CELLULAR_DISTANCE2_MULTI(Distance2Mul)
+
+CELLULAR_DISTANCE2CAVE_SINGLE(Euclidean)
+CELLULAR_DISTANCE2CAVE_SINGLE(Manhattan)
+CELLULAR_DISTANCE2CAVE_SINGLE(Natural)

 #define CELLULAR_MULTI(returnFunc)\
 switch(m_cellularDistanceFunction)\


comply with Firmware style requirements

comply with Firmware style requirements

--- matrix/SparseVector.hpp
+++ matrix/SparseVector.hpp
@@ -26,10 +26,13 @@
     static constexpr size_t _indices[N] {Idxs...};

     static constexpr bool duplicateIndices() {
-        for (size_t i = 0; i < N; i++)
-            for (size_t j = 0; j < i; j++)
-                if (_indices[i] == _indices[j])
+        for (size_t i = 0; i < N; i++) {
+            for (size_t j = 0; j < i; j++) {
+                if (_indices[i] == _indices[j]) {
                     return true;
+                }
+            }
+        }
         return false;
     }
     static constexpr size_t findMaxIndex() {
@@ -42,7 +45,7 @@
         return maxIndex;
     }

-    static_assert(duplicateIndices() == false, "Duplicate indices");
+    static_assert(!duplicateIndices(), "Duplicate indices");
     static_assert(N < M, "More entries than elements, use a dense vector");
     static_assert(N > 0, "A sparse vector needs at least one element");
     static_assert(findMaxIndex() < M, "Largest entry doesn't fit in sparse vector");


overly static

overly static

--- i18npool/source/transliteration/transliteration_commonclass.cxx
+++ i18npool/source/transliteration/transliteration_commonclass.cxx
@@ -130,7 +130,7 @@
 OUString SAL_CALL
 transliteration_commonclass::transliterateString2String( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount ) throw(RuntimeException)
 {
-    static Sequence < sal_Int32 > dummy_offset;
+    Sequence < sal_Int32 > dummy_offset;
     useOffset = sal_False;
     OUString tmpStr = transliterate(inStr, startPos, nCount, dummy_offset);
     useOffset = sal_True;


iox-#252 Fix port introspection test

iox-#252 Fix port introspection test

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

--- iceoryx_posh/test/moduletests/test_roudi_port_introspection.cpp
+++ iceoryx_posh/test/moduletests/test_roudi_port_introspection.cpp
@@ -28,6 +28,23 @@
 using iox::mepoo::TimePointNs;

 #include <cstdint>
+
+class MockPublisherPortUserIntrospection : public MockPublisherPortUser
+{
+  public:
+    using Topic = iox::roudi::PortIntrospectionFieldTopic;
+
+    MockPublisherPortUserIntrospection() = default;
+    MockPublisherPortUserIntrospection(iox::popo::PublisherPortData*){};
+
+    ChunkMock<Topic> m_chunk;
+
+    iox::cxx::expected<iox::mepoo::ChunkHeader*, iox::popo::AllocationError> tryAllocateChunk(const uint32_t)
+    {
+        return iox::cxx::success<iox::mepoo::ChunkHeader*>(m_chunk.chunkHeader());
+    }
+};
+
 template <typename PublisherPort, typename SubscriberPort>
 class PortIntrospectionAccess : public iox::roudi::PortIntrospection<PublisherPort, SubscriberPort>
 {
@@ -54,8 +71,6 @@
 {
   public:
     PortIntrospection_test()
-    // : m_introspectionAccess(
-    //     static_cast<PortIntrospectionAccess<MockPublisherPortUser, MockSubscriberPortUser>&>(*m_introspection))
     {
     }

@@ -130,7 +145,7 @@
     iox::popo::PublisherPortData m_publisherPortDataThroughput{m_serviceDescription, "Foo", &m_memoryManager};
     iox::popo::PublisherPortData m_publisherPortDataSubscriberData{m_serviceDescription, "Foo", &m_memoryManager};

-    PortIntrospectionAccess<MockPublisherPortUser, MockSubscriberPortUser> m_introspectionAccess;
+    PortIntrospectionAccess<MockPublisherPortUserIntrospection, MockSubscriberPortUser> m_introspectionAccess;
 };

@@ -140,8 +155,9 @@
     iox::popo::PublisherPortData m_publisherPortDataThroughput{m_serviceDescription, "Foo", &m_memoryManager};
     iox::popo::PublisherPortData m_publisherPortDataSubscriberData{m_serviceDescription, "Foo", &m_memoryManager};

-    auto introspection = std::unique_ptr<iox::roudi::PortIntrospection<MockPublisherPortUser, MockSubscriberPortUser>>(
-        new iox::roudi::PortIntrospection<MockPublisherPortUser, MockSubscriberPortUser>);
+    auto introspection =
+        std::unique_ptr<iox::roudi::PortIntrospection<MockPublisherPortUserIntrospection, MockSubscriberPortUser>>(
+            new iox::roudi::PortIntrospection<MockPublisherPortUserIntrospection, MockSubscriberPortUser>);

     EXPECT_THAT(introspection->registerPublisherPort(&m_publisherPortDataPortGeneric,
                                                      &m_publisherPortDataThroughput,
@@ -161,34 +177,28 @@

 TEST_F(PortIntrospection_test, sendPortData_EmptyList)
 {
-    using Topic = iox::roudi::PortIntrospectionFieldTopic;
-
-    auto chunk = std::unique_ptr<ChunkMock<Topic>>(new ChunkMock<Topic>);
-
-    EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), tryAllocateChunk(_))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk->chunkHeader()))));
     EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), sendChunk(_)).Times(1);

     m_introspectionAccess.sendPortData();

-    EXPECT_THAT(chunk->sample()->m_publisherList.size(), Eq(0));
-    EXPECT_THAT(chunk->sample()->m_subscriberList.size(), Eq(0));
+    EXPECT_THAT(m_introspectionAccess.getPublisherPort().value().m_chunk.sample()->m_publisherList.size(), Eq(0));
+    EXPECT_THAT(m_introspectionAccess.getPublisherPort().value().m_chunk.sample()->m_subscriberList.size(), Eq(0));
 }

 TEST_F(PortIntrospection_test, sendThroughputData_EmptyList)
 {
     /// @todo #252 re-add port throughput for v1.0?
-    using Topic = iox::roudi::PortThroughputIntrospectionFieldTopic;
-
-    auto chunk = std::unique_ptr<ChunkMock<Topic>>(new ChunkMock<Topic>);
-
-    EXPECT_CALL(m_introspectionAccess.getPublisherPortThroughput().value(), tryAllocateChunk(_))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk->chunkHeader()))));
-    EXPECT_CALL(m_introspectionAccess.getPublisherPortThroughput().value(), sendChunk(_)).Times(1);
-
-    m_introspectionAccess.sendThroughputData();
-    EXPECT_THAT(chunk->sample()->m_throughputList.size(), Eq(0));
+    // using Topic = iox::roudi::PortThroughputIntrospectionFieldTopic;
+
+    // auto chunk = std::unique_ptr<ChunkMock<Topic>>(new ChunkMock<Topic>);
+
+    // EXPECT_CALL(m_introspectionAccess.getPublisherPortThroughput().value(), tryAllocateChunk(_))
+    //     .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk->chunkHeader()))));
+    // EXPECT_CALL(m_introspectionAccess.getPublisherPortThroughput().value(), sendChunk(_)).Times(1);
+
+    // m_introspectionAccess.sendThroughputData();
+    // EXPECT_THAT(chunk->sample()->m_throughputList.size(), Eq(0));
 }

 TEST_F(PortIntrospection_test, sendData_OnePublisher)
@@ -207,7 +217,7 @@
     // auto portDataTopic = std::unique_ptr<PortDataChunk>(new PortDataChunk);
     // auto throughputTopic = std::unique_ptr<ThroughputChunk>(new ThroughputChunk);

-    // MockPublisherPortUser publisherPort;
+    // MockPublisherPortUserIntrospection publisherPort;
     // std::string publisherPortName("name");

     // PortData expectedPublisherPortData;
@@ -219,7 +229,7 @@
     // constexpr uint64_t ExpectedUniqueID{1337};
     // constexpr double NsPerSecond{1000000000.};
     // constexpr uint64_t durationNs{100000000};
-    // MockPublisherPortUser::Throughput expectedThroughput;
+    // MockPublisherPortUserIntrospection::Throughput expectedThroughput;
     // expectedThroughput.payloadSize = 73;
     // expectedThroughput.chunkSize = 128;
     // expectedThroughput.sequenceNumber = 13;
@@ -284,14 +294,7 @@

 TEST_F(PortIntrospection_test, addAndRemovePublisher)
 {
-    using Topic = iox::roudi::PortIntrospectionFieldTopic;
     using PortData = iox::roudi::PublisherPortData;
-
-    // auto chunk = std::unique_ptr<ChunkMock<Topic>>(new ChunkMock<Topic>);
-    auto chunk = new ChunkMock<Topic>;
-    auto chunk2 = chunk;
-    auto chunk3 = chunk;
-    auto chunk4 = chunk;

     iox::cxx::string<100> name1("name1");
     iox::cxx::string<100> name2("name2");
@@ -318,11 +321,6 @@
         expected2.m_caproServiceID, expected2.m_caproInstanceID, expected2.m_caproEventMethodID);

     EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), sendChunk(_)).Times(4);
-    EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), tryAllocateChunk(_))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk2->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk3->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk4->chunkHeader()))));

     // test adding of ports
     // remark: duplicate publisher port insertions are not possible
@@ -335,11 +333,11 @@

     m_introspectionAccess.sendPortData();

-    auto sample = chunk->sample();
-
-    {
-        ASSERT_THAT(chunk->sample()->m_publisherList.size(), Eq(2));
-        ASSERT_THAT(chunk->sample()->m_subscriberList.size(), Eq(0));
+    auto sample = m_introspectionAccess.getPublisherPort().value().m_chunk.sample();
+
+    {
+        ASSERT_THAT(m_introspectionAccess.getPublisherPort().value().m_chunk.sample()->m_publisherList.size(), Eq(2));
+        ASSERT_THAT(m_introspectionAccess.getPublisherPort().value().m_chunk.sample()->m_subscriberList.size(), Eq(0));

         auto& publisherInfo1 = sample->m_publisherList[0];
         auto& publisherInfo2 = sample->m_publisherList[1];
@@ -367,8 +365,8 @@
     m_introspectionAccess.sendPortData();

     {
-        ASSERT_THAT(chunk->sample()->m_publisherList.size(), Eq(1));
-        ASSERT_THAT(chunk->sample()->m_subscriberList.size(), Eq(0));
+        ASSERT_THAT(m_introspectionAccess.getPublisherPort().value().m_chunk.sample()->m_publisherList.size(), Eq(1));
+        ASSERT_THAT(m_introspectionAccess.getPublisherPort().value().m_chunk.sample()->m_subscriberList.size(), Eq(0));

         EXPECT_THAT(comparePortData(sample->m_publisherList[0], expected2), Eq(true));
     }
@@ -397,13 +395,7 @@

 TEST_F(PortIntrospection_test, addAndRemoveSubscriber)
 {
-    using Topic = iox::roudi::PortIntrospectionFieldTopic;
     using PortData = iox::roudi::SubscriberPortData;
-
-    auto chunk = new ChunkMock<Topic>;
-    auto chunk2 = chunk;
-    auto chunk3 = chunk;
-    auto chunk4 = chunk;

     iox::cxx::string<100> name1("name1");
     iox::cxx::string<100> name2("name2");
@@ -432,11 +424,6 @@
         expected2.m_caproServiceID, expected2.m_caproInstanceID, expected2.m_caproEventMethodID);

     EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), sendChunk(_)).Times(4);
-    EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), tryAllocateChunk(_))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk2->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk3->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk4->chunkHeader()))));

     // test adding of ports
     // remark: duplicate subscriber insertions are possible but will not be transmitted via send
@@ -451,7 +438,7 @@

     m_introspectionAccess.sendPortData();

-    auto sample = chunk->sample();
+    auto sample = m_introspectionAccess.getPublisherPort().value().m_chunk.sample();

     {
         ASSERT_THAT(sample->m_publisherList.size(), Eq(0));
@@ -516,20 +503,8 @@

 TEST_F(PortIntrospection_test, reportMessageToEstablishConnection)
 {
-    using Topic = iox::roudi::PortIntrospectionFieldTopic;
     using SubscriberPortData = iox::roudi::SubscriberPortData;
     using PublisherPortData = iox::roudi::PublisherPortData;
-
-    auto chunk = new ChunkMock<Topic>;
-    auto chunk1 = chunk;
-    auto chunk2 = chunk;
-    auto chunk3 = chunk;
-    auto chunk4 = chunk;
-    auto chunk5 = chunk;
-    auto chunk6 = chunk;
-    auto chunk7 = chunk;
-    auto chunk8 = chunk;
-    auto chunk9 = chunk;

     std::string nameSubscriber("subscriber");
     std::string namePublisher("publisher");
@@ -554,17 +529,6 @@
                                            expectedPublisher.m_caproEventMethodID);

     EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), sendChunk(_)).Times(10);
-    EXPECT_CALL(m_introspectionAccess.getPublisherPort().value(), tryAllocateChunk(_))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk1->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk2->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk3->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk4->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk5->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk6->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk7->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk8->chunkHeader()))))
-        .WillOnce(Return(ByMove(iox::cxx::success<iox::mepoo::ChunkHeader*>(chunk9->chunkHeader()))));

     // test adding of publisher or subscriber port of same service to establish a connection (requires same service id)
     iox::popo::SubscriberPortData recData1{
@@ -575,7 +539,7 @@

     m_introspectionAccess.sendPortData();

-    auto sample = chunk->sample();
+    auto sample = m_introspectionAccess.getPublisherPort().value().m_chunk.sample();

     {
         // expect unconnected publisher or subscriber (service is equal but m_publisherIndex == -1 in subscriber)


fix bugs of multiplication for integers

fix bugs of multiplication for integers


This test is a no-op in CMake - we need to fix that.

--- interpreter/cling/test/CodeUnloading/RunAgainstClangTestSuite.C
+++ interpreter/cling/test/CodeUnloading/RunAgainstClangTestSuite.C
@@ -1,5 +1,6 @@
 //RUN: make -C %testexecdir/../../clang/ test TESTSUITE=Sema CLANG=%p/clangTestUnloader.sh
-//XFAIL: *
+
+// FIXME: this test is a no-op in CMake :-(

 // Current SemaCXX failures:
 // Expected Passes    : 392


nvc0/ir: return 0 for gl_TessCoord.z for non-triangles modes

Signed-off-by: Ilia Mirkin <bcbbb7aa705ec3a5fc5824c01a845186c3d62fca@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <506e97eed81d9e59d22f4c73fb51123bb62b4a30@gmail.com>
Cc: "11.1 11.2" <59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org>

--- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -2264,6 +2264,10 @@
       y = dst;
    } else {
       assert(c == 2);
+      if (prog->driver->prop.tp.domain != PIPE_PRIM_TRIANGLES) {
+         bld.mkMov(dst, bld.loadImm(NULL, 0));
+         return;
+      }
       x = bld.getSSA();
       y = bld.getSSA();
    }


another complaint

another complaint

--- cpp/src/lib/rora_proxy_client.cc
+++ cpp/src/lib/rora_proxy_client.cc
@@ -34,6 +34,7 @@
       _asd_connection_pool_size(rora_config.asd_connection_pool_size) {
   ALBA_LOG(INFO, "RoraProxy_client(...)");
   ManifestCache::getInstance().set_capacity(rora_config.manifest_cache_size);
+  _fast_path_failures = 0;
   try {
     _has_local_fragment_cache = _delegate->has_local_fragment_cache();
   } catch (alba::proxy_client::proxy_exception &e) {


More fixes for import.

More fixes for import.

--- src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
+++ src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
@@ -659,7 +659,7 @@
   // Some compilers report reaching end of function even though all cases of
   // the enum are handed in the switch.
   GOOGLE_LOG(FATAL) << "Can't get here.";
-  return NULL;
+  return string();
 }

 ObjectiveCType GetObjectiveCType(FieldDescriptor::Type field_type) {
@@ -1052,13 +1052,13 @@
         line.ToString() + "'.";
     return false;
   }
-  StringPiece package(line, 0, offset);
-  StringPiece prefix(line, offset + 1, line.length() - offset - 1);
+  StringPiece package = line.substr(0, offset);
+  StringPiece prefix = line.substr(offset + 1);
   TrimWhitespace(&package);
   TrimWhitespace(&prefix);
   // Don't really worry about error checking the package/prefix for
   // being valid.  Assume the file is validated when it is created/edited.
-  (*prefix_map_)[package.ToString()] = prefix.ToString();
+  (*prefix_map_)[string(package)] = string(prefix);
   return true;
 }

@@ -1474,7 +1474,7 @@

 bool Parser::ParseChunk(StringPiece chunk) {
   if (!leftover_.empty()) {
-    chunk.AppendToString(&leftover_);
+    leftover_ += chunk;
     p_ = StringPiece(leftover_);
   } else {
     p_ = chunk;
@@ -1483,7 +1483,7 @@
   if (p_.empty()) {
     leftover_.clear();
   } else {
-    leftover_ = p_.ToString();
+    leftover_ = string(p_);
   }
   return result;
 }
@@ -1506,7 +1506,7 @@
   while (ReadLine(&p_, &line)) {
     ++line_;
     RemoveComment(&line);
-    StringPieceTrimWhitespace(&line);
+    TrimWhitespace(&line);
     if (line.size() == 0) {
       continue;  // Blank line.
     }
@@ -1698,7 +1698,7 @@
   }
   StringPiece framework_name(line, 0, offset);
   StringPiece proto_file_list(line, offset + 1, line.length() - offset - 1);
-  StringPieceTrimWhitespace(&framework_name);
+  TrimWhitespace(&framework_name);

   int start = 0;
   while (start < proto_file_list.length()) {
@@ -1708,24 +1708,24 @@
     }

     StringPiece proto_file(proto_file_list, start, offset - start);
-    StringPieceTrimWhitespace(&proto_file);
+    TrimWhitespace(&proto_file);
     if (proto_file.size() != 0) {
       std::map<string, string>::iterator existing_entry =
-          map_->find(proto_file.ToString());
+          map_->find(string(proto_file));
       if (existing_entry != map_->end()) {
         std::cerr << "warning: duplicate proto file reference, replacing framework entry for '"
-             << proto_file.ToString() << "' with '" << framework_name.ToString()
+             << string(proto_file) << "' with '" << string(framework_name)
              << "' (was '" << existing_entry->second << "')." << std::endl;
         std::cerr.flush();
       }

       if (proto_file.find(' ') != StringPiece::npos) {
         std::cerr << "note: framework mapping file had a proto file with a space in, hopefully that isn't a missing comma: '"
-             << proto_file.ToString() << "'" << std::endl;
+             << string(proto_file) << "'" << std::endl;
         std::cerr.flush();
       }

-      (*map_)[proto_file.ToString()] = framework_name.ToString();
+      (*map_)[string(proto_file)] = string(framework_name);
     }

     start = offset + 1;


PARQUET-846: CpuInfo::Init() is not thread safe

Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #230 from majetideepak/PARQUET-846 and squashes the following commits:

9007986 [Deepak Majeti] PARQUET-846: CpuInfo::Init() is not thread safe

Change-Id: I33bef39d6291dfe207bfc248cf7ce571f6308ad3

--- cpp/src/parquet/util/cpu-info.cc
+++ cpp/src/parquet/util/cpu-info.cc
@@ -34,6 +34,7 @@
 #include <cstdint>
 #include <fstream>
 #include <iostream>
+#include <mutex>
 #include <sstream>
 #include <string>

@@ -53,6 +54,7 @@
 int64_t CpuInfo::cycles_per_ms_;
 int CpuInfo::num_cores_ = 1;
 string CpuInfo::model_name_ = "unknown";  // NOLINT
+static std::mutex cpuinfo_mutex;

 static struct {
   string name;
@@ -76,6 +78,10 @@
 }

 void CpuInfo::Init() {
+  std::lock_guard<std::mutex> cpuinfo_lock(cpuinfo_mutex);
+
+  if (initialized()) { return; }
+
   string line;
   string name;
   string value;


parameters for walking were applied to the wrong matrix

--- NaoTHSoccer/Source/Motion/SensorFilter/IMUModel.cpp
+++ NaoTHSoccer/Source/Motion/SensorFilter/IMUModel.cpp
@@ -223,7 +223,7 @@
     Q_acc *= imuParameters.acceleration.stand.processNoiseAcc;

     Q_acc_walk.setIdentity();
-    Q_acc *= imuParameters.acceleration.walk.processNoiseAcc;
+    Q_acc_walk *= imuParameters.acceleration.walk.processNoiseAcc;

     // measurement covariance matrix
     R_acc.setIdentity();
@@ -239,8 +239,8 @@
     Q_rotation.block<3,3>(3,3) *= imuParameters.rotation.stand.processNoiseGyro;

     Q_rotation_walk.setIdentity();
-    Q_rotation.block<3,3>(0,0) *= imuParameters.rotation.walk.processNoiseRot;
-    Q_rotation.block<3,3>(3,3) *= imuParameters.rotation.walk.processNoiseGyro;
+    Q_rotation_walk.block<3,3>(0,0) *= imuParameters.rotation.walk.processNoiseRot;
+    Q_rotation_walk.block<3,3>(3,3) *= imuParameters.rotation.walk.processNoiseGyro;

     // measurement covariance matrix
     R_rotation.setIdentity();


INTEGRATION: CWS changefileheader (1.8.84); FILE MERGED 2008/04/01 15:18:51 thb 1.8.84.3: #i85898# Stripping all external header guards 2008/04/01 10:58:17 thb 1.8.84.2: #i85898# Stripping all external header guards 2008/03/28 15:35:38 rt 1.8.84.1: #i87441# Change license header to LPGL v3.

--- framework/source/uifactory/popupmenucontrollerfactory.cxx
+++ framework/source/uifactory/popupmenucontrollerfactory.cxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
- *
- *  $RCSfile: popupmenucontrollerfactory.cxx,v $
- *
- *  $Revision: 1.8 $
- *
- *  last change: $Author: hr $ $Date: 2007-11-01 17:49:55 $
- *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
- *
- *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: popupmenucontrollerfactory.cxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/

@@ -39,54 +34,24 @@
 //_________________________________________________________________________________________________________________
 //  my own includes
 //_________________________________________________________________________________________________________________
-
-#ifndef __FRAMEWORK_UIFACTORY_POPUPMENUCONTROLLERFACTORY_HXX_
 #include "uifactory/popupmenucontrollerfactory.hxx"
-#endif
-
-#ifndef __FRAMEWORK_THREADHELP_RESETABLEGUARD_HXX_
 #include <threadhelp/resetableguard.hxx>
-#endif
-
-#ifndef __FRAMEWORK_SERVICES_H_
 #include "services.h"
-#endif

 //_________________________________________________________________________________________________________________
 //  interface includes
 //_________________________________________________________________________________________________________________
-
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
 #include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
 #include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
 #include <com/sun/star/container/XNameAccess.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
 #include <com/sun/star/container/XNameContainer.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
 #include <com/sun/star/container/XContainer.hpp>
-#endif

 //_________________________________________________________________________________________________________________
 //  includes of other projects
 //_________________________________________________________________________________________________________________
-
-#ifndef _RTL_USTRBUF_HXX_
 #include <rtl/ustrbuf.hxx>
-#endif
-
-#ifndef _CPPUHELPER_WEAK_HXX_
 #include <cppuhelper/weak.hxx>
-#endif

 //_________________________________________________________________________________________________________________
 //  Defines


Start setting autodrop, which filters addl events (#351)

To further reduce falco's cpu usage, start setting the inspector in
"autodrop" mode with a sampling ratio of 1. When autodrop mode is
enabled, a second class of events (those having EF_ALWAYS_DROP in the
syscall table, or those syscalls that do not have specific handling in
the syscall table) are also excluded.

--- userspace/falco/falco.cpp
+++ userspace/falco/falco.cpp
@@ -574,6 +574,7 @@
 		if(!all_events)
 		{
 			inspector->set_drop_event_flags(EF_DROP_FALCO);
+			inspector->start_dropping_mode(1);
 		}

 		if (describe_all_rules)


Fix include order in vkSpirVProgram.hpp

Fix include order in vkSpirVProgram.hpp

--- external/vulkancts/framework/vulkan/vkSpirVProgram.hpp
+++ external/vulkancts/framework/vulkan/vkSpirVProgram.hpp
@@ -34,11 +34,11 @@
  * \brief SPIR-V program and binary info.
  *//*--------------------------------------------------------------------*/

+#include "vkDefs.hpp"
+#include "tcuTestLog.hpp"
+
 #include <string>
 #include <sstream>
-
-#include "vkDefs.hpp"
-#include "tcuTestLog.hpp"

 namespace vk
 {


Revert PLL unlock commits of 45102 and 46563

Change-Id: I27f7c75d73881a54152a77c7ab2c8b49be19adb7
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47148
Reviewed-by: Joachim Fenkes <c56b754bead9abd519c2e7d8d1ad462e33365b70@de.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Juan R. Medina <5724fa490ce1df1ec90a5e60a6a61702faf8d28b@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Reviewed-by: Gregory S. Still <4249770c9038596e9483266bcd48707ac69ee60b@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/lib/p9_common_poweronoff.H
+++ src/import/chips/p9/procedures/hwp/lib/p9_common_poweronoff.H
@@ -528,17 +528,6 @@
     FAPI_DBG("Assert vital thold via NET_CTRL0[16]");
     FAPI_TRY(putScom(i_target, NET_CTRL0_WOR[l_type], MASK_SET(16)));

-    if (l_type == 1)
-    {
-        // upon power off cache, dpll is about to be unlocked
-        // to prevent pcb fir fires, need to mask the bit for the time being
-        // the error will be cleared and unmasked when dpll is locked again
-        FAPI_DBG("Mask DPLL unlock error in FIR via SLAVE_CONFIG[12]");
-        FAPI_TRY(getScom(i_target, EQ_SLAVE_CONFIG_REG, l_data64));
-        l_data64.setBit<12>();
-        FAPI_TRY(putScom(i_target, EQ_SLAVE_CONFIG_REG, l_data64));//
-    }
-
     ///////////////////////////////////////////////////////////////////////////
     // Procedure code
     ///////////////////////////////////////////////////////////////////////////


avoid calling avr specific stuff in common dir

--- src/application/board/common/digital/input/DigitalIn.cpp
+++ src/application/board/common/digital/input/DigitalIn.cpp
@@ -55,18 +55,16 @@

 bool Board::digitalInputDataAvailable()
 {
-    if (dIn_count)
+    if (dIn_count >= DIGITAL_IN_BUFFER_SIZE)
     {
-        ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
-        {
-            if (++dIn_tail == DIGITAL_IN_BUFFER_SIZE)
-                dIn_tail = 0;
+        //ring buffer is full - this section is interrupt-safe currently
+        if (++dIn_tail == DIGITAL_IN_BUFFER_SIZE)
+            dIn_tail = 0;

-            for (int i=0; i<DIGITAL_IN_ARRAY_SIZE; i++)
-                digitalInBufferReadOnly[i] = digitalInBuffer[dIn_tail][i];
+        for (int i=0; i<DIGITAL_IN_ARRAY_SIZE; i++)
+            digitalInBufferReadOnly[i] = digitalInBuffer[dIn_tail][i];

-            dIn_count--;
-        }
+        dIn_count--;

         return true;
     }


CIconProvider: 300 icons container size limit; one map element lookup eliminated

--- file-commander-core/src/iconprovider/ciconprovider.cpp
+++ file-commander-core/src/iconprovider/ciconprovider.cpp
@@ -55,11 +55,19 @@
 		qCryptoHash.addData((const char*)qimage.constBits(), qimage.bytesPerLine() * qimage.height());
 		const auto result = qCryptoHash.result();
 		const qulonglong iconHash = *(qulonglong*)(result.data()) ^ *(qulonglong*)(result.data()+8);
+
 		if (_iconCache.count(iconHash) == 0)
+		{
+			if (_iconCache.size() > 300)
+			{
+				_iconCache.clear();
+				_iconForObject.clear();
+			}
 			_iconCache[iconHash] = icon;
+		}

 		_iconForObject[objectHash] = iconHash;
-		return _iconCache[iconHash];
+		return icon;
 	}

 	return _iconCache[_iconForObject[objectHash]];


JavascriptRootObjectWrapper - Log error when trying to bind sync object when IBrowserProcess is null

--- CefSharp.BrowserSubprocess.Core/JavascriptRootObjectWrapper.cpp
+++ CefSharp.BrowserSubprocess.Core/JavascriptRootObjectWrapper.cpp
@@ -30,6 +30,13 @@
                 }
                 else
                 {
+                    if (_browserProcess == nullptr)
+                    {
+                        LOG(ERROR) << StringUtils::ToNative("IBrowserProcess is null, unable to bind object " + obj->JavascriptName).ToString();
+
+                        continue;
+                    }
+
                     auto wrapperObject = gcnew JavascriptObjectWrapper(_browserProcess);
                     wrapperObject->Bind(obj, v8Value, _callbackRegistry);


csv output

csv output

--- frontend/services/profiling_service/Profiling_Service.cpp
+++ frontend/services/profiling_service/Profiling_Service.cpp
@@ -83,10 +83,10 @@
         }});

-    callbacks.add<frontend_resources::LuaCallbacksCollection::StringResult, std::string, std::string, int>("mmProfile",
-        "(string entrypoint, string cameras, unsigned int num_frames)",
-        {[&graph, &render_next_frame](std::string entrypoint, std::string cameras,
-             int num_frames) -> frontend_resources::LuaCallbacksCollection::StringResult {
+    callbacks.add<frontend_resources::LuaCallbacksCollection::StringResult, std::string, std::string, int, bool>(
+        "mmProfile", "(string entrypoint, string cameras, unsigned int num_frames, bool pretty)",
+        {[&graph, &render_next_frame](std::string entrypoint, std::string cameras, int num_frames,
+             bool pretty) -> frontend_resources::LuaCallbacksCollection::StringResult {
             auto entry = graph.FindModule(entrypoint);
             if (!entry)
                 return frontend_resources::LuaCallbacksCollection::Error{"could not find entrypoint"};
@@ -120,9 +120,15 @@
             auto const time_per_frame = static_cast<float>(time_in_ms) / static_cast<float>(tot_num_frames);

             std::stringstream sstr;
-            sstr << "Total Number of Frames: " << tot_num_frames
-                 << "; Elapsed Time (ms): " << std::chrono::duration_cast<std::chrono::milliseconds>(duration).count()
-                 << "; Time per Frame (ms): " << time_per_frame;
+            if (pretty) {
+                sstr << "Total Number of Frames: " << tot_num_frames << "; Elapsed Time (ms): "
+                     << std::chrono::duration_cast<std::chrono::milliseconds>(duration).count()
+                     << "; Time per Frame (ms): " << time_per_frame;
+            } else {
+                sstr << tot_num_frames << ", "
+                     << std::chrono::duration_cast<std::chrono::milliseconds>(duration).count() << ", "
+                     << time_per_frame;
+            }

             return frontend_resources::LuaCallbacksCollection::StringResult{sstr.str()};
         }});


fixed most crashes with delete/backspace

--- ride/driver.cc
+++ ride/driver.cc
@@ -595,8 +595,12 @@
             cursor_from = cursor_to = StepCursor(cursor_from, C(ch.length()));
         }

-        void Delete(int at)
-        {
+        void Delete(int pos)
+        {
+            if(pos == 0) { return; }
+            const auto at = pos - 1;
+            if(text.length() == 0) { return; }
+            assert(at < C(text.length()));
             text.erase(text.begin() + at);
         }


Disable DownloadsApiTest BUG=101170

Disable DownloadsApiTest
BUG=101170

Review URL: http://codereview.chromium.org/9420029

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@122406 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/download/download_extension_apitest.cc
+++ chrome/browser/download/download_extension_apitest.cc
@@ -27,7 +27,7 @@
 };

 // http://crbug.com/101170
-IN_PROC_BROWSER_TEST_F(DownloadsApiTest, FAILS_DownloadsApiTest) {
+IN_PROC_BROWSER_TEST_F(DownloadsApiTest, DISABLED_DownloadsApiTest) {
   SetUpTempDownloadsDir();
   ASSERT_TRUE(StartTestServer());
   ASSERT_TRUE(RunExtensionTest("downloads")) << message_;


sync: remove a test expectation that is actually dumb.
I added it. Yay me.

(It is dumb because it puts a sub 20 millisecond upper bound on certain operations involving posting tasks across threads.)

TBR=akalin

BUG=26339
TEST=SyncerThread2Test

Review URL: http://codereview.chromium.org/6296023

git-svn-id: http://src.chromium.org/svn/trunk/src@72716 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 63250b747ba74c94f49df098a607a960a10e511c

--- chrome/browser/sync/engine/syncer_thread2_unittest.cc
+++ chrome/browser/sync/engine/syncer_thread2_unittest.cc
@@ -88,7 +88,6 @@
       SCOPED_TRACE(testing::Message() << "SyncShare # (" << i << ")");
       TimeTicks optimal_next_sync = optimal_start + poll_interval * i;
       EXPECT_GE(data[i], optimal_next_sync);
-      EXPECT_LE(data[i], optimal_next_sync + poll_interval);
       EXPECT_EQ(GetUpdatesCallerInfo::PERIODIC,
                 records.snapshots[i]->source.first);
     }
@@ -510,7 +509,6 @@
     SCOPED_TRACE(testing::Message() << "SyncShare # (" << i << ")");
     TimeTicks optimal_next_sync = optimal_start + poll * i;
     EXPECT_GE(r.times[i], optimal_next_sync);
-    EXPECT_LE(r.times[i], optimal_next_sync + poll);
     EXPECT_EQ(i == 0 ? GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION
                      : GetUpdatesCallerInfo::PERIODIC,
               r.snapshots[i]->source.first);


End preliminary work on porting to N-API

--- src/crc32c.cpp
+++ src/crc32c.cpp
@@ -209,11 +209,11 @@
     } else {
         std::string strInput = info[1].As<Napi::String>().Utf8Value();

-        /*if (useHardwareCrc) {
-            crc = hwCrc32c(initCrc, (const char *)(*strInput.Utf8Value()), (size_t)strInput.Utf8Length());
+        if (useHardwareCrc) {
+            crc = hwCrc32c(initCrc, (const char *)strInput.c_str(), (size_t)strInput.length());
         } else {
-            crc = swCrc32c(initCrc, (const char *)(*strInput.Utf8Value()), (size_t)strInput.Utf8Length());
-        }*/
+            crc = swCrc32c(initCrc, (const char *)strInput.c_str(), (size_t)strInput.length());
+        }
     }

     // Calculate the 32-bit CRC


INTEGRATION: CWS ooo19126 (1.3.26); FILE MERGED 2005/09/05 17:09:49 rt 1.3.26.1: #i54170# Change license header: remove SISSL

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


Don't report cl_khr_il_program when using clspv online building

Signed-off-by: Kévin Petit <7be082ac62c87f3fb90b426eef925ff08291362b@free.fr>

--- src/device.cpp
+++ src/device.cpp
@@ -159,7 +159,9 @@
                    "cl_khr_byte_addressable_store ";

     // Add always supported extension
+#ifndef CLSPV_ONLINE_COMPILER
     m_extensions += "cl_khr_il_program ";
+#endif
 }

 bool cvk_device::create_vulkan_queues_and_device(uint32_t num_queues,


Change `assert(false && "...")` to `LOG(FATAL) << "...";`.

PiperOrigin-RevId: 420301547
Change-Id: I0053ff0934b8827acf9c2680c8663aad460d66f6

--- tensorflow/compiler/xla/service/gpu/gpu_executable.cc
+++ tensorflow/compiler/xla/service/gpu/gpu_executable.cc
@@ -98,7 +98,7 @@
 #if BEF_EXECUTABLE
   tfrt::AlignedFree(ptr);
 #else
-  assert(false && "OwnedBefBuffer only supported with BEF_EXECUTABLE");
+  LOG(FATAL) << "OwnedBefBuffer only supported with BEF_EXECUTABLE";
 #endif
 }

@@ -107,7 +107,7 @@
 #if BEF_EXECUTABLE
   delete factory;
 #else
-  assert(false && "GpuContextCache only supported with BEF_EXECUTABLE");
+  LOG(FATAL) << "GpuContextCache only supported with BEF_EXECUTABLE";
 #endif
 }


Added support for reading 1-bit BMP files. Also fixed calculation of number of padding bytes in 4-bit images.

--- src/df_bmp.cpp
+++ src/df_bmp.cpp
@@ -123,7 +123,34 @@
 }

-// Support function for reading the 4 bit bitmap file format.
+static void SkipPadding(FILE *f, int width, int pixels_per_byte)
+{
+    // Skip any padding until we've read a multiple of 4 bytes.
+    int num_bytes = (width + pixels_per_byte - 1) / pixels_per_byte;
+    while (num_bytes & 3)
+    {
+        ReadU8(f);
+        num_bytes++;
+    }
+}
+
+
+static void Read1BitLine(DfBitmap *bitmap, int length, FILE *f, DfColour pal[256], int y)
+{
+    for (int x = 0; x < length; x += 8)
+    {
+        uint8_t i = ReadU8(f);
+        for (int j = 0; j < 8; j++) {
+            int idx = (i >> 7) & 1;
+            PutPix(bitmap, x + j, y, pal[idx]);
+            i <<= 1;
+        }
+    }
+
+    SkipPadding(f, length, 8);
+}
+
+
 static void Read4BitLine(DfBitmap *bitmap, int length, FILE *f, DfColour pal[256], int y)
 {
 	for (int x = 0; x < length; x += 2)
@@ -134,10 +161,11 @@
 		PutPix(bitmap, x+1, y, pal[idx1]);
 		PutPix(bitmap, x, y, pal[idx2]);
 	}
-}
-
-
-// Support function for reading the 8 bit bitmap file format.
+
+    SkipPadding(f, length, 2);
+}
+
+
 static void Read8BitLine(DfBitmap *bitmap, int length, FILE *f, DfColour pal[256], int y)
 {
 	for (int x = 0; x < length; ++x)
@@ -146,16 +174,10 @@
 		PutPix(bitmap, x, y, pal[i]);
 	}

-    // Skip any padding until we've read a multiple of 4 bytes.
-    while (length & 3)
-    {
-        ReadU8(f);
-        length++;
-    }
-}
-
-
-// Support function for reading the 24 bit bitmap file format
+    SkipPadding(f, length, 1);
+}
+
+
 static void Read24BitLine(DfBitmap *bitmap, int length, FILE *f, int y)
 {
 	DfColour c;
@@ -208,6 +230,9 @@
         int y = bitmap->height - i - 1;
         switch (infoheader.bitCount)
         {
+        case 1:
+            Read1BitLine(bitmap, infoheader.width, f, palette, y);
+            break;
         case 4:
             Read4BitLine(bitmap, infoheader.width, f, palette, y);
             break;


Fixes leak when no OCSP URL is available

--- iocore/net/OCSPStapling.cc
+++ iocore/net/OCSPStapling.cc
@@ -185,6 +185,9 @@
   }

   if (!cinf->uri) {
+    OCSP_CERTID_free(cinf->cid);
+    cinf->cid = nullptr;
+
     Note("no OCSP responder URI for %s", certname);
     return false;
   }


INTEGRATION: CWS aquavcl05_DEV300 (1.6.22); FILE MERGED 2008/02/19 10:57:06 pl 1.6.22.1: #i85195# report potential problems during PDF export

--- vcl/inc/vcl/pdfwriter.hxx
+++ vcl/inc/vcl/pdfwriter.hxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: pdfwriter.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.7 $
  *
- *  last change: $Author: vg $ $Date: 2008-01-29 08:22:15 $
+ *  last change: $Author: kz $ $Date: 2008-03-05 17:04:34 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -35,37 +35,22 @@
 #ifndef _VCL_PDFWRITER_HXX
 #define _VCL_PDFWRITER_HXX

-#ifndef _SAL_TYPES_H
 #include <sal/types.h>
-#endif
-#ifndef _TL_GEN_HXX
+
 #include <tools/gen.hxx>
-#endif
-#ifndef _VCL_DLLAPI_H
+#include <tools/string.hxx>
+#include <tools/color.hxx>
+
 #include <vcl/dllapi.h>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
+#include <vcl/vclenum.hxx>
+#include <vcl/font.hxx>
+#include <vcl/graphictools.hxx>
+
 #include <com/sun/star/io/XOutputStream.hpp>
-#endif
-
-#ifndef _VCL_VCLENUM_HXX
-#include <vcl/vclenum.hxx>
-#endif
-#ifndef _SV_FONT_HXX
-#include <vcl/font.hxx>
-#endif
-#ifndef _VCL_GRAPHICTOOLS_HXX_
-#include <vcl/graphictools.hxx>
-#endif
-#ifndef _STRING_HXX
-#include <tools/string.hxx>
-#endif
-#ifndef _TOOLS_COLOR_HXX
-#include <tools/color.hxx>
-#endif

 #include <list>
 #include <vector>
+#include <set>

 class Font;
 class Point;
@@ -230,6 +215,21 @@
         // PushButton, RadioButton, CheckBox; Down means selected for
         // RadioButton and CheckBox
         Up, Down
+    };
+
+    enum ErrorCode
+    {
+        // transparent object occurred and was draw opaque because
+        // PDF/A does not allow transparency
+        Warning_Transparency_Omitted_PDFA,
+
+        // transparent object occured but is only supported since
+        // PDF 1.4
+        Warning_Transparency_Omitted_PDF13,
+
+        // a form action was exported that is not suitable for PDF/A
+        // the action was skipped
+        Warning_FormAction_Omitted_PDFA
     };

     struct VCL_DLLPUBLIC AnyWidget
@@ -656,6 +656,13 @@
     /* finishes the file */
     bool Emit();

+    /*
+     * Get a list of errors that occured during processing
+     * this should enable the producer to give feedback about
+     * any anomalies that might have occured
+     */
+    std::set< ErrorCode > GetErrors();
+
     PDFVersion GetVersion() const;

     /* functions for graphics state */


Load client key event if only the certificate file is specified.

--- iocore/net/SSLSNIConfig.cc
+++ iocore/net/SSLSNIConfig.cc
@@ -84,9 +84,13 @@
     // set the next hop properties
     SSLConfig::scoped_config params;
     auto clientCTX = params->getClientSSL_CTX();
-    if (!item.client_cert.empty() && !item.client_key.empty()) {
+    // Load if we have at least specified the client certificate
+    if (!item.client_cert.empty()) {
       std::string certFilePath = Layout::get()->relative_to(params->clientCertPathOnly, item.client_cert.data());
-      std::string keyFilePath  = Layout::get()->relative_to(params->clientKeyPathOnly, item.client_key.data());
+      std::string keyFilePath;
+      if (!item.client_key.empty()) {
+        keyFilePath = Layout::get()->relative_to(params->clientKeyPathOnly, item.client_key.data());
+      }
       clientCTX = params->getCTX(certFilePath.c_str(), keyFilePath.c_str(), params->clientCACertFilename, params->clientCACertPath);
     }


INTEGRATION: CWS odbmacros2 (1.27.74); FILE MERGED 2008/01/16 16:08:36 fs 1.27.74.1: during #i49133#: don't assert the missing WB_IGNORETAB on multi line edits, if they're read-only (in this case tab works fine in them)

--- vcl/source/app/dbggui.cxx
+++ vcl/source/app/dbggui.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbggui.cxx,v $
  *
- *  $Revision: 1.27 $
+ *  $Revision: 1.28 $
  *
- *  last change: $Author: ihi $ $Date: 2007-11-21 16:36:52 $
+ *  last change: $Author: kz $ $Date: 2008-03-06 19:10:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1672,8 +1672,12 @@

             if ( pChild->GetType() == WINDOW_MULTILINEEDIT )
             {
-                if ( !(pChild->GetStyle() & WB_IGNORETAB) )
-                    DbgError( "MultiLineEdits in Dialogs should have the Style WB_IGNORETAB" );
+                if  (   ( 0 == ( pChild->GetStyle() & WB_IGNORETAB ) )
+                    &&  ( 0 == ( pChild->GetStyle() & WB_READONLY ) )
+                    )
+                {
+                    DbgError( "editable MultiLineEdits in Dialogs should have the Style WB_IGNORETAB" );
+                }
             }

             if ( (pChild->GetType() == WINDOW_RADIOBUTTON) ||


Metal: More information on graph processing.

PiperOrigin-RevId: 256247206

--- tensorflow/lite/delegates/gpu/metal/compiled_model.cc
+++ tensorflow/lite/delegates/gpu/metal/compiled_model.cc
@@ -573,7 +573,14 @@
       GetMissingOutputBufferIds(output_buffers, sorted_chains);
   info.gpu_tasks_count = static_cast<int>(sorted_chains.size());
   if (sorted_chains.empty()) {
-    return InternalError("Empty chains");
+    const std::string message =
+        "No valid operations in the graph.\nInput operations count " +
+        std::to_string(info.operations_count) + "\nUnused operations " +
+        std::to_string(info.unused_operations.size()) + "\nUnused inputs " +
+        std::to_string(info.unused_input_buffer_ids.size()) +
+        "\nMissing output buffers " +
+        std::to_string(info.missing_output_buffer_ids.size());
+    return InternalError(message);
   }
   for (const auto& chain : sorted_chains) output->push_back(FuseChain(chain));
   return OkStatus();


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

--- vcl/source/gdi/cvtgrf.cxx
+++ vcl/source/gdi/cvtgrf.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: cvtgrf.cxx,v $
  *
- *  $Revision: 1.5 $
+ *  $Revision: 1.6 $
  *
- *  last change: $Author: rt $ $Date: 2005-09-09 11:56:14 $
+ *  last change: $Author: obo $ $Date: 2006-09-17 11:59:14 $
  *
  *  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_vcl.hxx"

 #ifndef _SV_SVSYS_HXX
 #include <svsys.h>


deactivate print job after error

deactivate print job after error


Code cleanup : Use pre calculated field of view tangent value.

--- viewport/glc_viewport.cpp
+++ viewport/glc_viewport.cpp
@@ -545,7 +545,7 @@
 	double cameraCover= box.boundingSphereRadius() * 2.0;

 	// Compute Camera distance
-	const double distance = cameraCover / (2.0 * tan((m_dFov * PI / 180.0) / 2.0));
+	const double distance = cameraCover / m_ViewTangent;

 	// Update Camera position
 	m_pViewCam->setDistEyeTarget(distance);


git-svn-id: svn://cybergarage.org:3960/project/sqlengine/trunk@3875 b45aa7d4-fa09-0410-9ebe-fd257a136781

--- examples/common/SQLProxy.cpp
+++ examples/common/SQLProxy.cpp
@@ -54,12 +54,6 @@

 bool uSQL::SQLProxy::getStatementKey(SQLStatement *stmt, std::string &key, SQLError &error)
 {
-    SQLCommand *sqlCmd = stmt->getCommandNode();
-    if (!sqlCmd) {
-        error.setMessage("COMMAND section was not found");
-        return false;
-    }
-
     SQLFrom *sqlFrom = stmt->getFromNode();
     if (!sqlFrom) {
         error.setMessage("FROM section was not found");


Added missing 'port' option to filserver example.

--- examples/fileserver/main.cpp
+++ examples/fileserver/main.cpp
@@ -49,6 +49,7 @@
         "port",
         "8000"
     );
+    parser.addOption(portOption);
     QCommandLineOption dirOption(
         QStringList() << "d" << "directory",
         "directory to serve",


reworked argument handling (will run out of GPU memory in current implementation)

--- examples/gemm_batch/demo.cpp
+++ examples/gemm_batch/demo.cpp
@@ -16,7 +16,8 @@
     #endif

 #define REAL float
-#define STEPS 100
+#define STEPS 1000
+#define MAX_MEM 900000000

 class referenceGemm : public ktt::ReferenceClass
 {
@@ -94,6 +95,7 @@
         std::vector<ktt::ParameterPair> parameterValues = getCurrentConfiguration();
         size_t gran = getParameterValue("GRANULARITY", parameterValues);
         size_t myBatch = batch / getParameterValue("MGCG_GROUP_SIZE_Y", parameterValues);
+        std::cout << "batch: " << batch << std::endl;
         if (gran == 1) {
             globalSize.setSizeX(myBatch/getParameterValue("GROUP_SIZE_X", parameterValues));
             localSize.setSizeX(getParameterValue("GROUP_SIZE_X", parameterValues));
@@ -185,26 +187,6 @@
         }
     }

-    // Declare and initialize data (m, n > 1)
-    unsigned int a = 32;
-    unsigned int b = 32;
-    unsigned int c = 32;
-    int batch = 1024*128;
-
-    std::vector<REAL> srcA(a*b*batch, 0.0f);
-    std::vector<REAL> srcB(c*a*batch, 0.0f);
-    std::vector<REAL> dst(c*b*batch, 0.0f);
-
-    // fill with random data
-    for (size_t i = 0; i < a*b*batch; i++)
-    {
-        srcA[i] = 10.0f*((REAL)rand()) / ((REAL) RAND_MAX);
-    }
-    for (size_t i = 0; i < c*a*batch; i++)
-    {
-        srcB[i] = 10.0f*((REAL)rand()) / ((REAL) RAND_MAX);
-    }
-
     int interface = 0;
     std::cout << "Which interface to use (0 = CUDA, 1 = OpenCL)? ";
     std::cin >> interface;
@@ -220,23 +202,42 @@
         kernelFile = KTT_CU_KERNEL_FILE;
     }
     tuner->setGlobalSizeType(ktt::GlobalSizeType::CUDA);
-    //tuner->setLoggingTarget(std::string("/dev/null"));
-
-    // create input/output
-    ktt::ArgumentId srcAId = tuner->addArgumentVector(srcA, ktt::ArgumentAccessType::ReadOnly);
-    ktt::ArgumentId srcBId = tuner->addArgumentVector(srcB, ktt::ArgumentAccessType::ReadOnly);
-    ktt::ArgumentId dstId = tuner->addArgumentVector(dst, ktt::ArgumentAccessType::WriteOnly);
-    ktt::ArgumentId nId = tuner->addArgumentScalar(batch);
+    tuner->setLoggingTarget(std::string("/dev/null"));

     // tune kernels for different sizes
     for (int i = 0; i < 10; i++) {
-        a = (long long)(rand())*32 / RAND_MAX;
-        b = (long long)(rand())*32 / RAND_MAX;
-        c = (long long)(rand())*32 / RAND_MAX;
-        std::cout << "Tuning for matrices of size "
+        // generate input size
+        int a = 2+(long long)(rand())*31 / RAND_MAX;
+        int b = 2+(long long)(rand())*31 / RAND_MAX;
+        int c = 2+(long long)(rand())*31 / RAND_MAX;
+        int batch = ((MAX_MEM/(sizeof(REAL)*(a*b+c*a+c*b)))/512)*512;
+
+        std::cout << "Tuning for matrices of size "
             << a << "x" << b << ", "
             << c << "x" << a << ", "
-            << c << "x" << b << std::endl;
+            << c << "x" << b << ", "
+            << "batch size " << batch << std::endl;
+
+        // create data in host memory
+        std::vector<REAL> srcA(a*b*batch, 0.0f);
+        std::vector<REAL> srcB(c*a*batch, 0.0f);
+        std::vector<REAL> dst(c*b*batch, 0.0f);
+
+        // fill with random values
+        for (size_t i = 0; i < a*b*batch; i++)
+            srcA[i] = 10.0f*((REAL)rand()) / ((REAL) RAND_MAX);
+        for (size_t i = 0; i < c*a*batch; i++)
+            srcB[i] = 10.0f*((REAL)rand()) / ((REAL) RAND_MAX);
+
+        // create input/output
+        ktt::ArgumentId srcAId = tuner->addArgumentVector(srcA, ktt::ArgumentAccessType::ReadOnly, ktt::ArgumentMemoryLocation::Device, false);
+        tuner->persistArgument(srcAId, true);
+        ktt::ArgumentId srcBId = tuner->addArgumentVector(srcB, ktt::ArgumentAccessType::ReadOnly, ktt::ArgumentMemoryLocation::Device, false);
+        tuner->persistArgument(srcBId, true);
+        ktt::ArgumentId dstId = tuner->addArgumentVector(dst, ktt::ArgumentAccessType::WriteOnly, ktt::ArgumentMemoryLocation::Device, false);
+        tuner->persistArgument(dstId, true);
+        ktt::ArgumentId nId = tuner->addArgumentScalar(batch);
+
         tuneKernel(tuner, kernelFile, srcAId, srcBId, dstId, nId, a, b, c, batch);
     }


Fix example program documentation

Fix example program documentation

--- examples/c++/blink/main.cc
+++ examples/c++/blink/main.cc
@@ -117,7 +117,7 @@
 /**
  * \brief Convert a period in milliseconds to a number of clock ticks.
  *
- * \param[in] The period, in milliseconds to convert.
+ * \param[in] ms The period, in milliseconds, to convert.
  *
  * \return The number of clock ticks in period.
  */


Maemo and Harmattan compilation fix

Maemo and Harmattan compilation fix

--- api/NwReqTracker.cpp
+++ api/NwReqTracker.cpp
@@ -650,6 +650,7 @@
         return "QNetworkReply::SslHandshakeFailedError";
     case QNetworkReply::TemporaryNetworkFailureError:
         return "QNetworkReply::TemporaryNetworkFailureError";
+#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
     case QNetworkReply::NetworkSessionFailedError:
         return "QNetworkReply::NetworkSessionFailedError";
     case QNetworkReply::BackgroundRequestNotAllowedError:
@@ -704,6 +705,7 @@
         return "QNetworkReply::ProtocolFailure";
     case QNetworkReply::UnknownServerError:
         return "QNetworkReply::UnknownServerError";
+#endif
     default:
         return "QNetworkReply::??????";
     }


config moved to construction

config moved to construction

--- examples/cpp/cmdclient.cpp
+++ examples/cpp/cmdclient.cpp
@@ -13,7 +13,7 @@
   int nMessage = boost::lexical_cast<int>(argv[1]);
   int nSample  = boost::lexical_cast<int>(argv[2]);

-  urpc::Client client;
+  urpc::Client client ("tcp://127.0.0.1:5555");
   randexample::Request request;
   randexample::Reply reply;


GetIndex-1 will correspond to Log2(mask)

--- STEER/STEER/AliReconstruction.cxx
+++ STEER/STEER/AliReconstruction.cxx
@@ -4881,7 +4881,7 @@
     for( Int_t iclass=0; iclass < nclasses; iclass++ ) {
       AliTriggerClass* trclass = (AliTriggerClass*)classesArray.At(iclass);
       if (!trclass) continue;
-      int trindex = trclass->GetIndex();
+      int trindex = trclass->GetIndex()-1;
       fRawReader->LoadTriggerClass(trclass->GetName(),trindex);
     }
     //


Don't clear optimization script when closing dialog

--- HopsanGUI/Dialogs/OptimizationDialog.cpp
+++ HopsanGUI/Dialogs/OptimizationDialog.cpp
@@ -853,8 +853,6 @@
     mpParameterMaxLineEdits.clear();
     mpParameterRemoveButtons.clear();

-    mScript.clear();
-    mpOutputBox->clear();
     //mpRunButton->setDisabled(true);

     loadConfiguration();


Error out when kernel function is not found while translating GPU calls.

PiperOrigin-RevId: 269327909

--- third_party/mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
+++ third_party/mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
@@ -310,6 +310,10 @@
   // represents the cubin at runtime.
   // TODO(herhut): This should rather be a static global once supported.
   auto kernelFunction = getModule().lookupSymbol<FuncOp>(launchOp.kernel());
+  if (!kernelFunction) {
+    launchOp.emitError("missing kernel function ") << launchOp.kernel();
+    return signalPassFailure();
+  }
   auto cubinGetter =
       kernelFunction.getAttrOfType<SymbolRefAttr>(kCubinGetterAnnotation);
   if (!cubinGetter) {


update joint birateral fiilter test

update joint birateral fiilter test

--- OpenCP/birateralFilter/jointBirateralFilterTest.cpp
+++ OpenCP/birateralFilter/jointBirateralFilterTest.cpp
@@ -10,7 +10,7 @@
 	namedWindow(wname);

 	int a=0;createTrackbar("a",wname,&a,100);
-	int sw = 0; createTrackbar("switch",wname,&sw, 1);
+	int sw = 1; createTrackbar("switch",wname,&sw, 2);
 	int r = 20; createTrackbar("r",wname,&r,200);
 	int space = 200; createTrackbar("space",wname,&space,2000);
 	int color = 300; createTrackbar("color",wname,&color,2550);
@@ -27,12 +27,17 @@

 		if(sw==0)
 		{
-			CalcTime t("birateral filter: opencv");
-			jointBilateralFilter(src, guide, dest, Size(d,d), sigma_color, sigma_space);
+			CalcTime t("birateral filter");
+			bilateralFilter(src, dest, Size(d,d), sigma_color, sigma_space);
 		}
 		if(sw==1)
 		{
-			CalcTime t("birateral filter: fastest opencp implimentation");
+			CalcTime t("joint birateral filter");
+			jointBilateralFilter(src, guide, dest, Size(d,d), sigma_color, sigma_space);
+		}
+		if(sw==2)
+		{
+			CalcTime t("invalid joiont");
 			jointBilateralFilter(guide, src, dest, Size(d,d), sigma_color, sigma_space);
 		}


Changed default settings

Changed default settings

--- PWG3/vertexingHF/AliAnalysisTaskSEVertexingHFTest.C
+++ PWG3/vertexingHF/AliAnalysisTaskSEVertexingHFTest.C
@@ -5,10 +5,10 @@
   // A.Dainese, andrea.dainese@lnl.infn.it
   //

-  Bool_t inputAOD=kTRUE; // otherwise, ESD
-  Bool_t createAOD=kFALSE; // kTRUE: create AOD and use it as input to vertexing
+  Bool_t inputAOD=kFALSE; // otherwise, ESD
+  Bool_t createAOD=kTRUE; // kTRUE: create AOD and use it as input to vertexing
                           // kFALSE: use ESD as input to vertexing
-  Bool_t writeKineToAOD = kTRUE;
+  Bool_t writeKineToAOD = kFALSE;
   TString mode="local"; // otherwise, "grid"
   Bool_t useParFiles=kFALSE;


fixed show exported

fixed show exported

paths os exported nodes shown adecuately

--- examples/megacmd/megacmd.cpp
+++ examples/megacmd/megacmd.cpp
@@ -1418,7 +1418,7 @@

 bool includeIfIsExported(MegaApi *api, MegaNode * n, void *arg)
 {
-    if (n->isExported())
+   if (n->isExported())
     {
         ((vector<MegaNode*> *) arg)->push_back(n->copy());
     }
@@ -1443,12 +1443,14 @@
     if (children){
         for (int i=0;i<children->size();i++)
         {
-            toret = toret && processor(api,children->get(i),arg);
+            bool childret = processTree(api,children->get(i),processor,arg);
+            toret = toret && childret;
         }
         delete children;
     }

-    return processor(api,n,arg);
+    bool currentret = processor(api,n,arg);
+    return toret && currentret;
 }

@@ -3399,8 +3401,98 @@
 }

-
-// execute command
+//string getDisplayPath(string givenPath, MegaNode* n, char *pathToShow)
+//{
+//    char * nodepath = api->getNodePath(n);
+
+//    string pathRelativeTo = "NULL"; //TODO: encapsulate all this
+//    string cwpath;
+//    if (givenPath !="" && givenPath.find('/') != string::npos) //TODO: fix in case words <=1
+//    {
+//        nodepath(cwd, &cwpath);
+//        if (givenPath.find_first_of(cwpath)  == 0 )
+//        {
+//            pathRelativeTo = "";
+//        }
+//        else
+//        {
+//            pathRelativeTo = cwpath;
+//        }
+//    }
+//    else
+//        pathRelativeTo = cwpath;
+
+//    if (pathRelativeTo != "")
+//        pathToShow = strstr(nodepath,pathRelativeTo.c_str());
+
+//        if (pathToShow == nodepath) //found at beginning
+//        {
+//            pathToShow+=pathRelativeTo.size();
+//            if (*pathToShow=='/' && pathRelativeTo != "/") pathToShow++;
+//        }
+//        else
+//            pathToShow=nodepath;
+
+//    delete []nodepath;
+//    return pathToShow;
+//}
+
+string getDisplayPath(string givenPath, MegaNode* n)
+{
+    char * pathToNode = api->getNodePath(n);
+    char * pathToShow=pathToNode;
+
+    string pathRelativeTo = "NULL"; //TODO: encapsulate all this
+    string cwpath;
+    //if (givenPath.find('/') != string::npos && !givenPath.find("./") == 0)
+    if (givenPath.find('/') == 0)
+    {
+        pathRelativeTo="";
+    }
+    else{
+        nodepath(cwd, &cwpath); //TODO: cwpath could be taken as argument
+        if (cwpath=="/")
+            pathRelativeTo = cwpath;
+        else
+            pathRelativeTo = cwpath+"/";
+    }
+
+    if (""==givenPath && !strcmp(pathToNode,cwpath.c_str())) { pathToNode[0]= '.'; pathToNode[1]= '\0';}
+
+
+
+    if (pathRelativeTo != "")
+        pathToShow = strstr(pathToNode,pathRelativeTo.c_str());
+
+        if (pathToShow == pathToNode) //found at beginning
+        {
+            pathToShow+=pathRelativeTo.size();
+//            if (*pathToShow=='/' && pathRelativeTo != "/") pathToShow++;
+        }
+        else
+            pathToShow=pathToNode;
+
+    string toret(pathToShow);
+//    string spathToNode(pathToNode);
+//    if (spathToNode.find(pathRelativeTo)==0 && givenPath.find(".")==0)
+//    {
+//        size_t begininrep = 0;
+//        for (int j=0;j<givenPath.size();j++)
+//        {
+//            if (spathToNode.find(givenPath.substr(j))==0)
+//            {
+//                begininrep = j;
+//                break;
+//            }
+//        }
+
+//        toret = givenPath.substr(0,begininrep)+pathToNode;//cuidado con cosas como /a/a/a/b //cuidado con delete posterior
+//    }
+
+    delete []pathToNode;
+    return toret;
+}
+
 static void process_line(char* l)
 {
     switch (prompt)
@@ -3692,7 +3784,6 @@
                         if ((int) words.size() > 1)
                         {
                             string rNpath = "NULL";
-                            MegaNode *rN = NULL;
                             string cwpath;
                             if (words[1].find('/') != string::npos)
                             {
@@ -3736,7 +3827,6 @@
                                     }
                                 }

-                                delete rN;
     //                            delete rNpath;
                             }
                             else
@@ -5845,6 +5935,7 @@
                         }
                         if (n)
                         {
+
                             //TODO: add del and ?ets? functionality

                             vector<MegaNode *> listOfExported;
@@ -5854,7 +5945,8 @@
                                 MegaNode * n = *it;
                                 if (n)
                                 {
-                                    dumpNode(n, 2, 1);//,rNpath); //TODO: poner rNpath adecuado
+                                    string pathToShow = getDisplayPath(words.size()>1?words[1]:"", n);
+                                    dumpNode(n, 2, 1,pathToShow.c_str());//,rNpath); //TODO: poner rNpath adecuado

                                     delete n;
                                 }


fixed ROS_INFO

fixed ROS_INFO

--- siemens_cp1616/src/siemens_cp1616_io_device_callbacks.cpp
+++ siemens_cp1616/src/siemens_cp1616_io_device_callbacks.cpp
@@ -428,7 +428,7 @@
     PNIO_UINT32 status,
     PNIO_ERR_STAT *p_pnio_state)
   {
-    ROS_INFO("IO Controller confirmed alarm: UserHndl: 0x%x", user_handle, status);
+    ROS_INFO("IO Controller confirmed alarm: UserHndl: 0x%x", status);
   }

   void apduStatusIndication(


iox-#27 Add test for RequestHeader

iox-#27 Add test for RequestHeader

Signed-off-by: Mathias Kraus <ebc65708cf0163c1abebe72ba676749f82c5fe3e@apex.ai>

--- iceoryx_posh/test/moduletests/test_popo_rpc_header.cpp
+++ iceoryx_posh/test/moduletests/test_popo_rpc_header.cpp
@@ -124,4 +124,54 @@
     EXPECT_TRUE(isConstReturn);
 }

+class RequestHeader_test : public Test
+{
+  public:
+    void SetUp() override
+    {
+    }
+
+    void TearDown() override
+    {
+    }
+
+    ChunkMock<bool, RpcBaseHeader> chunk;
+    RequestHeader* sut{new (chunk.userHeader()) RequestHeader(iox::UniquePortId(), 73)};
+};
+
+TEST_F(RequestHeader_test, ConstructorWorks)
+{
+    const iox::UniquePortId clientQueueUniquePortId;
+    constexpr uint32_t LAST_KNOWN_CLIENT_QUEUE_INDEX{13};
+    constexpr int64_t EXPECTED_SEQUENCE_ID{0};
+    constexpr uint8_t EXPECTED_RPC_HEADER_VERSION{RpcBaseHeader::RPC_HEADER_VERSION};
+
+    ChunkMock<bool, RpcBaseHeader> chunk;
+    auto requestHeader = new (chunk.userHeader()) RequestHeader(clientQueueUniquePortId, LAST_KNOWN_CLIENT_QUEUE_INDEX);
+
+    checkRpcBaseHeader(static_cast<RpcBaseHeaderAccess*>(chunk.userHeader()),
+                       clientQueueUniquePortId,
+                       LAST_KNOWN_CLIENT_QUEUE_INDEX,
+                       EXPECTED_SEQUENCE_ID,
+                       EXPECTED_RPC_HEADER_VERSION);
+
+    EXPECT_THAT(requestHeader->getFireAndForget(), Eq(false));
+}
+
+TEST_F(RequestHeader_test, SetSequenceIdWorks)
+{
+    constexpr int64_t SEQUENCE_ID{666};
+
+    sut->setSequenceId(SEQUENCE_ID);
+
+    EXPECT_THAT(sut->getSequenceId(), Eq(SEQUENCE_ID));
+}
+
+TEST_F(RequestHeader_test, SetFireAndForgetWorks)
+{
+    sut->setFireAndForget();
+
+    EXPECT_THAT(sut->getFireAndForget(), Eq(true));
+}
+
 } // namespace


BUG: Compilation warning indicated bug

BUG: Compilation warning indicated bug

The command line parsing for over writing
the splineOrder was not being assigned properly.

--- Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx
+++ Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx
@@ -335,7 +335,7 @@
   unsigned int splineOrder = 3;
   if( argc > 6 )
     {
-    atoi( argv[6] );
+    splineOrder = atoi( argv[6] );
     }

   std::vector<unsigned int> meshSize = ConvertVector<unsigned int>( std::string( argv[4] ) );


ENH: added comments for fixing compilation errors on Windows

--- Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx
+++ Examples/ANTSUseLandmarkImagesToGetBSplineDisplacementField.cxx
@@ -144,6 +144,7 @@
         }
       typename PointSetType::PointType movingPoint;
       movingImage->TransformIndexToPhysicalPoint( ItM.GetIndex(), movingPoint );
+      // added below due to a compilation error on windows
       const LabelImageType::PointType::VectorType tmpFixVector = fixedOrigin.GetVectorFromOrigin();
       movingPoint -= tmpFixVector;
       movingPoint = fixedDirectionInverse * movingPoint;


Don't use memset.

Don't use memset.

--- client_base.cc
+++ client_base.cc
@@ -220,7 +220,6 @@
 		LOG_CONN_WIRE(this, "(sock=%d) -->> '%s'\n", sock, repr(buf, received).c_str());
 		on_read(buf, received);
 	}
-	memset(&buf, 0, sizeof(buf));
 }


minor cleanup: remove unnecessary DWI::, since namespace already included at global scope

--- cmd/tckmap.cpp
+++ cmd/tckmap.cpp
@@ -335,16 +335,16 @@
     Stride::set (header, Stride::contiguous_along_axis (3, header));
   }

-  std::unique_ptr<DWI::Directions::FastLookupSet> dirs;
+  std::unique_ptr<Directions::FastLookupSet> dirs;
   opt = get_options ("dixel");
   if (opt.size()) {
     if (writer_type != GREYSCALE)
       throw Exception ("Options for setting output image dimensionality are mutually exclusive");
     writer_type = DIXEL;
     if (Path::exists (opt[0][0]))
-      dirs.reset (new DWI::Directions::FastLookupSet (str(opt[0][0])));
+      dirs.reset (new Directions::FastLookupSet (str(opt[0][0])));
     else
-      dirs.reset (new DWI::Directions::FastLookupSet (to<size_t>(opt[0][0])));
+      dirs.reset (new Directions::FastLookupSet (to<size_t>(opt[0][0])));
     header.ndim() = 4;
     header.size(3) = dirs->size();
     header.sanitise();


fixed bug with copying sizes array over incorrectly (which was causing a seg fault when the image_resample field was redefined)

--- source/image_processing/computed_field_image_resample.cpp
+++ source/image_processing/computed_field_image_resample.cpp
@@ -415,7 +415,7 @@
 		{
 			for (i = 0 ; i < core->dimension ; i++)
 			{
-				*sizes[i] = core->sizes[i];
+				(*sizes)[i] = core->sizes[i];
 			}
 			*dimension = core->dimension;
 			*source_field = field->source_fields[0];


Explained why write_queue_entry_t is serializable.

--- src/clustering/immediate_consistency/branch/listener.hpp
+++ src/clustering/immediate_consistency/branch/listener.hpp
@@ -104,7 +104,7 @@
         order_token_t order_token;
         fifo_enforcer_write_token_t fifo_token;

-        // TODO: Why does this need to be serializable?
+        // This is serializable because this gets written to a disk backed queue.
         RDB_MAKE_ME_SERIALIZABLE_4(write, order_token, transition_timestamp, fifo_token);
     };


duplex: call destructor

duplex: call destructor

--- src/duplex.cxx
+++ src/duplex.cxx
@@ -166,6 +166,8 @@

     from_read.Free(fb_pool_get());
     to_write.Free(fb_pool_get());
+
+    this->~Duplex();
 }

 bool


Fix a bug in file-systems where it was deleting the assets dir.

Change-Id: I3240bd986d4bed103f77d4e1d042b949774da490
Reviewed-on: https://wnproject.org/gerrit/269
Try: AWoloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>
Reviewed-by: devpow112 <bef84a74f4a3947934cc58306a6aae518eaf1936@gmail.com>
Tested-by: WNBot <efa0942020584fb66fb8bea377b59e48fa0f85ef@gmail.com>

--- Libraries/WNFileSystem/src/WNFactory.cpp
+++ Libraries/WNFileSystem/src/WNFactory.cpp
@@ -66,7 +66,7 @@

       if (!path.empty()) {
         return memory::make_unique<internal::system_mapping>(
-            _allocator, _allocator, core::move(path), true);
+            _allocator, _allocator, core::move(path), false);
       }
       break;
     }


glws: Update Waffle support for interface changes.

--- retrace/glws_waffle.cpp
+++ retrace/glws_waffle.cpp
@@ -62,9 +62,10 @@
 public:
     struct waffle_window *window;

-    WaffleDrawable(const Visual *vis, int w, int h, bool pbuffer,
+    WaffleDrawable(const Visual *vis, int w, int h,
+        const pbuffer_info *info,
         struct waffle_window *win) :
-        Drawable (vis, w, h, pbuffer),
+        Drawable (vis, w, h, info),
         window (win)
     {}

@@ -236,14 +237,15 @@
 }

 Drawable *
-createDrawable(const Visual *visual, int width, int height, bool pbuffer)
+createDrawable(const Visual *visual, int width, int height,
+               const pbuffer_info *info)
 {
     struct waffle_window *window;
     const WaffleVisual *waffleVisual =
         static_cast<const WaffleVisual *>(visual);

     window = waffle_window_create(waffleVisual->config, width, height);
-    return new WaffleDrawable(visual, width, height, pbuffer, window);
+    return new WaffleDrawable(visual, width, height, info, window);
 }

 Context *
@@ -285,4 +287,25 @@
     }
 }

+bool
+bindTexImage(Drawable *pBuffer, int iBuffer) {
+    std::cerr << "error: Waffle::wglBindTexImageARB not implemented.\n";
+    assert(pBuffer->pbuffer);
+    return true;
+}
+
+bool
+releaseTexImage(Drawable *pBuffer, int iBuffer) {
+    std::cerr << "error: Waffle::wglReleaseTexImageARB not implemented.\n";
+    assert(pBuffer->pbuffer);
+    return true;
+}
+
+bool
+setPbufferAttrib(Drawable *pBuffer, const int *attribList) {
+    // nothing to do here.
+    assert(pBuffer->pbuffer);
+    return true;
+}
+
 } /* namespace glws */


[connectionagent] Make connectToType() only connect to auto connect services.

When the connectToType() method is used to connect to a network
service, only attempt to connect to favorite and auto connect services.

--- connd/qconnectionmanager.cpp
+++ connd/qconnectionmanager.cpp
@@ -373,31 +373,25 @@
         netTech.setPowered(true);
     }
     QStringList servicesList = netman->servicesList(type);
-    bool needConfig = false;
+    bool needConfig = true;

     if (servicesList.isEmpty()) {
         if (type == "wifi") {
+            needConfig = false;
             QObject::connect(&netTech,SIGNAL(scanFinished()),this,SLOT(onScanFinished()));
             netTech.scan();
-        } else {
-            needConfig = true;
-//            Q_EMIT errorReported("Service not found"); ?? do we want to report an error
         }
     } else {
         currentType = "";

         Q_FOREACH (const QString path, servicesList) {
-            // try harder with cell. a favorite is one that has been connected
-            // if there is a context configured but not yet connected, try to connect anyway
-
-            if (servicesMap.contains(path) &&
-                    (servicesMap.value(path)->favorite()
-                     || servicesMap.value(path)->type() == "cellular")) {
-                connectToNetworkService(path);
-                needConfig = false;
-                return;
-            } else {
-                needConfig = true;
+            NetworkService *service = servicesMap.value(path);
+            if (service) {
+                if (service->favorite() && service->autoConnect()) {
+                    needConfig = false;
+                    connectToNetworkService(path);
+                    break;
+                }
             }
         }
     }


cleanup some signalhandler atomic useage with qStroika_FeatureSupported_Valgrind

--- Library/Sources/Stroika/Foundation/Execution/SignalHandlers.cpp
+++ Library/Sources/Stroika/Foundation/Execution/SignalHandlers.cpp
@@ -136,6 +136,10 @@
 public:
     Rep_ ()
     {
+#if     qStroika_FeatureSupported_Valgrind
+        VALGRIND_HG_DISABLE_CHECKING (&fIncomingSignalCounts_, sizeof(fIncomingSignalCounts_)); // helgrind doesnt seem to understand std::atomic
+        VALGRIND_HG_DISABLE_CHECKING (&fLastSignalRecieved_, sizeof(fLastSignalRecieved_));     // helgrind doesnt seem to understand std::atomic
+#endif
         fBlockingQueuePusherThread_ = Thread {
             [this] ()
             {


use 1.png instead of 1.jpg

use 1.png instead of 1.jpg

--- 5_core/main.cpp
+++ 5_core/main.cpp
@@ -12,7 +12,7 @@
 using namespace std;
 using namespace cv;

-// 5.1.5
+// 5.1
 namespace access_pixel {

 const int NITERATIONS = 20;
@@ -467,6 +467,8 @@

 }

+
+// 5.4
 namespace adjust_contrast_and_bright {

 int g_contrast = 0;
@@ -504,22 +506,23 @@

 void test()
 {
-	g_src = imread("1.jpg");
+	g_src = imread("1.png");

 	g_dst = Mat::zeros(g_src.size(), g_src.type());

 	g_contrast = 80;
 	g_bright = 80;

-	namedWindow(winname_origin, CV_WINDOW_NORMAL);
-	resizeWindow(winname_origin, 800, 600);
+	namedWindow(winname_origin);
+	//resizeWindow(winname_origin, 800, 600);
 	moveWindow(winname_origin, 0, 0);
 	imshow(winname_origin, g_src);

-	namedWindow(winname_result, CV_WINDOW_NORMAL);
-	resizeWindow(winname_result, 800, 600);
-	moveWindow(winname_result, 805, 0);
+	namedWindow(winname_result);
+	//resizeWindow(winname_result, 800, 600);
+	//moveWindow(winname_result, 805, 0);
+	moveWindow(winname_result, g_src.cols, 0);
 	createTrackbar("contrast: ", winname_result, &g_contrast, 300, on_track_bar);
 	createTrackbar("bright  : ", winname_result, &g_bright, 200, on_track_bar);

@@ -530,6 +533,15 @@
 }

+// 5.5
+namespace discrete_fourier_transform {
+
+
+
+}
+
+
+
 int main()
 {
 	//access_pixel::test();


[StdAir][Dev] Improved the description of the EventStruct key.

--- stdair/bom/EventStruct.cpp
+++ stdair/bom/EventStruct.cpp
@@ -33,8 +33,9 @@
     _request = boost::make_shared<BookingRequestStruct> (*ioRequestPtr);
     assert (_request != NULL);

-    // Compute and store the number of seconds between iDateTime and
-    // DEFAULT_DATETIME.
+    // Compute and store the number of milliseconds between the
+    // date-time of the booking request and DEFAULT_DATETIME (as of
+    // Feb. 2011, that date is set to Jan. 1, 2010).
     const Duration_T lDuration =
       _request->getRequestDateTime() - DEFAULT_DATETIME;
     _eventTimeStamp = lDuration.total_milliseconds();
@@ -73,7 +74,11 @@
          << "}][" << _specificProgressStatus.getCurrentNb()
          << "/{" << _specificProgressStatus.getExpectedNb()
          << "," << _specificProgressStatus.getActualNb()
-         << "}] " << _eventTimeStamp;
+         << "}] ";
+
+    const Duration_T lRequestDateDelta (0, 0, 0, _eventTimeStamp);
+    const DateTime_T lRequestDate (DEFAULT_DATETIME + lRequestDateDelta);
+    oStr << lRequestDate;

     switch (_eventType) {
     case EventType::BKG_REQ: {


changed module name to match bindings.gyp

--- src/ed25519.cc
+++ src/ed25519.cc
@@ -122,5 +122,4 @@
 	exports->Set(NanNew("Verify"), NanNew<FunctionTemplate>(Verify)->GetFunction());
 }

-NODE_MODULE(native, InitModule)
-
+NODE_MODULE(ed25519, InitModule)


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

--- stoc/test/testregistry.cxx
+++ stoc/test/testregistry.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: testregistry.cxx,v $
  *
- *  $Revision: 1.16 $
- *
- *  last change: $Author: rt $ $Date: 2005-09-08 08:24:07 $
+ *  $Revision: 1.17 $
+ *
+ *  last change: $Author: obo $ $Date: 2006-09-16 17:41:35 $
  *
  *  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_stoc.hxx"

 #include <stdio.h>
 #include <stdlib.h>


- Restrict memcpy length in CHRBLK::SetValue

modified:
  storage/connect/valblk.cpp

--- storage/connect/valblk.cpp
+++ storage/connect/valblk.cpp
@@ -592,7 +592,7 @@
 #endif

   if (sp)
-    memcpy(p, sp, Long);
+    memcpy(p, sp, min((unsigned)Long, len));

   if (Blanks) {
     // Suppress eventual ending zero and right fill with blanks


Changed behaviour of progress dialog on import

Still WIP, but better suits the background processing

--- Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp
+++ Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp
@@ -424,29 +424,32 @@
       {
       targetDirectory = d->DICOMDatabase->databaseDirectory();
       }
-    QProgressDialog progress("DICOM Import", "Cancel", 0, 100, this,
+    QProgressDialog* progress = new QProgressDialog("DICOM Import", "Cancel", 0, 100, this,
                            Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
     // We don't want the progress dialog to resize itself, so we bypass the label
     // by creating our own
     QLabel* progressLabel = new QLabel(tr("Initialization..."));
-    progress.setLabel(progressLabel);
+    progress->setLabel(progressLabel);
 #ifdef Q_WS_MAC
     // BUG: avoid deadlock of dialogs on mac
-    progress.setWindowModality(Qt::NonModal);
+    progress->setWindowModality(Qt::NonModal);
 #else
-    progress.setWindowModality(Qt::ApplicationModal);
+    progress->setWindowModality(Qt::ApplicationModal);
 #endif
-    progress.setMinimumDuration(0);
-    progress.setValue(0);
-    progress.show();
-
-    connect(&progress, SIGNAL(canceled()), d->DICOMIndexer.data(), SLOT(cancel()));
+    progress->setMinimumDuration(0);
+    progress->setValue(0);
+    progress->show();
+
+    connect(progress, SIGNAL(canceled()), d->DICOMIndexer.data(), SLOT(cancel()));
     connect(d->DICOMIndexer.data(), SIGNAL(indexingFilePath(QString)),
             progressLabel, SLOT(setText(QString)));
     connect(d->DICOMIndexer.data(), SIGNAL(progress(int)),
-            &progress, SLOT(setValue(int)));
+            progress, SLOT(setValue(int)));
     connect(d->DICOMIndexer.data(), SIGNAL(progress(int)),
             this, SLOT(onProgress(int)));
+
+    connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
+            progress, SLOT(close()));

     d->DICOMIndexer->addDirectory(*d->DICOMDatabase,directory,targetDirectory);


Fix a bug introduced by svn rev 8550 (patch 2693798); HLSL float4 arrays were not working because the RegisterCount (which was used instead of RowCount in the patch) increases, which made it think it was a matrix, and set elementCount to 16 instead of 4 which broke updating using array auto-params. Change the code so that we use the Class element of the description to determine if it's a matrix or a float array to get the correct results.

--- RenderSystems/Direct3D9/src/OgreD3D9HLSLProgram.cpp
+++ RenderSystems/Direct3D9/src/OgreD3D9HLSLProgram.cpp
@@ -364,9 +364,68 @@
 			} // columns
 			break;
 		case D3DXPT_FLOAT:
-			switch(d3dDesc.RegisterCount)
+			switch(d3dDesc.Class)
 			{
-			case 1:
+			case D3DXPC_MATRIX_COLUMNS:
+			case D3DXPC_MATRIX_ROWS:
+				switch(d3dDesc.RegisterCount)
+				{
+				case 2:
+					switch(d3dDesc.Columns)
+					{
+					case 2:
+						def.constType = GCT_MATRIX_2X2;
+						def.elementSize = 8; // HLSL always packs
+						break;
+					case 3:
+						def.constType = GCT_MATRIX_2X3;
+						def.elementSize = 8; // HLSL always packs
+						break;
+					case 4:
+						def.constType = GCT_MATRIX_2X4;
+						def.elementSize = 8;
+						break;
+					} // columns
+					break;
+				case 3:
+					switch(d3dDesc.Columns)
+					{
+					case 2:
+						def.constType = GCT_MATRIX_3X2;
+						def.elementSize = 12; // HLSL always packs
+						break;
+					case 3:
+						def.constType = GCT_MATRIX_3X3;
+						def.elementSize = 12; // HLSL always packs
+						break;
+					case 4:
+						def.constType = GCT_MATRIX_3X4;
+						def.elementSize = 12;
+						break;
+					} // columns
+					break;
+				case 4:
+					switch(d3dDesc.Columns)
+					{
+					case 2:
+						def.constType = GCT_MATRIX_4X2;
+						def.elementSize = 16; // HLSL always packs
+						break;
+					case 3:
+						def.constType = GCT_MATRIX_4X3;
+						def.elementSize = 16; // HLSL always packs
+						break;
+					case 4:
+						def.constType = GCT_MATRIX_4X4;
+						def.elementSize = 16;
+						break;
+					} // columns
+					break;
+
+				} // rows
+				break;
+			case D3DXPC_SCALAR:
+			case D3DXPC_VECTOR:
 				switch(d3dDesc.Columns)
 				{
 				case 1:
@@ -387,61 +446,7 @@
 					break;
 				} // columns
 				break;
-			case 2:
-				switch(d3dDesc.Columns)
-				{
-				case 2:
-					def.constType = GCT_MATRIX_2X2;
-					def.elementSize = 8; // HLSL always packs
-					break;
-				case 3:
-					def.constType = GCT_MATRIX_2X3;
-					def.elementSize = 8; // HLSL always packs
-					break;
-				case 4:
-					def.constType = GCT_MATRIX_2X4;
-					def.elementSize = 8;
-					break;
-				} // columns
-				break;
-			case 3:
-				switch(d3dDesc.Columns)
-				{
-				case 2:
-					def.constType = GCT_MATRIX_3X2;
-					def.elementSize = 12; // HLSL always packs
-					break;
-				case 3:
-					def.constType = GCT_MATRIX_3X3;
-					def.elementSize = 12; // HLSL always packs
-					break;
-				case 4:
-					def.constType = GCT_MATRIX_3X4;
-					def.elementSize = 12;
-					break;
-				} // columns
-				break;
-			case 4:
-				switch(d3dDesc.Columns)
-				{
-				case 2:
-					def.constType = GCT_MATRIX_4X2;
-					def.elementSize = 16; // HLSL always packs
-					break;
-				case 3:
-					def.constType = GCT_MATRIX_4X3;
-					def.elementSize = 16; // HLSL always packs
-					break;
-				case 4:
-					def.constType = GCT_MATRIX_4X4;
-					def.elementSize = 16;
-					break;
-				} // columns
-				break;
-
-			} // rows
-			break;
-
+			}
 		default:
 			// not mapping samplers, don't need to take the space
 			break;


Clean a little bit of whitespace.

Clean a little bit of whitespace.

--- RenderSystems/GL/src/OgreGLFBOMultiRenderTarget.cpp
+++ RenderSystems/GL/src/OgreGLFBOMultiRenderTarget.cpp
@@ -40,45 +40,30 @@
 		fbo(manager, 0 /* TODO: multisampling on MRTs? */)
 	{
 	}
+
 	GLFBOMultiRenderTarget::~GLFBOMultiRenderTarget()
 	{
 	}

-
 	void GLFBOMultiRenderTarget::bindSurfaceImpl(size_t attachment, RenderTexture *target)
-
 	{
-
 		/// Check if the render target is in the rendertarget->FBO map
         GLFrameBufferObject *fbobj = 0;
         target->getCustomAttribute(GLRenderTexture::CustomAttributeString_FBO, &fbobj);
 		assert(fbobj);
 		fbo.bindSurface(attachment, fbobj->getSurface(0));

-
-
-		// Initialise?
-
-
-
 		// Set width and height
-
 		mWidth = fbo.getWidth();
-
 		mHeight = fbo.getHeight();
-
 	}
-
-

 	void GLFBOMultiRenderTarget::unbindSurfaceImpl(size_t attachment)
 	{
 		fbo.unbindSurface(attachment);

 		// Set width and height
-
 		mWidth = fbo.getWidth();
-
 		mHeight = fbo.getHeight();
 	}


GLES2: fix HardwareBuffer::readData

GLES2: fix HardwareBuffer::readData

--- RenderSystems/GLES2/src/OgreGLES2HardwareBuffer.cpp
+++ RenderSystems/GLES2/src/OgreGLES2HardwareBuffer.cpp
@@ -140,25 +140,21 @@
             return;
         }

-        if(!OGRE_NO_GLES3_SUPPORT || mRenderSystem->checkExtension("GL_EXT_map_buffer_range"))
-        {
-            // Map the buffer range then copy out of it into our destination buffer
-            void* srcData;
-            OGRE_CHECK_GL_ERROR(srcData = glMapBufferRangeEXT(mTarget, offset, length, GL_MAP_READ_BIT_EXT));
-            memcpy(pDest, srcData, length);
-
-            // Unmap the buffer since we are done.
-            GLboolean mapped;
-            OGRE_CHECK_GL_ERROR(mapped = glUnmapBufferOES(mTarget));
-            if(!mapped)
-            {
-                OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer data corrupted, please reload",
-                            "GLES2HardwareBuffer::readData");
-            }
-        }
-        else
-        {
-            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Read hardware buffer is not supported",
+        OgreAssert(mRenderSystem->getCapabilities()->hasCapability(RSC_MAPBUFFER),
+                   "Read hardware buffer is not supported");
+
+        mRenderSystem->_getStateCacheManager()->bindGLBuffer(mTarget, mBufferId);
+        // Map the buffer range then copy out of it into our destination buffer
+        void* srcData;
+        OGRE_CHECK_GL_ERROR(srcData = glMapBufferRangeEXT(mTarget, offset, length, GL_MAP_READ_BIT_EXT));
+        memcpy(pDest, srcData, length);
+
+        // Unmap the buffer since we are done.
+        GLboolean mapped;
+        OGRE_CHECK_GL_ERROR(mapped = glUnmapBufferOES(mTarget));
+        if(!mapped)
+        {
+            OGRE_EXCEPT(Exception::ERR_INTERNAL_ERROR, "Buffer data corrupted, please reload",
                         "GLES2HardwareBuffer::readData");
         }
     }


Stop executing plugin framework tests on error.

--- Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestMain.cpp
+++ Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestMain.cpp
@@ -54,7 +54,8 @@
     int result = 0;
     foreach(ctkServiceReference ref, refs)
     {
-      result = QTest::qExec(context->getService(ref), argc, argv);
+      result += QTest::qExec(context->getService(ref), argc, argv);
+      if (result > 0) break;
     }

     QCoreApplication::exit(result);


INTEGRATION: CWS vcl09 (1.7.4); FILE MERGED 2003/04/29 15:29:36 pl 1.7.4.1: #108994# read locale from configuration

--- padmin/source/newppdlg.cxx
+++ padmin/source/newppdlg.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: newppdlg.cxx,v $
  *
- *  $Revision: 1.7 $
- *
- *  last change: $Author: vg $ $Date: 2003-04-15 17:21:55 $
+ *  $Revision: 1.8 $
+ *
+ *  last change: $Author: vg $ $Date: 2003-05-28 12:36:18 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -200,7 +200,7 @@
         {
 #if OSL_DEBUG_LEVEL > 1
             fprintf( stderr, "Warning: File %s has empty printer name.\n",
-                     ByteString( ByteString( aPath.PathToFileName(), osl_getThreadTextEncoding() ).GetBuffer() ) );
+                     ByteString( aPath.PathToFileName(), osl_getThreadTextEncoding() ).GetBuffer() );
 #endif
             continue;
         }