Constraints visualization: Separate inter constraints between separate trajectories (#634)

--- cartographer_ros/cartographer_ros/map_builder_bridge.cc
+++ cartographer_ros/cartographer_ros/map_builder_bridge.cc
@@ -247,15 +247,33 @@
   // visible.
   residual_intra_marker.pose.position.z = 0.1;

-  visualization_msgs::Marker constraint_inter_marker = constraint_intra_marker;
-  constraint_inter_marker.id = marker_id++;
-  constraint_inter_marker.ns = "Inter constraints";
-  constraint_inter_marker.pose.position.z = 0.1;
-
-  visualization_msgs::Marker residual_inter_marker = constraint_intra_marker;
-  residual_inter_marker.id = marker_id++;
-  residual_inter_marker.ns = "Inter residuals";
-  residual_inter_marker.pose.position.z = 0.1;
+  visualization_msgs::Marker constraint_inter_same_trajectory_marker =
+      constraint_intra_marker;
+  constraint_inter_same_trajectory_marker.id = marker_id++;
+  constraint_inter_same_trajectory_marker.ns =
+      "Inter constraints, same trajectory";
+  constraint_inter_same_trajectory_marker.pose.position.z = 0.1;
+
+  visualization_msgs::Marker residual_inter_same_trajectory_marker =
+      constraint_intra_marker;
+  residual_inter_same_trajectory_marker.id = marker_id++;
+  residual_inter_same_trajectory_marker.ns =
+      "Inter residuals, same trajectory";
+  residual_inter_same_trajectory_marker.pose.position.z = 0.1;
+
+  visualization_msgs::Marker constraint_inter_diff_trajectory_marker =
+      constraint_intra_marker;
+  constraint_inter_diff_trajectory_marker.id = marker_id++;
+  constraint_inter_diff_trajectory_marker.ns =
+      "Inter constraints, different trajectories";
+  constraint_inter_diff_trajectory_marker.pose.position.z = 0.1;
+
+  visualization_msgs::Marker residual_inter_diff_trajectory_marker =
+      constraint_intra_marker;
+  residual_inter_diff_trajectory_marker.id = marker_id++;
+  residual_inter_diff_trajectory_marker.ns =
+      "Inter residuals, different trajectories";
+  residual_inter_diff_trajectory_marker.pose.position.z = 0.1;

   const auto trajectory_node_poses =
       map_builder_->pose_graph()->GetTrajectoryNodePoses();
@@ -278,11 +296,21 @@
       color_residual.a = 1.0;
       color_residual.r = 1.0;
     } else {
-      constraint_marker = &constraint_inter_marker;
-      residual_marker = &residual_inter_marker;
-      // Bright yellow
-      color_constraint.a = 1.0;
-      color_constraint.r = color_constraint.g = 1.0;
+      if (constraint.node_id.trajectory_id ==
+          constraint.submap_id.trajectory_id) {
+        constraint_marker = &constraint_inter_same_trajectory_marker;
+        residual_marker = &residual_inter_same_trajectory_marker;
+        // Bright yellow
+        color_constraint.a = 1.0;
+        color_constraint.r = color_constraint.g = 1.0;
+      } else {
+        constraint_marker = &constraint_inter_diff_trajectory_marker;
+        residual_marker = &residual_inter_diff_trajectory_marker;
+        // Bright orange
+        color_constraint.a = 1.0;
+        color_constraint.r = 1.0;
+        color_constraint.g = 165./255.;
+      }
       // Bright cyan
       color_residual.a = 1.0;
       color_residual.b = color_residual.g = 1.0;
@@ -319,8 +347,10 @@

   constraint_list.markers.push_back(constraint_intra_marker);
   constraint_list.markers.push_back(residual_intra_marker);
-  constraint_list.markers.push_back(constraint_inter_marker);
-  constraint_list.markers.push_back(residual_inter_marker);
+  constraint_list.markers.push_back(constraint_inter_same_trajectory_marker);
+  constraint_list.markers.push_back(residual_inter_same_trajectory_marker);
+  constraint_list.markers.push_back(constraint_inter_diff_trajectory_marker);
+  constraint_list.markers.push_back(residual_inter_diff_trajectory_marker);
   return constraint_list;
 }


Add 'tfrt-tpu-partitioned-call-fallback-compat' pipeline to support TFRT fallback execution of TPUPartitionedCallOp.

PiperOrigin-RevId: 422894654
Change-Id: Ida0bd53b01a3e9abfda62ba4f92dd02d06c0e829

--- tensorflow/compiler/mlir/tfrt/translate/import_model.cc
+++ tensorflow/compiler/mlir/tfrt/translate/import_model.cc
@@ -86,6 +86,13 @@

     TF_RETURN_IF_ERROR(
         mlir::TFTPU::TPUBridge(module, /*enable_logging=*/VLOG_IS_ON(1)));
+  } else if (options.tpu_target == TfrtTpuInfraTarget::kTfFallback) {
+    auto tpu_partitioned_call_fallback_compat_result =
+        tensorflow::RunTPUPartitionedCallFallbackCompatConversion(module);
+    if (mlir::failed(tpu_partitioned_call_fallback_compat_result)) {
+      return diag_handler.Combine(tensorflow::errors::Internal(
+          "Failed to process TPUPartitionedCallOp for fallback execution"));
+    }
   }

   if (VLOG_IS_ON(1)) {


Limit compare broadcast simplification to integral types.

compare(x + a, y) => compare (a, y - x) is not safe when a is much smaller than x.

PiperOrigin-RevId: 339470641
Change-Id: I233a2f77a1490bd959ca5a2d0c170f218aebb7a8

--- tensorflow/compiler/xla/service/algebraic_simplifier.cc
+++ tensorflow/compiler/xla/service/algebraic_simplifier.cc
@@ -3170,14 +3170,15 @@
   CHECK(Match(compare, m::Compare(m::Op(&lhs), m::Op(&rhs))));
   {
     // compare(broadcast(a) + x, broadcast(b)) ==>
-    //   compare(x, broadcast(b-a))
+    //   compare(x, broadcast(b-a)), only enabled for integral types.
     HloInstruction *x, *a, *b;
     if (Match(compare,
               m::Compare(
                   m::AddAnyOrder(m::Op(&x), m::Broadcast(m::Op(&a).WithShape(
                                                 m::Shape().IsScalar()))),
                   m::Broadcast(m::Op(&b).WithShape(m::Shape().IsScalar()))))) {
-      if (ShapeUtil::ElementIsSigned(x->shape())) {
+      if (ShapeUtil::ElementIsSigned(x->shape()) &&
+          ShapeUtil::ElementIsIntegral(x->shape())) {
         HloInstruction* sub =
             computation_->AddInstruction(HloInstruction::CreateBinary(
                 b->shape(), HloOpcode::kSubtract, b, a));


8027454: Do not traverse string table during G1 remark when treating them as strong roots during initial mark Summary: Do not try to unlink string table entries unconditionally during remark. This is without side effects as the preceding initial mark always uses the string table as strong roots. Needs to be fixed with class unloading during concurrent mark. Reviewed-by: brutisso, mgerdin

--- src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -2528,7 +2528,9 @@
     assert(!rp->discovery_enabled(), "Post condition");
   }

-  g1h->unlink_string_and_symbol_table(&g1_is_alive);
+  g1h->unlink_string_and_symbol_table(&g1_is_alive,
+                                      /* process_strings */ false, // currently strings are always roots
+                                      /* process_symbols */ true);
 }

 void ConcurrentMark::swapMarkBitMaps() {


Remove redundant override

Remove redundant override

Change-Id: Idda7987a5042b93a02cfa65160a355f040a03543

--- vcl/inc/unx/gtk/gtkinst.hxx
+++ vcl/inc/unx/gtk/gtkinst.hxx
@@ -44,7 +44,6 @@
                         GtkYieldMutex();
     virtual void        acquire();
     virtual void        release();
-    virtual bool        tryToAcquire()  { return SalYieldMutex::tryToAcquire(); }

     void ThreadsEnter();
     void ThreadsLeave();


Compile fix for CL: Form AutoFill Phone number should be displayed as xxx-xxx-xxxx

Modifies the AutoFill label inferencing logic to skip over <img> tags when deriving labels.  It is common to use
small images as spacers between elements.  Also, extends the phone number heuristics to recognize numbers that are
split into three fields of the form [xxx]-[yyy]-[zzzz] where xxx is the area code, yyy is the phone number prefix and zzz
is the phone number suffix.

Note: This change has a dependency on WebKit change: https://bugs.webkit.org/show_bug.cgi?id=38825.
Will need to wait for that to land before committing this change.

BUG=38218
TEST=FormManagerTest.LabelsInferredWithImageTags:FormStructureTest.ThreePartPhoneNumber:PhoneFieldTest.ThreePartPhoneNumber

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

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@47298 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- webkit/glue/webpasswordautocompletelistener_unittest.cc
+++ webkit/glue/webpasswordautocompletelistener_unittest.cc
@@ -107,11 +107,13 @@
     data_.basic_data.fields.push_back(FormField(string16(),
                                                 string16(),
                                                 username1_,
-                                                string16()));
+                                                string16(),
+                                                0));
     data_.basic_data.fields.push_back(FormField(string16(),
                                                 string16(),
                                                 password1_,
-                                                string16()));
+                                                string16(),
+                                                0));
     data_.additional_logins[username2_] = password2_;
     testing::Test::SetUp();
   }


Minor update to ShaderResourceLayoutVk

Minor update to ShaderResourceLayoutVk

--- Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp
+++ Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp
@@ -69,10 +69,10 @@
     return -1;
 }

-static SHADER_RESOURCE_VARIABLE_TYPE GetShaderVariableType(SHADER_TYPE                       ShaderType,
-                                                           const SPIRVShaderResourceAttribs& Attribs,
-                                                           const PipelineResourceLayoutDesc& ResourceLayoutDesc,
-                                                           const char*                       CombinedSamplerSuffix)
+static SHADER_RESOURCE_VARIABLE_TYPE FindShaderVariableType(SHADER_TYPE                       ShaderType,
+                                                            const SPIRVShaderResourceAttribs& Attribs,
+                                                            const PipelineResourceLayoutDesc& ResourceLayoutDesc,
+                                                            const char*                       CombinedSamplerSuffix)
 {
     if (Attribs.Type == SPIRVShaderResourceAttribs::ResourceType::SeparateSampler)
     {
@@ -120,7 +120,7 @@
     m_pResources->ProcessResources(
         [&](const SPIRVShaderResourceAttribs& ResAttribs, Uint32)
         {
-            auto VarType = GetShaderVariableType(ShaderType, ResAttribs, ResourceLayoutDesc, CombinedSamplerSuffix);
+            auto VarType = FindShaderVariableType(ShaderType, ResAttribs, ResourceLayoutDesc, CombinedSamplerSuffix);
             if (IsAllowedType(VarType, AllowedTypeBits))
             {
                 // For immutable separate samplers we still allocate VkResource instances, but they are never exposed to the app
@@ -187,7 +187,7 @@
     m_pResources->ProcessResources(
         [&](const SPIRVShaderResourceAttribs& Attribs, Uint32)
         {
-            auto VarType = GetShaderVariableType(ShaderType, Attribs, ResourceLayoutDesc, CombinedSamplerSuffix);
+            auto VarType = FindShaderVariableType(ShaderType, Attribs, ResourceLayoutDesc, CombinedSamplerSuffix);
             if (!IsAllowedType(VarType, AllowedTypeBits))
                 return;

@@ -345,7 +345,7 @@
                            const SPIRVShaderResourceAttribs& Attribs)
     {
         const auto ShaderType = Resources.GetShaderType();
-        const SHADER_RESOURCE_VARIABLE_TYPE VarType = GetShaderVariableType(ShaderType, Attribs, ResourceLayoutDesc, Resources.GetCombinedSamplerSuffix());
+        const SHADER_RESOURCE_VARIABLE_TYPE VarType = FindShaderVariableType(ShaderType, Attribs, ResourceLayoutDesc, Resources.GetCombinedSamplerSuffix());
         if (!IsAllowedType(VarType, AllowedTypeBits))
             return;


Fix an accidental change in the choice of memory scheduler.

PiperOrigin-RevId: 255091430

--- tensorflow/compiler/xla/service/hlo_memory_scheduler.cc
+++ tensorflow/compiler/xla/service/hlo_memory_scheduler.cc
@@ -409,8 +409,8 @@
     return algorithm(computation, points_to_analysis, alias_analysis,
                      size_function, memory_by_computation);
   }
-  return DFSMemoryScheduler(computation, points_to_analysis, alias_analysis,
-                            size_function, memory_by_computation);
+  return DefaultMemoryScheduler(computation, points_to_analysis, alias_analysis,
+                                size_function, memory_by_computation);
 }

 }  // namespace


 bug fix where ppitch and roll collision elements were stick existing even though markers were selected to be 2D

git-svn-id: 767549f2a3626ae39d79f5348867a3ebb5082aca@2094 c7283977-0100-402a-a91a-fa70b306dbfe

--- software/utils/visualization_utils/src/InteractableGlKinematicBody.hpp
+++ software/utils/visualization_utils/src/InteractableGlKinematicBody.hpp
@@ -217,6 +217,10 @@
    };
    void set_bodypose_adjustment_type(int type){
     bodypose_adjustment_type= (_bodyadjust_type)type;
+    _collision_detector_floatingbase_markers->clear_collision_objects(); // reset markers
+    _markers_collision_object_map.clear();
+    init_floatingbase_marker_collision_objects();
+    update_floatingbase_marker_collision_objects();
    }

    bool is_bodypose_adjustment_enabled()   {


INTEGRATION: CWS vgbugs07 (1.67.210); FILE MERGED 2007/06/04 13:29:31 vg 1.67.210.1: #i76605# Remove -I .../inc/module hack introduced by hedaburemove01

--- vcl/source/app/settings.cxx
+++ vcl/source/app/settings.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: settings.cxx,v $
  *
- *  $Revision: 1.69 $
+ *  $Revision: 1.70 $
  *
- *  last change: $Author: vg $ $Date: 2007-06-07 10:11:52 $
+ *  last change: $Author: hr $ $Date: 2007-06-27 20:01:56 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -44,30 +44,30 @@
 #endif

 #ifndef _SV_SVAPP_HXX
-#include <svapp.hxx>
+#include <vcl/svapp.hxx>
 #endif
 #ifndef _SV_SVDATA_HXX
-#include <svdata.hxx>
+#include <vcl/svdata.hxx>
 #endif
 #ifndef _SV_EVENT_HXX
-#include <event.hxx>
+#include <vcl/event.hxx>
 #endif
 #ifndef _SV_SETTINGS_HXX
-#include <settings.hxx>
+#include <vcl/settings.hxx>
 #endif

 #ifndef _VCL_I18NHELP_HXX
-#include <i18nhelp.hxx>
+#include <vcl/i18nhelp.hxx>
 #endif

 #ifndef _VCL_FONTCFG_HXX
 #include <fontcfg.hxx>
 #endif
 #ifndef VCL_INC_CONFIGSETTINGS_HXX
-#include <configsettings.hxx>
+#include <vcl/configsettings.hxx>
 #endif

-#include <unohelp.hxx>
+#include <vcl/unohelp.hxx>
 #ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
 #include <unotools/localedatawrapper.hxx>
 #endif


Forgotten printf removed

Forgotten printf removed

--- ITS/AliITSsimulationSDD.cxx
+++ ITS/AliITSsimulationSDD.cxx
@@ -750,10 +750,7 @@
     noise = res->GetNoise(i);
     gain = res->GetChannelGain(i);
     if(res->IsBad()) gain=0.;
-    if( res->IsChipBad(res->GetChip(i)) ){
-      printf("Chip bad mod %d  chip %d anode %d\n",mod,res->GetChip(i),i);
-      gain=0.;
-    }
+    if( res->IsChipBad(res->GetChip(i)) )gain=0.;
     for(k=0; k<fScaleSize*fMaxNofSamples; k++) {
       fInZR[k]  = fHitMap2->GetSignal(i,k);
       if(bAddGain) fInZR[k]*=gain;


LOG the effect of TF_GPU_ALLOCATOR

LOG the effect of TF_GPU_ALLOCATOR

Just for diagnostic purposes.  LOG(INFO) seems fine because normally
TF_GPU_ALLOCATOR won't be set.

PiperOrigin-RevId: 267176624

--- tensorflow/core/common_runtime/gpu/gpu_process_state.cc
+++ tensorflow/core/common_runtime/gpu/gpu_process_state.cc
@@ -125,9 +125,11 @@
     // If true, checks for memory overwrites by writing
     // distinctive patterns on both ends of allocated memory.
     if (useCudaMemoryGuardAllocator()) {
+      LOG(INFO) << "Using memory guard allocator for GPU.";
       gpu_allocator = new GPUDebugAllocator(gpu_allocator, platform_gpu_id);
       gpu_allocator = new GPUNanResetAllocator(gpu_allocator, platform_gpu_id);
     } else if (useCudaMallocAllocator()) {
+      LOG(INFO) << "Using CUDA malloc allocator for GPU.";
       // If true, passes all allocation requests through to cudaMalloc
       // useful for doing memory debugging with tools like cuda-memcheck
       // **WARNING** probably will not work in a multi-gpu scenario


Code cleanup

Code cleanup

--- ve/gpu/InstructionBatch.cpp
+++ ve/gpu/InstructionBatch.cpp
@@ -160,37 +160,42 @@

     // OK so we can accept the instruction
-    // Register unknow parameters
     for (size_t op = 0; op < operands.size(); ++op)
     {
-        if (opids[op]<0 || load_store[op])
+        // Assign new view id's
+        if (opids[op]<0 && inst->operand[op].base)
+        {
+            int i = op-1;
+            for (; i >= 0; --i)
+            {   //catch when same view is used twice within oparation and doesn't allready have an id
+                if (inst->operand[op].base == inst->operand[i].base &&
+                    sameView(inst->operand[op], inst->operand[i]))
+                {
+                    opids[op] = opids[i];
+                    if (op > 0 && i > 0) // both input
+                        load_store[op] = false;
+                    break;
+                }
+            }
+            if (opids[op] < 0)
+            {   // Unkwown view
+                opids[op] = views.size();
+                views.push_back(inst->operand[op]);
+            }
+        }
+
+        // Register new parameters and input / output variables
+        if (load_store[op])
         {
             KernelParameter* kp = operands[op];
             BaseArray* ba = dynamic_cast<BaseArray*>(kp);
             if (ba)
             {
-                int i = op-1;
-                for (; i >= 0; --i)
-                {   //catch when same view is used twice within oparation and doesn't allready have an id
-                    if (inst->operand[op].base == inst->operand[i].base &&
-                        sameView(inst->operand[op], inst->operand[i]))
-                    {
-                        opids[op] = opids[i];
-                        if (op > 0 && i > 0) // both input
-                            load_store[op] = false;
-                        break;
-                    }
-                }
-                if (opids[op] < 0)
-                {   // Unkwown view
-                    opids[op] = views.size();
-                    views.push_back(inst->operand[op]);
-                }
-                if (op == 0 && load_store[op])
+                if (op == 0)
                 {
                     output.insert(std::make_pair(ba, opids[op]));
                 }
-                else if (load_store[op])
+                else
                 {
                     input.insert(std::make_pair(ba, opids[op]));
                 }
@@ -230,7 +235,6 @@
         }
     }
     instructions.push_back(make_pair(inst, opids));
-
 }

 Kernel InstructionBatch::generateKernel(ResourceManager* resourceManager)


Add error handling for missing attributes in NodeDef. Change: 150663008

--- tensorflow/core/grappler/optimizers/layout_optimizer.cc
+++ tensorflow/core/grappler/optimizers/layout_optimizer.cc
@@ -134,16 +134,17 @@
   NodeProcessor(GraphDef* graph, NodeDef* node, NodeMap* node_map)
       : graph_(graph), node_(node), node_map_(node_map) {}
   virtual ~NodeProcessor() {}
-  virtual void ConvertNode() {
+  virtual Status ConvertNode() {
     if (ShouldProcess()) {
       UpdateAttrDataFormat();
       UpdateAttrKSize();
       UpdateAttrStrides();
       UpdateAttrShape();
-      AddLayoutTransposeToInputs();
-      AddLayoutTransposeToOutputs();
-      CustomizedProcessing();
-    }
+      TF_RETURN_IF_ERROR(AddLayoutTransposeToInputs());
+      TF_RETURN_IF_ERROR(AddLayoutTransposeToOutputs());
+      TF_RETURN_IF_ERROR(CustomizedProcessing());
+    }
+    return Status::OK();
   }

  protected:
@@ -171,6 +172,14 @@
   bool HasOutputs() const {
     auto outputs = node_map_->GetOutputs(node_->name());
     return !outputs.empty();
+  }
+
+  Status HasAttribute(const NodeDef& node, const string& attr) const {
+    if (node.attr().find(attr) == node.attr().end()) {
+      return Status(error::INVALID_ARGUMENT,
+                    strings::StrCat("Missing attribute ", attr));
+    }
+    return Status::OK();
   }

   virtual bool ShouldProcess() const {
@@ -218,8 +227,9 @@
     }
   }

-  void UpdateAttrValue(const string& name) {
+  Status UpdateAttrValue(const string& name) {
     NodeDef* node = node_map_->GetNode(name);
+    TF_RETURN_IF_ERROR(HasAttribute(*node, "value"));
     Tensor tensor;
     auto success =
         tensor.FromProto(node->mutable_attr()->at({"value"}).tensor());
@@ -232,6 +242,7 @@
     tensor.flat<int>()(1) = c;
     tensor.AsProtoTensorContent(
         node->mutable_attr()->at({"value"}).mutable_tensor());
+    return Status::OK();
   }

   virtual std::vector<int> GetInputPos() const {
@@ -270,13 +281,15 @@
     node->mutable_attr()->insert({"_output_shapes", attr_output_shape});
   }

-  virtual void AddLayoutTransposeToInputs() {
+  virtual Status AddLayoutTransposeToInputs() {
     std::vector<int> input_pos = GetInputPos();
     for (const auto& pos : input_pos) {
       string node_name_NHWCToNCHW = strings::StrCat(
           kTransposeNHWCToNCHW, "-", node_->name(), "-", node_->input(pos));
       auto input_node = node_map_->GetNode(node_->input(pos));
       int output_pos = NodePosition(node_->input(pos));
+      TF_RETURN_IF_ERROR(HasAttribute(*node_, "T"));
+      TF_RETURN_IF_ERROR(HasAttribute(*input_node, "_output_shapes"));
       AddNodeTranspose(
           node_name_NHWCToNCHW, node_->input(pos), node_->attr().at("T").type(),
           input_node->attr().at("_output_shapes").list().shape(output_pos),
@@ -286,9 +299,10 @@
       node_map_->AddOutput(node_name_NHWCToNCHW, node_->name());
       *node_->mutable_input(pos) = node_name_NHWCToNCHW;
     }
-  }
-
-  virtual void AddLayoutTransposeToOutputs() {
+    return Status::OK();
+  }
+
+  virtual Status AddLayoutTransposeToOutputs() {
     auto outputs = node_map_->GetOutputs(node_->name());
     for (const auto& output : outputs) {
       string node_name_NCHWToNHWC = strings::StrCat(
@@ -299,6 +313,8 @@
                                return input.compare(node_->name()) == 0;
                              });
       int output_pos = NodePosition(*it);
+      TF_RETURN_IF_ERROR(HasAttribute(*node_, "T"));
+      TF_RETURN_IF_ERROR(HasAttribute(*node_, "_output_shapes"));
       AddNodeTranspose(
           node_name_NCHWToNHWC, node_->name(), node_->attr().at("T").type(),
           node_->attr().at("_output_shapes").list().shape(output_pos), false);
@@ -307,9 +323,10 @@
                               node_name_NCHWToNHWC);
       node_map_->AddOutput(node_name_NCHWToNHWC, output->name());
     }
-  }
-
-  virtual void CustomizedProcessing() {}
+    return Status::OK();
+  }
+
+  virtual Status CustomizedProcessing() { return Status::OK(); }

   GraphDef* graph_;
   NodeDef* node_;
@@ -336,7 +353,9 @@
     std::vector<int> input_pos = {1};
     return input_pos;
   }
-  void CustomizedProcessing() override { UpdateAttrValue(node_->input(0)); }
+  Status CustomizedProcessing() override {
+    return UpdateAttrValue(node_->input(0));
+  }
 };

 class BiasAddGradProcessor : public NodeProcessor {
@@ -355,7 +374,7 @@
     return false;
   }

-  void AddLayoutTransposeToOutputs() override {}
+  Status AddLayoutTransposeToOutputs() override { return Status::OK(); }
 };

 class Conv2DBackpropFilterProcessor : public NodeProcessor {
@@ -370,7 +389,7 @@
     return input_pos;
   }

-  void AddLayoutTransposeToOutputs() override {}
+  Status AddLayoutTransposeToOutputs() override { return Status::OK(); }
   // No need to update output shape, as it is always of shape
   // [filter_height, filter_width, in_channels, out_channels], regardless of
   // whether NCHW or NHWC is used.
@@ -388,7 +407,9 @@
     std::vector<int> input_pos = {2};
     return input_pos;
   }
-  void CustomizedProcessing() override { UpdateAttrValue(node_->input(0)); }
+  Status CustomizedProcessing() override {
+    return UpdateAttrValue(node_->input(0));
+  }
 };

 class FusedBatchNormGradProcessor : public NodeProcessor {
@@ -537,19 +558,17 @@
     node->mutable_attr()->insert({"T", attr_type_params});
   }

-  void CustomizedProcessing() override {
+  Status CustomizedProcessing() override {
     if (is_4d_with_vector_) {
       string suffix = strings::StrCat("-", node_->name(), "-", node_->input(1));
       string reshape_node_name = strings::StrCat(kReshapeNHWCToNCHW, suffix);
       string shape_const_node_name = strings::StrCat(kReshapeConst, suffix);
-      int vector_size = node_map_->GetNode(node_->input(1))
-                            ->attr()
-                            .at("_output_shapes")
-                            .list()
-                            .shape(0)
-                            .dim(0)
-                            .size();
+      auto input_node = node_map_->GetNode(node_->input(1));
+      TF_RETURN_IF_ERROR(HasAttribute(*input_node, "_output_shapes"));
+      int vector_size =
+          input_node->attr().at("_output_shapes").list().shape(0).dim(0).size();
       AddNodeShapeConst(shape_const_node_name, vector_size);
+      TF_RETURN_IF_ERROR(HasAttribute(*node_, "T"));
       AddNodeReshape(reshape_node_name, node_->input(1), shape_const_node_name,
                      node_->attr().at("T").type());
       node_map_->AddOutput(shape_const_node_name, reshape_node_name);
@@ -558,6 +577,7 @@
       node_map_->AddOutput(reshape_node_name, node_->name());
       *node_->mutable_input(1) = reshape_node_name;
     }
+    return Status::OK();
   }

  private:
@@ -591,9 +611,10 @@
     return input_pos;
   }

-  void CustomizedProcessing() override {
+  Status CustomizedProcessing() override {
     node_map_->AddOutput(kConcatConst, node_->name());
     *node_->mutable_input(axis_node_pos_) = kConcatConst;
+    return Status::OK();
   }

   bool IsAlongDimC() const {
@@ -627,11 +648,12 @@
       : AgnosticNodeProcessor(graph, node, node_map) {}

  protected:
-  void CustomizedProcessing() override {
+  Status CustomizedProcessing() override {
     // Skip the first input, which is the data to be sliced.
     for (int i = 1; i < node_->input_size(); i++) {
       string node_name_NHWCToNCHW =
           strings::StrCat(kPermVecNHWCToNCHW, "-", node_->name(), "-input", i);
+      TF_RETURN_IF_ERROR(HasAttribute(*node_, "Index"));
       AddNodePermVec(node_name_NHWCToNCHW, node_->input(i),
                      node_->attr().at("Index").type(), true);
       node_map_->UpdateOutput(node_->input(i), node_->name(),
@@ -639,6 +661,7 @@
       node_map_->AddOutput(node_name_NHWCToNCHW, node_->name());
       *node_->mutable_input(i) = node_name_NHWCToNCHW;
     }
+    return Status::OK();
   }

  private:
@@ -671,7 +694,7 @@
       : AgnosticNodeProcessor(graph, node, node_map) {}

  protected:
-  void CustomizedProcessing() override {
+  Status CustomizedProcessing() override {
     auto maybe_concatoffset_node =
         node_map_->GetNode(NodeName(node_->input(1)));
     if (maybe_concatoffset_node->op() == "ConcatOffset") {
@@ -680,12 +703,14 @@
       // NHWC format is being used. As mutiple Slice nodes may share the same
       // ConcatOffset node, the NHWC to NCHW conversion may have already
       // been performed when processing other Slice nodes.
+      TF_RETURN_IF_ERROR(HasAttribute(*axis_node, "value"));
       if (axis_node->attr().at("value").tensor().int_val(0) == 3) {
         for (int i = 1; i < maybe_concatoffset_node->input_size(); i++) {
           auto shape_node =
               node_map_->GetNode(maybe_concatoffset_node->input(i));
           AttrValue attr_tensor;
           Tensor tensor;
+          TF_RETURN_IF_ERROR(HasAttribute(*shape_node, "value"));
           CHECK(tensor.FromProto(shape_node->attr().at({"value"}).tensor()));
           int h = tensor.flat<int>()(1);
           int w = tensor.flat<int>()(2);
@@ -702,6 +727,7 @@
                                                                              1);
       }
     }
+    return Status::OK();
   }
 };

@@ -716,7 +742,7 @@
            IsInputConvertible() && IsAlongDimHW();
   }

-  void AddLayoutTransposeToOutputs() override {}
+  Status AddLayoutTransposeToOutputs() override { return Status::OK(); }

   bool IsInputConvertible() const {
     auto input = node_map_->GetNode(node_->input(0));
@@ -745,10 +771,12 @@
     return false;
   }

-  void CustomizedProcessing() override {
+  Status CustomizedProcessing() override {
+    TF_RETURN_IF_ERROR(HasAttribute(*node_, "squeeze_dims"));
     auto list = node_->mutable_attr()->at("squeeze_dims").mutable_list();
     list->set_i(0, 2);
     list->set_i(1, 3);
+    return Status::OK();
   }
 };

@@ -765,11 +793,12 @@
            IsAlongDimNHW();
   }

-  void AddLayoutTransposeToOutputs() override {}
-
-  void CustomizedProcessing() override {
+  Status AddLayoutTransposeToOutputs() override { return Status::OK(); }
+
+  Status CustomizedProcessing() override {
     node_map_->AddOutput(kReductionConst, node_->name());
     *node_->mutable_input(1) = kReductionConst;
+    return Status::OK();
   }

  private:
@@ -798,12 +827,15 @@
 class DataLayoutOptimizer {
  public:
   explicit DataLayoutOptimizer(GraphDef* graph)
-      : graph_(graph), node_map_(graph_) {
+      : graph_(graph), node_map_(graph_) {}
+
+  Status Optimize() {
     LOG(INFO) << "Number of nodes for original graph: " << graph_->node_size();
-    Expand();
+    TF_RETURN_IF_ERROR(Expand());
     LOG(INFO) << "Number of nodes after Expand: " << graph_->node_size();
-    Collapse();
+    TF_RETURN_IF_ERROR(Collapse());
     LOG(INFO) << "Number of nodes after Collapse: " << graph_->node_size();
+    return Status::OK();
   }

  private:
@@ -860,7 +892,7 @@
   }

   // Expand all nodes which is in NHWC, but supports NCHW or is layout agnostic.
-  void Expand() {
+  Status Expand() {
     int node_size_original = graph_->node_size();
     // This is the first pass where we expand the nodes which support NCHW.
     std::set<string> ops_format_supported = GetOpsFormatSupported();
@@ -890,7 +922,7 @@
         } else {
           node_processor.reset(new NodeProcessor(graph_, node, &node_map_));
         }
-        node_processor->ConvertNode();
+        TF_RETURN_IF_ERROR(node_processor->ConvertNode());
       }
     }

@@ -934,15 +966,16 @@
             node_processor.reset(
                 new AgnosticNodeProcessor(graph_, node, &node_map_));
           }
-          node_processor->ConvertNode();
+          TF_RETURN_IF_ERROR(node_processor->ConvertNode());
         }
       }
     }
+    return Status::OK();
   }

   // Remove all node pairs, where a NCHW-to-NHWC node is followed by
   // a NHWC-to-NCHW node.
-  void Collapse() {
+  Status Collapse() {
     std::unordered_set<string> nodes_removable;
     for (int i = 0; i < graph_->node_size(); i++) {
       auto node = graph_->mutable_node(i);
@@ -974,6 +1007,7 @@
               return nodes_removable.find(node.name()) != nodes_removable.end();
             }),
         graph_->mutable_node()->end());
+    return Status::OK();
   }

   GraphDef* graph_;
@@ -984,7 +1018,11 @@
                                  GraphDef* output) {
   *output = item.graph;
   DataLayoutOptimizer layout_optimizer(output);
-  return Status::OK();
+  auto status = layout_optimizer.Optimize();
+  if (!status.ok()) {
+    *output = item.graph;
+  }
+  return status;
 }

 void LayoutOptimizer::Feedback(Cluster* cluster, const GrapplerItem& item,


Remove memory leak from camera

Remove memory leak from camera

--- viewer/primitives/camera.cc
+++ viewer/primitives/camera.cc
@@ -22,6 +22,7 @@
   const cv::Mat image(HEIGHT, WIDTH, IM_CV_TYPE, out_data);
   cv::Mat flipped;
   cv::flip(image, flipped, 0);
+  delete out_data;
   return flipped;
 }


Prevent crash/heap OOB due to integer conversion to unsigned in NMS kernels

PiperOrigin-RevId: 387938262
Change-Id: Id361a715307e7179977cf5c64391c199a966f2ad

--- tensorflow/core/kernels/image/non_max_suppression_op.cc
+++ tensorflow/core/kernels/image/non_max_suppression_op.cc
@@ -169,6 +169,8 @@
                            bool pad_to_max_output_size = false,
                            int* ptr_num_valid_outputs = nullptr) {
   const int output_size = max_output_size.scalar<int>()();
+  OP_REQUIRES(context, output_size >= 0,
+              errors::InvalidArgument("output size must be non-negative"));

   std::vector<T> scores_data(num_boxes);
   std::copy_n(scores.flat<T>().data(), num_boxes, scores_data.begin());
@@ -768,6 +770,9 @@
         context, scores, num_boxes, max_output_size, iou_threshold_val,
         score_threshold_val, dummy_soft_nms_sigma, similarity_fn,
         return_scores_tensor_, pad_to_max_output_size_, &num_valid_outputs);
+    if (!context->status().ok()) {
+      return;
+    }

     // Allocate scalar output tensor for number of indices computed.
     Tensor* num_outputs_t = nullptr;
@@ -845,6 +850,9 @@
         context, scores, num_boxes, max_output_size, iou_threshold_val,
         score_threshold_val, soft_nms_sigma_val, similarity_fn,
         return_scores_tensor_, pad_to_max_output_size_, &num_valid_outputs);
+    if (!context->status().ok()) {
+      return;
+    }

     // Allocate scalar output tensor for number of indices computed.
     Tensor* num_outputs_t = nullptr;


Xref change holding reference could crash

The gh-352 change, unintentionally introduced a reference to the endpoint
when should have been a copy, consequently those endpoints could become
invalid and sequently cause a core on access. This would tend to happen
when a client already had a few previous connections to a dafilesrv,
but where the original connection (CRemoteFile) had been destroyed along
with it's endpoint.

Signed-off-by: Jake Smith <b20121000db38205734e8ca1c74fe9668b08552a@lexisnexis.com>

--- common/remote/sockfile.cpp
+++ common/remote/sockfile.cpp
@@ -1479,7 +1479,7 @@
 class CEndpointCS : public CriticalSection, public CInterface
 {
     CCritTable &table;
-    const SocketEndpoint &ep;
+    const SocketEndpoint ep;
 public:
     CEndpointCS(CCritTable &_table, const SocketEndpoint &_ep) : table(_table), ep(_ep) { }
     const void *queryFindParam() const { return &ep; }


More MHA_Error unit tests.

More MHA_Error unit tests.

--- mha/libmha/src/mha_error_unit_tests.cpp
+++ mha/libmha/src/mha_error_unit_tests.cpp
@@ -1,7 +1,7 @@
 #include "mha_error.hh"
 #include <gtest/gtest.h>

-TEST(mha_error, helper_function_digits_computes_correct_number_of_decimal_digits)
+TEST(MHA_Error, helper_function_digits_computes_correct_number_of_decimal_digits)
 {
   using mha_error_helpers::digits;
   EXPECT_EQ(1U, digits(0U));
@@ -12,3 +12,9 @@
   EXPECT_EQ(3U, digits(100U));
   EXPECT_EQ(10U, digits(4294967295U));
 }
+
+TEST(MHA_Error, MHA_Error_is_a_subclass_of_std_exception) {
+  MHA_Error error_instance("",0,"");
+  std::exception * std_exception_pointer = &error_instance;
+  EXPECT_NE(nullptr, std_exception_pointer);
+}


thread_test/main.cxx: Use %ls and wchar_t string literal.

--- tests/thread_test/main.cxx
+++ tests/thread_test/main.cxx
@@ -41,8 +41,8 @@
             sleep(0, 75 * MILLIS_TO_NANOS);
             LOG4CPLUS_INFO_FMT(logger,
                 LOG4CPLUS_TEXT (
-                    "Actually doing something...%d, %d, %d...DONE"),
-                1, 2, 3);
+                    "Actually doing something...%d, %d, %d, %ls...DONE"),
+                1, 2, 3, L"testing");
         }
         log4cplus::thread::yield();
     }


Bug fix

Bug fix

--- entrypoint.cpp
+++ entrypoint.cpp
@@ -30,7 +30,7 @@
 #include "jansson/jansson.h"

 #include "entrypoint.h"
-#define DEBUG_DRIVER (0)
+#define DEBUG_DRIVER (1)

 char *driver_name ;
 void* acquisition_thread( void *params ) ;
@@ -188,9 +188,10 @@
                 case BLADERF_FPGA_UNKNOWN: continue;
                 }
                 rc = bladerf_load_fpga( tmp->bladerf_device, fpgaFile  );
-                if( rc == 0 ) {
+                if( rc != 0 ) {
                     continue ;
                 }
+
             }
         }
         sem_init(&tmp->mutex, 0, 0);
@@ -551,6 +552,7 @@
  * @return
  */
 LIBRARY_API int setRxSampleRate( int device_id , int sample_rate) {
+    int rc ;
     if( DEBUG_DRIVER ) fprintf(stderr,"%s(%d,%d)\n", __func__, device_id,sample_rate);
     if( device_id >= device_count )
         return(RC_NOK);
@@ -560,9 +562,13 @@
         return(RC_OK);
     }

-    bladerf_set_sample_rate( dev->bladerf_device, BLADERF_MODULE_RX,
+    rc = bladerf_set_sample_rate( dev->bladerf_device, BLADERF_MODULE_RX,
                              sample_rate,
                              &dev->current_sample_rate);
+    if( rc != 0 ) {
+        fprintf( stderr, "%f(%d) error rc=%d\n", __func__, sample_rate, rc );
+        return( RC_NOK );
+    }

     unsigned int filter ;
     for( int f=0 ; f < dev->rates->enum_length ; f++ ) {
@@ -713,40 +719,41 @@
     if( rc != 0 ) {
         goto cmd_calibrate_err;
     }
-    rc = bladerf_enable_module( bladerf_device, BLADERF_MODULE_RX, true);
-    if (rc != 0) {
-        fprintf( stderr,"doCalibrate failed bladerf_enable_module BLADERF_MODULE_RX: %s\n",  bladerf_strerror(rc));
-        goto cmd_calibrate_err;
-    }
-
-    /* Calibrate LPF Tuning Module */
+
+
+    // Calibrate LPF Tuning Module
     rc = bladerf_calibrate_dc( bladerf_device, BLADERF_DC_CAL_LPF_TUNING);
     if (rc != 0) {
         fprintf( stderr,"doCalibrate failed bladerf_calibrate_dc: %s\n",  bladerf_strerror(rc));
         goto cmd_calibrate_err;
     }

-    /* Calibrate TX LPF Filter */
+    // Calibrate TX LPF Filter
     rc = bladerf_calibrate_dc( bladerf_device, BLADERF_DC_CAL_TX_LPF);
     if (rc != 0) {
         fprintf( stderr,"doCalibrate failed bladerf_calibrate_dc: %s\n",  bladerf_strerror(rc));
         goto cmd_calibrate_err;
     }

-    /* Calibrate RX LPF Filter */
+    // Calibrate RX LPF Filter
     rc = bladerf_calibrate_dc( bladerf_device, BLADERF_DC_CAL_RX_LPF);
     if (rc != 0) {
         fprintf( stderr,"doCalibrate failed bladerf_calibrate_dc: %s\n",  bladerf_strerror(rc));
         goto cmd_calibrate_err;
     }

-    /* Calibrate RX VGA2 */
+    // Calibrate RX VGA2
     rc = bladerf_calibrate_dc( bladerf_device, BLADERF_DC_CAL_RXVGA2);
     if (rc != 0) {
         fprintf( stderr, "doCalibrate failed bladerf_calibrate_dc: %s\n",  bladerf_strerror(rc));
         goto cmd_calibrate_err;
     }
     //-------------------------
+
+    if (rc != 0) {
+        fprintf( stderr,"doCalibrate failed bladerf_enable_module BLADERF_MODULE_RX: %s\n",  bladerf_strerror(rc));
+        goto cmd_calibrate_err;
+    }

     bladerf_set_lpf_mode( bladerf_device, BLADERF_MODULE_RX, BLADERF_LPF_NORMAL);
     /* Configure the device's RX module for use with the sync interface.


Fixed Potential Read/Write Bug

Fixed Potential Read/Write Bug

--- JPQLib/JPQLib/JPQFile.cpp
+++ JPQLib/JPQLib/JPQFile.cpp
@@ -404,7 +404,7 @@
             uint64 originalSize;
             uint32 archiveMask;

-            fread(&filePosition, JPQ_DEFAULT_FILE_POSITION_SIZE_IN_BYTES, 1, _jpqFile);
+            fread(&filePosition, _filePositionSizeInBytes, 1, _jpqFile);
             fseek(_jpqFile, filePosition, SEEK_SET);
             fread(&archiveSize, sizeof(archiveSize), 1, _jpqFile);
             fread(&originalSize, sizeof(originalSize), 1, _jpqFile);


Adapt adding task in JPetManager to multiple subtasks version

--- JPetManager/JPetManager.cpp
+++ JPetManager/JPetManager.cpp
@@ -151,7 +151,7 @@
     // wrap the JPetUserTask-based task in a JPetTaskIO
     fTaskGeneratorChain->push_back( [name, inputFileType, outputFileType, userTaskGen]() {
 	JPetTaskIO * task = new JPetTaskIO(name, inputFileType, outputFileType);
-	task->setSubTask(std::unique_ptr<JPetTaskInterface>(userTaskGen()));
+	task->addSubTask(std::unique_ptr<JPetTaskInterface>(userTaskGen()));
 	return task;
       });
   }else{


test: fixing test for v6 only environments (#18593)

Commit Message: n/a
Additional Description: n/a
Risk Level: n/a
Testing: manually tested with [1]
Signed-off-by: Alyssa Wilk <b9253d1ec9cc3e9d2aab68d288ba3dab3452adf6@chromium.org>

--- test/common/quic/client_connection_factory_impl_test.cc
+++ test/common/quic/client_connection_factory_impl_test.cc
@@ -17,13 +17,12 @@
 namespace Envoy {
 namespace Quic {

-class QuicNetworkConnectionTest : public Event::TestUsingSimulatedTime, public testing::Test {
+class QuicNetworkConnectionTest : public Event::TestUsingSimulatedTime,
+                                  public testing::TestWithParam<Network::Address::IpVersion> {
 protected:
   void initialize() {
-    test_address_ = Network::Utility::resolveUrl(absl::StrCat(
-        "tcp://",
-        Network::Test::getLoopbackAddressString(TestEnvironment::getIpVersionsForTest()[0]),
-        ":30"));
+    test_address_ = Network::Utility::resolveUrl(
+        absl::StrCat("tcp://", Network::Test::getLoopbackAddressUrlString(GetParam()), ":30"));
     Ssl::ClientContextSharedPtr context{new Ssl::MockClientContext()};
     EXPECT_CALL(context_.context_manager_, createSslClientContext(_, _, _))
         .WillOnce(Return(context));
@@ -49,7 +48,7 @@
   QuicStatNames quic_stat_names_{store_.symbolTable()};
 };

-TEST_F(QuicNetworkConnectionTest, BufferLimits) {
+TEST_P(QuicNetworkConnectionTest, BufferLimits) {
   initialize();

   quic::QuicConfig config;
@@ -68,5 +67,7 @@
   client_connection->close(Network::ConnectionCloseType::NoFlush);
 }

+INSTANTIATE_TEST_SUITE_P(IpVersions, QuicNetworkConnectionTest,
+                         testing::ValuesIn(TestEnvironment::getIpVersionsForTest()));
 } // namespace Quic
 } // namespace Envoy


cosmetic: rename vars and reformat.

cosmetic: rename vars and reformat.

--- chebyshev_pseudospectral/src/ChebyshevDifferentiate.cpp
+++ chebyshev_pseudospectral/src/ChebyshevDifferentiate.cpp
@@ -87,21 +87,21 @@
 /// and \f$\qquad a_{N+1}^{(1)} = a_{N+2}^{(1)} = 0, \quad a_{N}^{(2)} = a_{N+1}^{(2)} = 0\f$

 void spectral_differentiate(size_t n,
-                            Eigen::Ref<RowVectorXd> data,
-                            Eigen::Ref<RowVectorXd> rslt,
+                            Eigen::Ref<RowVectorXd> in,
+                            Eigen::Ref<RowVectorXd> out,
                             double span)
 {
-    double temp1 = data[n-1],
-           temp2 = data[n-2];
+    double temp1 = in[n-1],
+           temp2 = in[n-2];

-    rslt[n-1] = 2.0*n*span*data[n];
-    rslt[n-2] = 2.0*(n-1)*span*temp1;
+    out[n-1] = 2.0 *  n    * in[n] * span;
+    out[n-2] = 2.0 * (n-1) * temp1 * span;
     for (size_t j = n-3; j>0; j--) {
-        temp1   = data[j];
-        rslt[j] = rslt[j+2]+2.0*(j+1)*span*temp2;
-        temp2   = temp1;
+        temp1  = in[j];
+        out[j] = out[j+2] + 2.0 * (j+1) * temp2 * span;
+        temp2  = temp1;
     }
-    rslt[0] = 0.5*rslt[2]+span*temp2;
-    rslt[n] = 0.0;
+    out[0] = 0.5 * out[2] + temp2 * span;
+    out[n] = 0.0;
 }


Fix ChromeOS build (one missing #include).

TBR=brettw

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

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

Former-commit-id: 9a6d117dd34944e12786acf6f361d049d934b4d4

--- chrome/browser/chromeos/options/language_config_view.cc
+++ chrome/browser/chromeos/options/language_config_view.cc
@@ -19,6 +19,7 @@
 #include "chrome/browser/chromeos/preferences.h"
 #include "chrome/browser/language_combobox_model.h"
 #include "chrome/browser/pref_service.h"
+#include "chrome/browser/profile.h"
 #include "chrome/browser/views/restart_message_box.h"
 #include "chrome/common/notification_type.h"
 #include "chrome/common/pref_names.h"


Fixed enum class style, changed using to typedef keyword.

--- transaction/Transaction.hpp
+++ transaction/Transaction.hpp
@@ -33,15 +33,15 @@
 /**
  * @brief Type that represents id of a transaction.
  **/
-using transaction_id = std::uint64_t;
+typedef std::uint64_t transaction_id;

 /**
  * @brief Enum class for transaction internal status.
  **/
 enum class TransactionStatus {
-  kRUNNING = 0,
-  kABORTED,
-  kCOMMITTED
+  kRunning = 0,
+  kAborted,
+  kCommitted
 };

 /**


Avoid closing speech input UI bubble twice.

Some Mac OS Leopard versions were affected by a bug caused by trying to close a speech UI bubble that was being already closed.
It has been checked in all platforms that the bubble is closed before calling the focus lose event, making it unnecesary to close it again.

BUG=70251
TEST=none

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

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

--- chrome/browser/speech/speech_input_bubble_controller.cc
+++ chrome/browser/speech/speech_input_bubble_controller.cc
@@ -201,7 +201,6 @@

   int old_bubble_caller_id = current_bubble_caller_id_;
   current_bubble_caller_id_ = 0;
-  bubbles_[old_bubble_caller_id]->Hide();

   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,


DevTools: Only enable dev tools for dev tools if process-per-tab flag is set. At the same time, allow it in release mode as well.
BUG=27252

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

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

--- chrome/browser/tab_contents/render_view_context_menu.cc
+++ chrome/browser/tab_contents/render_view_context_menu.cc
@@ -778,8 +778,9 @@
 #else
   bool debug_mode = true;
 #endif
-  // Don't inspect inspector, new tab UI, etc.
-  if (active_entry->url().SchemeIs(chrome::kChromeUIScheme) && !debug_mode)
+  // Don't inspect new tab UI, etc.
+  if (active_entry->url().SchemeIs(chrome::kChromeUIScheme) && !debug_mode &&
+      active_entry->url().host() != chrome::kChromeUIDevToolsHost)
     return false;

   // Don't inspect about:network, about:memory, etc.
@@ -789,10 +790,16 @@
       !LowerCaseEqualsASCII(active_entry->virtual_url().path(), "blank"))
     return false;

-  // Don't enable the web inspector if JavaScript is disabled
   if (id == IDS_CONTENT_CONTEXT_INSPECTELEMENT) {
+    // Don't enable the web inspector if JavaScript is disabled.
     if (!profile_->GetPrefs()->GetBoolean(prefs::kWebKitJavascriptEnabled) ||
         command_line.HasSwitch(switches::kDisableJavaScript))
+      return false;
+    // Don't enable the web inspector on web inspector if there is no process
+    // per tab flag set.
+    if (active_entry->url().SchemeIs(chrome::kChromeUIScheme) &&
+        active_entry->url().host() == chrome::kChromeUIDevToolsHost &&
+        !command_line.HasSwitch(switches::kProcessPerTab))
       return false;
   }


Revert "[TDF] Allow to SnapShot also when multiple files in input are considered"

This reverts commit e884c501992b83906b9635105bba5c4655ff700e.

--- tree/treeplayer/inc/ROOT/TDFInterface.hxx
+++ tree/treeplayer/inc/ROOT/TDFInterface.hxx
@@ -281,7 +281,7 @@
       std::stringstream snapCall;
       // build a string equivalent to
       // "reinterpret_cast</nodetype/*>(this)->Snapshot<Ts...>(treename,filename,*reinterpret_cast<ColumnNames_t*>(&bnames))"
-      snapCall << "if (gROOTMutex) gROOTMutex->UnLock(); ((" << GetNodeTypeName() << "*)" << this << ")->Snapshot<";
+      snapCall << "((" << GetNodeTypeName() << "*)" << this << ")->Snapshot<";
       bool first = true;
       for (auto &b : bnames) {
          if (!first) snapCall << ", ";
@@ -1084,23 +1084,16 @@
          throw std::runtime_error(err_msg.c_str());
       }

-      auto df = GetDataFrameChecked();
-      auto inputTree = df->GetTree();
-
       if (!ROOT::IsImplicitMTEnabled()) {
          std::unique_ptr<TFile> ofile(TFile::Open(filenameInt.c_str(), "RECREATE"));
          TTree t(treenameInt.c_str(), treenameInt.c_str());

          bool FirstEvent = true;
-         auto fillTree = [&t, &bnames, &FirstEvent, &inputTree](Args &... args) {
+         auto fillTree = [&t, &bnames, &FirstEvent](Args &... args) {
             if (FirstEvent) {
                // hack to call TTree::Branch on all variadic template arguments
                std::initializer_list<int> expander = {(t.Branch(bnames[S].c_str(), &args), 0)..., 0};
                (void)expander; // avoid unused variable warnings for older compilers such as gcc 4.9
-               // We need this in case we have multiple input file to rotate the pointers
-               // associated to the branches. This is in ROOT since forever to allow cloning of
-               // TChains and here, de facto, we are doing a clone.
-               inputTree->AddClone(&t);
                FirstEvent = false;
             }
             t.Fill();
@@ -1109,17 +1102,16 @@
          Foreach(fillTree, {bnames[S]...});
          t.Write();
       } else {
+         auto df = GetDataFrameChecked();
          unsigned int nSlots = df->GetNSlots();
-         TBufferMerger merger (filenameInt.c_str(), "RECREATE");
+         TBufferMerger merger(filenameInt.c_str(), "RECREATE");
          std::vector<std::shared_ptr<TBufferMergerFile>> files(nSlots);
          std::vector<TTree *> trees(nSlots);

          auto fillTree = [&](unsigned int slot, Args &... args) {
-            R__LOCKGUARD(gROOTMutex);
             if (!trees[slot]) {
                files[slot] = merger.GetFile();
                trees[slot] = new TTree(treenameInt.c_str(), treenameInt.c_str());
-               // FIXME Here the tree needs to be added to the list of clones of the right chain
                trees[slot]->ResetBit(kMustCleanup);
                // hack to call TTree::Branch on all variadic template arguments
                std::initializer_list<int> expander = {(trees[slot]->Branch(bnames[S].c_str(), &args), 0)..., 0};


Changed ints to size_ts to make errors go away (Issue #45)

--- test/unit/math/prim/mat/prob/vector_rng_test_helper.hpp
+++ test/unit/math/prim/mat/prob/vector_rng_test_helper.hpp
@@ -512,7 +512,7 @@
       // Generated expected number of counts of transformed random variable
       std::vector<double> epmf;
       double total = 0.0;
-      for (int n = 0; n < rig.test_points_.size(); ++n) {
+      for (size_t n = 0; n < rig.test_points_.size(); ++n) {
         double e
             = rig.N_
               * rig.pmf(rig.test_points_[n], p1_vec[m], p2_vec[m], p3_vec[m]);
@@ -524,9 +524,9 @@
       // Generate samples of transformed random variable
       std::map<int, int> count_map;
       int remainder = 0;
-      for (int n = 0; n < rig.test_points_.size(); ++n)
+      for (size_t n = 0; n < rig.test_points_.size(); ++n)
         count_map[rig.test_points_[n]] = 0;
-      for (int n = 0; n < samples_to_test.size(); ++n) {
+      for (size_t n = 0; n < samples_to_test.size(); ++n) {
         int sample = samples_to_test[n];
         if (count_map.find(sample) != count_map.end()) {
           count_map[sample] += 1;
@@ -537,7 +537,7 @@

       // Transform to vector
       std::vector<int> counts;
-      for (int n = 0; n < rig.test_points_.size(); ++n) {
+      for (size_t n = 0; n < rig.test_points_.size(); ++n) {
         counts.push_back(count_map[rig.test_points_[n]]);
       }
       counts.push_back(remainder);
@@ -545,7 +545,7 @@
       // Trim the zero probability outputs
       std::vector<int> counts_trimmed;
       std::vector<double> epmf_trimmed;
-      for (int n = 0; n < counts.size(); ++n) {
+      for (size_t n = 0; n < counts.size(); ++n) {
         if (epmf[n] > 0.0) {
           counts_trimmed.push_back(counts[n]);
           epmf_trimmed.push_back(epmf[n]);


Added first draft of ContentSizePolicy support to HTTPResponse

--- Library/Sources/Stroika/Frameworks/WebServer/HTTPResponse.cpp
+++ Library/Sources/Stroika/Frameworks/WebServer/HTTPResponse.cpp
@@ -71,7 +71,7 @@

 void	HTTPResponse::SetContentSizePolicy (ContentSizePolicy csp, uint64_t size)
 {
-	Require (fState_ == eExact_CSP);
+	Require (csp == eExact_CSP);
 	Require (fState_ == eInProgress);
 	fContentSizePolicy_ = csp;
 	fContentSize_ = size;


satisfied cpplint for test

satisfied cpplint for test

--- test/unit/math/rev/mat/prob/normal_id_glm_lpdf_test.cpp
+++ test/unit/math/rev/mat/prob/normal_id_glm_lpdf_test.cpp
@@ -1,20 +1,14 @@
 #include <stan/math/rev/mat.hpp>
 #include <gtest/gtest.h>
 #include <stan/math/prim/scal/fun/value_of.hpp>
-#include <chrono>

 using stan::math::var;
 using Eigen::Dynamic;
 using Eigen::Matrix;

-typedef std::chrono::high_resolution_clock::time_point TimeVar;
-#define duration(a) std::chrono::duration_cast<std::chrono::microseconds>(a).count()
-#define timeNow() std::chrono::high_resolution_clock::now()
-
 //  We check that the values of the new regression match those of one built
 //  from existing primitives.
-TEST(ProbDistributionsNormalIdGLM, glm_matches_normal_id_doubles)
-{
+TEST(ProbDistributionsNormalIdGLM, glm_matches_normal_id_doubles) {
   Matrix<int, Dynamic, 1> n(3, 1);
   n << 51, 32, 12;
   Matrix<double, Dynamic, Dynamic> x(3, 2);
@@ -38,20 +32,25 @@
   EXPECT_FLOAT_EQ((stan::math::normal_lpdf<false>(n, theta, sigma)),
                   (stan::math::normal_id_glm_lpdf<false>(n, x, beta, alpha,
                   sigma)));
-  EXPECT_FLOAT_EQ((stan::math::normal_lpdf<true, Matrix<int, Dynamic, 1>>(n,
-                  theta, sigma)),
-                  (stan::math::normal_id_glm_lpdf<true, Matrix<int, Dynamic, 1>>(n, x, beta, alpha, sigma)));
-  EXPECT_FLOAT_EQ((stan::math::normal_lpdf<false, Matrix<int, Dynamic, 1>>(n, theta, sigma)),
-                  (stan::math::normal_id_glm_lpdf<false, Matrix<int, Dynamic, 1>>(n, x, beta, alpha, sigma)));
-  EXPECT_FLOAT_EQ((stan::math::normal_lpdf<Matrix<int, Dynamic, 1>>(n, theta, sigma)),
-                  (stan::math::normal_id_glm_lpdf<Matrix<int, Dynamic, 1>>(n, x, beta, alpha, sigma)));
+  EXPECT_FLOAT_EQ(
+    (stan::math::normal_lpdf
+      <true, Matrix<int, Dynamic, 1>>(n, theta, sigma)),
+    (stan::math::normal_id_glm_lpdf
+      <true, Matrix<int, Dynamic, 1>>(n, x, beta, alpha, sigma)));
+  EXPECT_FLOAT_EQ(
+    (stan::math::normal_lpdf
+      <false, Matrix<int, Dynamic, 1>>(n, theta, sigma)),
+    (stan::math::normal_id_glm_lpdf
+      <false, Matrix<int, Dynamic, 1>>(n, x, beta, alpha, sigma)));
+  EXPECT_FLOAT_EQ(
+    (stan::math::normal_lpdf<Matrix<int, Dynamic, 1>>(n, theta, sigma)),
+    (stan::math::normal_id_glm_lpdf
+      <Matrix<int, Dynamic, 1>>(n, x, beta, alpha, sigma)));
 }

 //  We check that the gradients of the new regression match those of one built
 //  from existing primitives.
-TEST(ProbDistributionsNormalIdGLM, glm_matches_normal_id_vars)
-{
-
+TEST(ProbDistributionsNormalIdGLM, glm_matches_normal_id_vars) {
   Matrix<int, Dynamic, 1> n(3, 1);
   n << 14, 32, 21;
   Matrix<var, Dynamic, Dynamic> x(3, 2);
@@ -62,7 +61,7 @@
   var alpha = 0.3;
   Matrix<var, Dynamic, 1> sigma(3, 1);
   sigma << 10, 4, 6;
-  Matrix<var, Dynamic,1> alphavec = alpha * Matrix<double, 3, 1>::Ones();
+  Matrix<var, Dynamic, 1> alphavec = alpha * Matrix<double, 3, 1>::Ones();
   Matrix<var, Dynamic, 1> theta(3, 1);
   theta = x * beta + alphavec;

@@ -81,22 +80,19 @@
   var alpha2 = 0.3;
   Matrix<var, Dynamic, 1> sigma2(3, 1);
   sigma2 << 10, 4, 6;
-
+
   var lp2 = stan::math::normal_id_glm_lpdf(n2, x2, beta2, alpha2, sigma2);
   lp2.grad();

   EXPECT_FLOAT_EQ(lp.val(),
                   lp2.val());
-  for (size_t i = 0; i < 2; i++)
-  {
+  for (size_t i = 0; i < 2; i++) {
     EXPECT_FLOAT_EQ(beta[i].adj(), beta2[i].adj());
   }
   EXPECT_FLOAT_EQ(alpha.adj(), alpha2.adj());
-  for (size_t j = 0; j < 3; j++)
-  {
+  for (size_t j = 0; j < 3; j++) {
     EXPECT_FLOAT_EQ(sigma[j].adj(), sigma2[j].adj());
-    for (size_t i = 0; i < 2; i++)
-    {
+    for (size_t i = 0; i < 2; i++) {
       EXPECT_FLOAT_EQ(x(j, i).adj(), x2(j, i).adj());
     }
   }
@@ -106,6 +102,13 @@
 //  existing primitives.

 /*
+
+#include <chrono>
+typedef std::chrono::high_resolution_clock::time_point TimeVar;
+#define duration(a) \
+  std::chrono::duration_cast<std::chrono::microseconds>(a).count()
+#define timeNow() std::chrono::high_resolution_clock::now()
+
 TEST(ProbDistributionsNormalIdGLM, glm_matches_normal_id_speed) {
   const int R = 30000;
   const int C = 1000;
@@ -156,4 +159,4 @@

   std::cout << "Existing Primitives:" << std::endl << T1 << std::endl  << "New Primitives:" << std::endl << T2 << std::endl;
 }
-*/+*/


glretrace: Plug "opengl" backend to the collection.

Add an entry in glretrace::getBackend().

--- retrace/metric_helper.cpp
+++ retrace/metric_helper.cpp
@@ -9,6 +9,7 @@
 #include "metric_writer.hpp"
 #include "metric_backend_amd_perfmon.hpp"
 #include "metric_backend_intel_perfquery.hpp"
+#include "metric_backend_opengl.hpp"

 namespace glretrace {

@@ -24,6 +25,7 @@
     Context *currentContext = getCurrentContext();
     if (backendName == "GL_AMD_performance_monitor") return &MetricBackend_AMD_perfmon::getInstance(currentContext);
     else if (backendName == "GL_INTEL_performance_query") return &MetricBackend_INTEL_perfquery::getInstance(currentContext);
+    else if (backendName == "opengl") return &MetricBackend_opengl::getInstance(currentContext);
     else return nullptr;
 }

@@ -56,7 +58,8 @@
 void listMetricsCLI() {
     // backends is to be populated with backend names
     std::string backends[] = {"GL_AMD_performance_monitor",
-                              "GL_INTEL_performance_query"};
+                              "GL_INTEL_performance_query",
+                              "opengl"};
     std::cout << "Available metrics: \n";
     for (auto s : backends) {
         auto b = getBackend(s);


Fix typos

Fix typos

--- comparison/opencv/main.cpp
+++ comparison/opencv/main.cpp
@@ -34,6 +34,7 @@

 namespace po = boost::program_options;

+int GPUS_PER_NODE = 1;           // GPUs to use per node
 int GLOBAL_BATCH_SIZE = 64;      // Batch size for network

 const std::string KCAM_DIRECTORY = "/Users/abpoms/kcam";
@@ -183,7 +184,11 @@
   // Start up workers to process videos
   std::vector<std::thread> workers;
   for (int gpu = 0; gpu < GPUS_PER_NODE; ++gpu) {
-    workers.emplace_back(worker, std::ref(video_paths), std::ref(work_items));
+    workers.emplace_back(
+      worker,
+      gpu,
+      std::ref(video_paths),
+      std::ref(work_items));
   }
   // Place sentinel values to end workers
   for (size_t i = 0; i < GPUS_PER_NODE; ++i) {


Propagate `CsvWriter::header()` from options unconditionally, even if the
`Writer` is unhealthy.

This avoids `CsvRecord` building failures when the header taken from `CsvWriter`
is then used to construct records with named fields, before asking `CsvWriter`
to write them.

PiperOrigin-RevId: 420834317

--- riegeli/csv/csv_writer.cc
+++ riegeli/csv/csv_writer.cc
@@ -47,9 +47,9 @@
     RIEGELI_ASSERT(*options.quote() != options.field_separator())
         << "Quote character conflicts with field separator";
   }
-  if (ABSL_PREDICT_FALSE(!dest->healthy())) {
-    FailWithoutAnnotation(AnnotateOverDest(dest->status()));
-    return;
+  if (options.header() != absl::nullopt) {
+    has_header_ = true;
+    header_ = *std::move(options.header());
   }

   quotes_needed_['\n'] = true;
@@ -65,9 +65,11 @@
   field_separator_ = options.field_separator();
   quote_ = options.quote();

-  if (options.header() != absl::nullopt) {
-    has_header_ = true;
-    header_ = *std::move(options.header());
+  if (ABSL_PREDICT_FALSE(!dest->healthy())) {
+    FailWithoutAnnotation(AnnotateOverDest(dest->status()));
+    return;
+  }
+  if (has_header_) {
     if (ABSL_PREDICT_TRUE(WriteRecord(header_.names()))) {
       --record_index_;
     }


Add locks to Start(), Stop() methods in ProcessThread.
This is necessary unfortunately since there are a few places where DeRegisterModule does not reliably occur on the same thread.

BUG=4473
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/42979004

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#8891}

--- webrtc/modules/utility/source/process_thread_impl.cc
+++ webrtc/modules/utility/source/process_thread_impl.cc
@@ -66,8 +66,15 @@

   DCHECK(!stop_);

-  for (ModuleCallback& m : modules_)
-    m.module->ProcessThreadAttached(this);
+  {
+    // TODO(tommi): Since DeRegisterModule is currently being called from
+    // different threads in some cases (ChannelOwner), we need to lock access to
+    // the modules_ collection even on the controller thread.
+    // Once we've cleaned up those places, we can remove this lock.
+    rtc::CritScope lock(&lock_);
+    for (ModuleCallback& m : modules_)
+      m.module->ProcessThreadAttached(this);
+  }

   thread_ = ThreadWrapper::CreateThread(
       &ProcessThreadImpl::Run, this, "ProcessThread");
@@ -90,12 +97,18 @@
   thread_.reset();
   stop_ = false;

+  // TODO(tommi): Since DeRegisterModule is currently being called from
+  // different threads in some cases (ChannelOwner), we need to lock access to
+  // the modules_ collection even on the controller thread.
+  // Once we've cleaned up those places, we can remove this lock.
+  rtc::CritScope lock(&lock_);
   for (ModuleCallback& m : modules_)
     m.module->ProcessThreadAttached(nullptr);
 }

 void ProcessThreadImpl::WakeUp(Module* module) {
   // Allowed to be called on any thread.
+  // TODO(tommi): Disallow this ^^^
   {
     rtc::CritScope lock(&lock_);
     for (ModuleCallback& m : modules_) {
@@ -108,6 +121,7 @@

 void ProcessThreadImpl::PostTask(rtc::scoped_ptr<ProcessTask> task) {
   // Allowed to be called on any thread.
+  // TODO(tommi): Disallow this ^^^
   {
     rtc::CritScope lock(&lock_);
     queue_.push(task.release());


more unit tests

more unit tests

--- src/test/unit/lang/parser/var_decls_grammar_test.cpp
+++ src/test/unit/lang/parser/var_decls_grammar_test.cpp
@@ -91,9 +91,25 @@
               "variable definition dimensions mismatch");
 }

+TEST(langParserVarDeclsGrammarDef, badDefDeclIntVar4) {
+  test_throws("declare-define-var-int-4",
+              "variable definition dimensions mismatch");
+}
+
 TEST(langParserVarDeclsGrammarDef, defDeclDoubleVar) {
   test_parsable("declare-define-var-double");
 }
+
+TEST(langParserVarDeclsGrammarDef, badDefDeclDoubleVar1) {
+  test_throws("declare-define-var-double-1",
+              "variable definition dimensions mismatch");
+}
+
+TEST(langParserVarDeclsGrammarDef, badDefDeclDoubleVar2) {
+  test_throws("declare-define-var-double-2",
+              "variable definition base type mismatch");
+}
+

 TEST(langParserVarDeclsGrammarDef, defDeclVecTypesVar) {
   test_parsable("declare-define-var-vec-types");


tool_build/resource_compiler/shader_def: tidy.

--- src/togo/tool_build/resource_compiler/shader_def.cpp
+++ src/togo/tool_build/resource_compiler/shader_def.cpp
@@ -214,7 +214,7 @@
 	gfx::ShaderDef& def,
 	KVS const& k_def
 ) {
-	constexpr static StringRef const source_names[]{
+	static constexpr StringRef const source_names[]{
 		"shared_source",
 		"vertex_source",
 		"fragment_source",


Enable mipmapping for MTL textures

Enable mipmapping for MTL textures

--- ouzel/assets/LoaderMTL.cpp
+++ ouzel/assets/LoaderMTL.cpp
@@ -81,7 +81,7 @@

                         lineStream >> read;

-                        ambientTexture = engine->getCache()->getTexture(read);
+                        ambientTexture = engine->getCache()->getTexture(read, false, true);
                     }
                     else if (read == "map_Kd") // diffuse texture map
                     {
@@ -93,7 +93,7 @@

                         lineStream >> read;

-                        diffuseTexture = engine->getCache()->getTexture(read);
+                        diffuseTexture = engine->getCache()->getTexture(read, false, true);
                     }
                     else if (read == "Ka") // ambient color
                     {


INTEGRATION: CWS ooo19126 (1.1.654); FILE MERGED 2005/09/05 14:40:01 rt 1.1.654.1: #i54170# Change license header: remove SISSL

--- xmloff/source/text/XMLSectionSourceImportContext.hxx
+++ xmloff/source/text/XMLSectionSourceImportContext.hxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: XMLSectionSourceImportContext.hxx,v $
  *
- *  $Revision: 1.1 $
+ *  $Revision: 1.2 $
  *
- *  last change: $Author: dvo $ $Date: 2000-10-16 13:01:58 $
+ *  last change: $Author: rt $ $Date: 2005-09-09 15:18:50 $
  *
- *  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
  *
  ************************************************************************/


Print error messages only if OpenGL shader compilation or linking failed

--- ouzel/opengl/ShaderOGL.cpp
+++ ouzel/opengl/ShaderOGL.cpp
@@ -61,12 +61,11 @@
             glShaderSource(pixelShaderId, 1, reinterpret_cast<const GLchar**>(&pixelShader), reinterpret_cast<const GLint*>(&pixelShaderSize));
             glCompileShader(pixelShaderId);

-            printShaderMessage(pixelShaderId);
-
             GLint status;
             glGetShaderiv(pixelShaderId, GL_COMPILE_STATUS, &status);
             if (status == GL_FALSE)
             {
+            printShaderMessage(pixelShaderId);
                 return false;
             }

@@ -79,11 +78,10 @@
             glShaderSource(vertexShaderId, 1, reinterpret_cast<const GLchar**>(&vertexShader), reinterpret_cast<const GLint*>(&vertexShaderSize));
             glCompileShader(vertexShaderId);

-            printShaderMessage(vertexShaderId);
-
             glGetShaderiv(vertexShaderId, GL_COMPILE_STATUS, &status);
             if (status == GL_FALSE)
             {
+                printShaderMessage(vertexShaderId);
                 log("Failed to link shader");
                 return false;
             }
@@ -126,11 +124,10 @@

             glLinkProgram(programId);

-            printProgramMessage();
-
             glGetProgramiv(programId, GL_LINK_STATUS, &status);
             if (status == GL_FALSE)
             {
+                printProgramMessage();
                 return false;
             }


Fixing the overpromotion

Fixing the overpromotion

--- stan/math/prim/scal/fun/binomial_coefficient_log.hpp
+++ stan/math/prim/scal/fun/binomial_coefficient_log.hpp
@@ -68,11 +68,8 @@
       if ((N < cutoff) || (N - n < cutoff)) {
         return lgamma(N + 1.0) - lgamma(n + 1.0) - lgamma(N - n + 1.0);
       } else {
-        typename return_type<T_N, T_n>::type N_m_n(N - n);
-        typename return_type<T_N, T_n>::type log_N_m_n(log(N_m_n));
-
-        return n * log(N_m_n) + (N + 0.5) * (log(N) - log_N_m_n)
-          + 1 / (12 * N) - n - 1 / (12 * N_m_n) - lgamma(n + 1.0);
+        return n * log(N - n) + (N + 0.5) * (log(N) - log(N - n))
+          + 1 / (12 * N) - n - 1 / (12 * (N - n)) - lgamma(n + 1.0);
       }
     }


Adding template specialization for int

Adding template specialization for int

--- stan/math/prim/scal/fun/binomial_coefficient_log.hpp
+++ stan/math/prim/scal/fun/binomial_coefficient_log.hpp
@@ -68,8 +68,24 @@
       if ((N < cutoff) || (N - n < cutoff)) {
         return lgamma(N + 1.0) - lgamma(n + 1.0) - lgamma(N - n + 1.0);
       } else {
-        return n * log(N - n) + (N + 0.5) * log(N/(N - n + 0.0))
-          + 1.0 / (12 * N) - n - 1.0 / (12 * (N - n)) - lgamma(n + 1.0);
+        return n * log(N - n) + (N + 0.5) * log(N / (N - n))
+          + 1 / (12 * N) - n - 1 / (12 * (N - n)) - lgamma(n + 1.0);
+      }
+    }
+
+
+    template <>
+    inline double
+    binomial_coefficient_log<int, int>(const int N, const int n) {
+      using std::log;
+      using boost::math::lgamma;
+
+      const double cutoff = 1000;
+      if ((N < cutoff) || (N - n < cutoff)) {
+        return lgamma(N + 1.0) - lgamma(n + 1.0) - lgamma(N - n + 1.0);
+      } else {
+        return n * log(N - n) + (N + 0.5) * log(N / static_cast<double>(N - n))
+          + 1 / (12 * N) - n - 1 / (12 * (N - n)) - lgamma(n + 1.0);
       }
     }


Untangling more includes

Untangling more includes

--- stan/math/prim/scal/prob/neg_binomial_2_ccdf_log.hpp
+++ stan/math/prim/scal/prob/neg_binomial_2_ccdf_log.hpp
@@ -20,7 +20,6 @@
 #include <stan/math/prim/scal/prob/neg_binomial_ccdf_log.hpp>
 #include <stan/math/prim/scal/fun/grad_reg_inc_beta.hpp>
 #include <stan/math/prim/scal/meta/VectorBuilder.hpp>
-#include <vector>

 namespace stan {

@@ -57,17 +56,12 @@

       size_t size_beta = max_size(mu, phi);

-      std::vector<typename return_type<T_location, T_precision>::type>
-        beta_vec(size_beta);
+      VectorBuilder<true, typename return_type<T_location, T_precision>::type,
+                    T_location, T_precision> beta_vec(size_beta);
       for (size_t i = 0; i < size_beta; ++i)
         beta_vec[i] = phi_vec[i] / mu_vec[i];

-      // Cast a vector of size 1 down to a
-      // scalar to avoid dimension mismatch
-      if (size_beta == 1)
-        return neg_binomial_ccdf_log(n, phi, beta_vec[0]);
-      else
-        return neg_binomial_ccdf_log(n, phi, beta_vec);
+      return neg_binomial_ccdf_log(n, phi, beta_vec.get());
     }
   }
 }


Replace one unfortunate hack with a somewhat better one. The included atlctrlx.h relies on min and max macros, which are generally bad and especially so in combination with STL.

BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6298014

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

--- chrome_frame/ready_mode/internal/ready_prompt_window.cc
+++ chrome_frame/ready_mode/internal/ready_prompt_window.cc
@@ -5,16 +5,7 @@
 #include "chrome_frame/ready_mode/internal/ready_prompt_window.h"

 #include <atlctrls.h>
-#include <Shellapi.h>  // Must appear before atlctrlx.h
-
-// These seem to be required by atlctrlx?
-template<class A>
-A min(A const& a, A const& b) { return a < b ? a : b; }
-
-template<class A>
-A max(A const& a, A const& b) { return a > b ? a : b; }
-
-#include <atlctrlx.h>
+#include <Shellapi.h>

 #include "base/compiler_specific.h"
 #include "base/win/scoped_bstr.h"
@@ -23,6 +14,13 @@
 #include "chrome_frame/ready_mode/internal/url_launcher.h"
 #include "chrome_frame/simple_resource_loader.h"
 #include "grit/chromium_strings.h"
+
+// atlctrlx.h requires 'min' and 'max' macros, the definition of which conflicts
+// with STL headers. Hence we include them out of the order defined by style
+// guidelines. As a result you may not refer to std::min or std::max in this
+// file.
+#include <minmax.h>  // NOLINT
+#include <atlctrlx.h>  // NOLINT

 ReadyPromptWindow::ReadyPromptWindow(
     InfobarContent::Frame* frame, ReadyModeState* ready_mode_state,


Fix bug in debug message

Fix bug in debug message

--- Kernel/iSCSIVirtualHBA.cpp
+++ Kernel/iSCSIVirtualHBA.cpp
@@ -367,8 +367,8 @@
     iSCSIConnection * connection = session->connections[connectionId];
     if(!connection)
         return;
-
-    DBLog("iscsi: Task timeout for task %d (sid: %d, cid: %d)\n",task,sessionId,connectionId);
+
+    DBLog("iscsi: Task timeout for task %llu (sid: %d, cid: %d)\n",GetTaggedTaskIdentifier(task),sessionId,connectionId);

     // If the task timeout is due to a broken connection, handle it.


lastRunner change fix

lastRunner change fix

--- trikScriptRunner/src/trikScriptRunner.cpp
+++ trikScriptRunner/src/trikScriptRunner.cpp
@@ -82,6 +82,7 @@
 	}

 	mScriptRunnerArray[stype]->run(script, fileName);
+	mLastRunner = stype;
 }

 void TrikScriptRunner::runDirectCommand(const QString &command)


combinatorics: All permutation file renaming.

--- combinatorics/all_permutation/all_permutation_int_v2.cc
+++ combinatorics/all_permutation/all_permutation_int_v2.cc
@@ -1,35 +0,0 @@
-/*
-   All permutation (string).
-
-   Constructs all permutations of a given input string via backtracking.
-   Note that repetitions occur if there are letters in the input string
-   that appear more than once.
-
-   (c) 2015 Josef Ziegler (ippeb24@gmail.com)
-
-*/
-
-#include <iostream>
-#include <cstring>
-using namespace std;
-
-void permute(string& S, int at) {
-  if (at == S.length())
-    cout << S << endl;
-
-  for (int i = at; i < S.length(); i++) {
-    char tmp = S[at];
-    S[at]=S[i];
-    S[i]=tmp;
-    permute(S, at + 1);
-    S[i]=S[at]; // two lines only needed if we pass
-    S[at]=tmp;  // S as a reference
-  }
-}
-
-
-int main() {
-  string tmp;
-  cin >> tmp;
-  permute(tmp, 0);
-}


one final DofMap::component changed to variable

git-svn-id: e88a1e38e13faf406e05cc89eca8dd613216f6c4@100 434f946d-2f3d-0410-ba4c-cb9f52fb0dbf

--- trunk/libmesh/src/base/equation_systems.C
+++ trunk/libmesh/src/base/equation_systems.C
@@ -1,4 +1,4 @@
-// $Id: equation_systems.C,v 1.17 2003-02-17 01:23:01 benkirk Exp $
+// $Id: equation_systems.C,v 1.18 2003-02-17 05:33:09 jwpeterson Exp $

 // The Next Great Finite Element Library.
 // Copyright (C) 2002  Benjamin S. Kirk, John W. Peterson
@@ -530,7 +530,7 @@
       out << "    Finite Element Types=";
       for (unsigned int vn=0; vn<system.n_vars(); vn++)
       {
-	out << "\"" << system.get_dof_map().component_type(vn).family << "\" ";
+	out << "\"" << system.get_dof_map().variable_type(vn).family << "\" ";
       }
 #else
       out << "    Finite Element Types=";


[Ozone] Update file backend to new Skia interface

TBR=rjkroege@chromium.org

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

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

--- ui/gfx/ozone/impl/file_surface_factory.cc
+++ ui/gfx/ozone/impl/file_surface_factory.cc
@@ -65,9 +65,9 @@
 bool FileSurfaceFactory::AttemptToResizeAcceleratedWidget(
     AcceleratedWidget widget,
     const Rect& bounds) {
-  device_ = skia::AdoptRef(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
-                                              bounds.width(),
-                                              bounds.height()));
+  SkImageInfo info = SkImageInfo::MakeN32Premul(bounds.width(),
+                                                bounds.height());
+  device_ = skia::AdoptRef(SkBitmapDevice::Create(info));
   canvas_ = skia::AdoptRef(new SkCanvas(device_.get()));
   return true;
 }


missed a use of SizeRequired.

missed a use of SizeRequired.

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

--- unittests/ExecutionEngine/JIT/JITTest.cpp
+++ unittests/ExecutionEngine/JIT/JITTest.cpp
@@ -64,8 +64,6 @@
     : Base(JITMemoryManager::CreateDefaultMemManager()) {
     stubsAllocated = 0;
   }
-
-  void setSizeRequired(bool Required) { SizeRequired = Required; }

   virtual void setMemoryWritable() { Base->setMemoryWritable(); }
   virtual void setMemoryExecutable() { Base->setMemoryExecutable(); }


Add destory_unit() and fix link_sound()

Add destory_unit() and fix link_sound()

--- engine/lua/LuaWorld.cpp
+++ engine/lua/LuaWorld.cpp
@@ -50,6 +50,18 @@
 }

 //-----------------------------------------------------------------------------
+CE_EXPORT int world_destroy_unit(lua_State* L)
+{
+	LuaStack stack(L);
+
+	World* world = stack.get_world(1);
+	Unit* unit = stack.get_unit(2);
+
+	world->destroy_unit(unit);
+	return 0;
+}
+
+//-----------------------------------------------------------------------------
 CE_EXPORT int world_play_sound(lua_State* L)
 {
 	LuaStack stack(L);
@@ -94,10 +106,10 @@
 	SoundInstanceId sound;
 	sound.decode(stack.get_int(2));

-	UnitId unit;
-	unit.decode(stack.get_int(3));
+	Unit* unit = stack.get_unit(3);
+	int32_t node = stack.get_int(4);

-	world->link_sound(sound, unit);
+	world->link_sound(sound, unit, node);

 	return 0;
 }
@@ -173,6 +185,7 @@
 void load_world(LuaEnvironment& env)
 {
 	env.load_module_function("World", "spawn_unit",			world_spawn_unit);
+	env.load_module_function("World", "destroy_unit",       world_destroy_unit);

 	env.load_module_function("World", "play_sound",			world_play_sound);
 	env.load_module_function("World", "pause_sound", 		world_pause_sound);


stuff

stuff

--- tests/harness/mordavokne/mordavokne/glue/linux/glue.cxx
+++ tests/harness/mordavokne/mordavokne/glue/linux/glue.cxx
@@ -57,7 +57,7 @@
 }

 namespace{
-struct WindowWrapper : public utki::destructable{
+struct window_wrapper : public utki::destructable{
 	struct display_wrapper{
 		Display* display;

@@ -91,10 +91,10 @@
 #	error "Unknown graphics API"
 #endif
 	struct cursor_wrapper{
-		WindowWrapper& owner;
+		window_wrapper& owner;
 		Cursor cursor;

-		cursor_wrapper(WindowWrapper& owner, morda::mouse_cursor c) :
+		cursor_wrapper(window_wrapper& owner, morda::mouse_cursor c) :
 				owner(owner)
 		{
 			if(c == morda::mouse_cursor::none){
@@ -171,7 +171,7 @@

 	volatile bool quitFlag = false;

-	WindowWrapper(const window_params& wp){
+	window_wrapper(const window_params& wp){
 #ifdef MORDAVOKNE_RENDER_OPENGL2
 		{
 			int glxVerMajor, glxVerMinor;
@@ -388,7 +388,7 @@
 			XDestroyWindow(this->display.display, this->window);
 		});

-		{//We want to handle WM_DELETE_WINDOW event to know when window is closed.
+		{ // we want to handle WM_DELETE_WINDOW event to know when window is closed
 			Atom a = XInternAtom(this->display.display, "WM_DELETE_WINDOW", True);
 			XSetWMProtocols(this->display.display, this->window, &a, 1);
 		}
@@ -544,7 +544,7 @@
 #	error "Unknown graphics API"
 #endif
 	}
-	~WindowWrapper()noexcept{
+	~window_wrapper()noexcept{
 		XUnsetICFocus(this->inputContext);
 		XDestroyIC(this->inputContext);

@@ -570,12 +570,12 @@
 	}
 };

-WindowWrapper& getImpl(const std::unique_ptr<utki::destructable>& pimpl){
-	ASSERT(dynamic_cast<WindowWrapper*>(pimpl.get()))
-	return static_cast<WindowWrapper&>(*pimpl);
-}
-
-WindowWrapper& get_impl(application& app){
+window_wrapper& getImpl(const std::unique_ptr<utki::destructable>& pimpl){
+	ASSERT(dynamic_cast<window_wrapper*>(pimpl.get()))
+	return static_cast<window_wrapper&>(*pimpl);
+}
+
+window_wrapper& get_impl(application& app){
 	return getImpl(getWindowPimpl(app));
 }

@@ -601,7 +601,7 @@

 application::application(std::string&& name, const window_params& requestedWindowParams) :
 		name(name),
-		windowPimpl(std::make_unique<WindowWrapper>(requestedWindowParams)),
+		windowPimpl(std::make_unique<window_wrapper>(requestedWindowParams)),
 		gui(std::make_shared<morda::context>(
 #ifdef MORDAVOKNE_RENDER_OPENGL2
 				std::make_shared<morda::render_opengl2::renderer>(),


- issue 2186: need to switch widget back before attempting to delete

--- copasi/UI/CQEventDM.cpp
+++ copasi/UI/CQEventDM.cpp
@@ -423,8 +423,12 @@
   if (index == C_INVALID_INDEX)
     return;

+  // careful! need to first change the widget (as this will result in the
+  // event widget to save back its data in case it was active) ...
+  emit changeWidget(116);
+
+  // only then can we safely delete this item
   removeRow((int) index);
-  emit changeWidget(116);
 }

 void CQEventDM::addEventRow(UndoEventData *pEventData)


Fixed problems when having metabolites with status REACTIONS, which never occured in any, i.e., are unused.

--- copasi/model/CModel.cpp
+++ copasi/model/CModel.cpp
@@ -1,9 +1,9 @@
 /* Begin CVS Header
    $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/model/CModel.cpp,v $
-   $Revision: 1.281 $
+   $Revision: 1.282 $
    $Name:  $
    $Author: shoops $
-   $Date: 2006/08/31 20:05:02 $
+   $Date: 2006/09/01 15:50:31 $
    End CVS Header */

 // Copyright  2005 by Pedro Mendes, Virginia Tech Intellectual
@@ -540,21 +540,32 @@
     }

   // Reorder metabolites
+  // Skip the metabolites determined by ODE
   itMetab = mMetabolitesX.begin() + mNumMetabolitesODE;
+
+  // Handle the metabolites determined by actually determined by reactions
   itUsedMetabolites = UsedMetabolites.begin();
   std::vector< CMetab * >::iterator itMetabolitesEnd = UsedMetabolites.end();
   for (; itUsedMetabolites != itMetabolitesEnd; ++itUsedMetabolites, ++itMetab)
     *itMetab = *itUsedMetabolites;

+  // Handle metabolites determined by assignement and marked as fixed
+  // This is just a shift of NumUnused.
   endMetab = itMetab + mNumMetabolitesAssignment + mNumMetabolitesUnused;
   mNumMetabolitesUnused += NumUnused;
   for (; itMetab != endMetab; ++itMetab)
-    *itMetab = *itMetab + NumUnused;
-
+    *itMetab = *(itMetab + NumUnused);
+
+  // Handle newly marked unused metabolites
   itUnusedMetabolites = UnusedMetabolites.begin();
   itMetabolitesEnd = UnusedMetabolites.end();
   for (; itUnusedMetabolites != itMetabolitesEnd; ++itUnusedMetabolites, ++itMetab)
     *itMetab = *itUnusedMetabolites;
+
+  // Now its time to update the number of metabolites determined by reactions
+  // and the one being unused.
+  mNumMetabolitesReaction -= NumUnused;
+  mNumMetabolitesUnused += NumUnused;

   // Update stoichiometry matrix
   mStoi = NewStoi;
@@ -775,12 +786,16 @@
   unsigned C_INT32 i, imax = mMetabolites.size();
   unsigned C_INT32 j, jmax = mSteps.size();

+  // Since some metabolites are unused we need to keep track of
+  // the row of the stoichiometry matrix intependently.
+  unsigned C_INT32 k;
+
   C_FLOAT64 TotalFlux_p, TotalFlux_n, min_flux, PartialFlux;
   C_FLOAT64 TransitionTime;

   mTransitionTime = 0.0;

-  for (i = 0; i < imax; i++)
+  for (i = 0, k = 0; i < imax; i++)
     {
       if (mMetabolites[i]->isFixed() ||
           !mMetabolites[i]->isUsed())
@@ -794,13 +809,15 @@

           for (j = 0; j < jmax; j++)
             {
-              PartialFlux = mStoi(i, j) * mParticleFluxes[j];
+              PartialFlux = mStoi(k, j) * mParticleFluxes[j];

               if (PartialFlux > 0.0)
                 TotalFlux_p += PartialFlux;
               else
                 TotalFlux_n -= PartialFlux;
             }
+
+          k++; // The next row in the stoichiometry matrix;

           if (TotalFlux_p < TotalFlux_n)
             min_flux = TotalFlux_p;
@@ -1201,7 +1218,6 @@
   mStateTemplate.setUserOrder(Entities);

   mJacobianPivot.resize(mStateTemplate.getNumIndependent() - mNumMetabolitesIndependent + mNumMetabolitesReaction);
-  mJacobianPivot = 999;

   const unsigned C_INT32 * pUserOrder = mStateTemplate.getUserOrder().array();
   const unsigned C_INT32 * pUserOrderEnd = pUserOrder + mStateTemplate.getUserOrder().size();
@@ -1210,7 +1226,8 @@
   for (unsigned C_INT32 i = 0; pUserOrder != pUserOrderEnd; ++pUserOrder)
     {
       const CModelEntity::Status & Status = ppEntity[*pUserOrder]->getStatus();
-      if (Status == CModelEntity::ODE || Status == CModelEntity::REACTIONS)
+      if (Status == CModelEntity::ODE ||
+          (Status == CModelEntity::REACTIONS && ppEntity[*pUserOrder]->isUsed()))
         mJacobianPivot[i++] = *pUserOrder - 1;
     }


session key fix

session key fix

--- vtrc-client/vtrc-client.cpp
+++ vtrc-client/vtrc-client.cpp
@@ -533,8 +533,7 @@

     void vtrc_client::set_session_key( const std::string &key )
     {
-        static const std::string empty_id;
-        set_session_key( empty_id, key );
+        set_session_key( impl_->get_session_id( ), key );
     }

     void vtrc_client::set_session_id( const std::string &id )


INTEGRATION: CWS presfixes08 (1.2.30); FILE MERGED 2005/07/15 13:11:01 dbo 1.2.30.1: #i45197# skipping animations, cleanup Issue number: Submitted by: Reviewed by:

--- slideshow/source/engine/animationnodes/animationbasenode.hxx
+++ slideshow/source/engine/animationnodes/animationbasenode.hxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: animationbasenode.hxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.4 $
  *
- *  last change: $Author: rt $ $Date: 2005-09-07 20:39:43 $
+ *  last change: $Author: obo $ $Date: 2005-10-11 08:42:13 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -33,116 +33,117 @@
  *
  ************************************************************************/

-#ifndef _SLIDESHOW_ANIMATIONBASENODE_HXX
-#define _SLIDESHOW_ANIMATIONBASENODE_HXX
+#ifndef INCLUDED_SLIDESHOW_ANIMATIONBASENODE_HXX
+#define INCLUDED_SLIDESHOW_ANIMATIONBASENODE_HXX

-#include <basecontainernode.hxx>
-#include <activitiesfactory.hxx>
-#include <shapeattributelayer.hxx>
-#include <shapeattributelayerholder.hxx>
-#include <attributableshape.hxx>
-#include <shapesubset.hxx>
+#include "basecontainernode.hxx"
+#include "activitiesfactory.hxx"
+#include "shapeattributelayer.hxx"
+#include "shapeattributelayerholder.hxx"
+#include "attributableshape.hxx"
+#include "shapesubset.hxx"
+#include "com/sun/star/animations/XAnimate.hpp"

-#ifndef _COM_SUN_STAR_ANIMATIONS_XANIMATE_HPP_
-#include <com/sun/star/animations/XAnimate.hpp>
-#endif
+namespace presentation {
+namespace internal {

+/** Common base class for all leaf animation nodes.

-namespace presentation
+    This class basically holds the target shape
+*/
+class AnimationBaseNode : public BaseNode
 {
-    namespace internal
-    {
-        /** Common base class for all leaf animation nodes.
+public:
+    AnimationBaseNode(
+        ::com::sun::star::uno::Reference<
+        ::com::sun::star::animations::XAnimationNode> const & xNode,
+        BaseContainerNodeSharedPtr const & rParent,
+        NodeContext const & rContext );

-        This class basically holds the target shape
-        */
-        class AnimationBaseNode : public BaseNode
-        {
-        public:
-            AnimationBaseNode( const ::com::sun::star::uno::Reference<
-                                       ::com::sun::star::animations::XAnimationNode >&  xNode,
-                               const BaseContainerNodeSharedPtr&                    rParent,
-                               const NodeContext&                                   rContext );
-
-            virtual bool init();
-            virtual void dispose();
-            virtual bool resolve();
-            virtual bool activate();
-            virtual void deactivate();
-            virtual void end();
-            virtual void notifyDeactivating( const AnimationNodeSharedPtr& rNotifier );
-            virtual bool hasPendingAnimation() const;
+    virtual bool init();
+    virtual void dispose();
+    virtual bool resolve();
+    virtual bool activate();
+    virtual void deactivate();
+    virtual void end();
+    virtual void notifyDeactivating( AnimationNodeSharedPtr const & rNotifier );
+    virtual bool hasPendingAnimation() const;

 #if defined(VERBOSE) && defined(DBG_UTIL)
-            virtual void showState() const;
+    virtual void showState() const;
 #endif
-        protected:
+protected:

-            /** Animation-specific end().
+    /** Animation-specific end().

-                This is also called from deactivate, for subsetted
-                shapes. Actually force-ends the underlying animation
-                activity.
-            */
-            void endAnimation();
+        This is also called from deactivate, for subsetted
+        shapes. Actually force-ends the underlying animation
+        activity.
+    */
+    void endAnimation();

-            /** Create parameter struct for ActivitiesFactory
-             */
-            ActivitiesFactory::CommonParameters fillCommonParameters() const;
+    /** Create parameter struct for ActivitiesFactory
+     */
+    ActivitiesFactory::CommonParameters fillCommonParameters() const;

-            /** Create AnimationActivity from common XAnimate parameters
-             */
-            AnimationActivitySharedPtr createActivity() const;
+    /** Create AnimationActivity from common XAnimate parameters
+     */
+    AnimationActivitySharedPtr createActivity() const;

-            /// Returns true, if this node animates a subset of a shape
-            bool isSubsettedShape() const;
+    /// Returns true, if this node animates a subset of a shape
+    bool isSubsettedShape() const;

-            /** Returns true, if this is a subset animation, and
-                the subset is autogenerated (e.g. from an
-                iteration)
-            */
-            bool isDependentSubsettedShape() const;
+    /** Returns true, if this is a subset animation, and
+        the subset is autogenerated (e.g. from an
+        iteration)
+    */
+    bool isDependentSubsettedShape() const;

-            /** This method enables a subset shape
-             */
-            void enableShapeSubset();
+    /** This method enables a subset shape
+     */
+    void enableShapeSubset();

-            /** This method removes subset shapes
+    /** This method removes subset shapes

-                Subset shapes may be only temporarily added to a
-                slide. When the animation active duration ends,
-                and they are generated from iterated effects, they
-                are removed again for redraw
-                performance. Furthermore, they are revoked from
-                the original shape, such that it displays the full
-                content again.
-            */
-            void disableShapeSubset();
+        Subset shapes may be only temporarily added to a
+        slide. When the animation active duration ends,
+        and they are generated from iterated effects, they
+        are removed again for redraw
+        performance. Furthermore, they are revoked from
+        the original shape, such that it displays the full
+        content again.
+    */
+    void disableShapeSubset();

-            AttributableShapeSharedPtr getShape() const;
+    AttributableShapeSharedPtr getShape() const;

-            // inline accessors
-            // ----------------
+    // inline accessors
+    // ----------------

-            const ::com::sun::star::uno::Reference<
-                ::com::sun::star::animations::XAnimate >& getXAnimateNode() const { return mxAnimateNode; }
-            const ShapeAttributeLayerHolder&              getAttributeLayerHolder() const { return maAttributeLayerHolder; }
-            const AnimationActivitySharedPtr&             getActivity() const { return mpActivity; }
-            AnimationActivitySharedPtr&                   getActivity() { return mpActivity; }
+    ::com::sun::star::uno::Reference<
+        ::com::sun::star::animations::XAnimate> const & getXAnimateNode() const
+        { return mxAnimateNode; }
+    ShapeAttributeLayerHolder const & getAttributeLayerHolder() const
+        { return maAttributeLayerHolder; }
+    AnimationActivitySharedPtr const & getActivity() const
+        { return mpActivity; }
+    AnimationActivitySharedPtr & getActivity()
+        { return mpActivity; }

-        private:
-            ::com::sun::star::uno::Reference<
-                ::com::sun::star::animations::XAnimate >    mxAnimateNode;
-            ShapeAttributeLayerHolder                       maAttributeLayerHolder;
-            AnimationActivitySharedPtr                      mpActivity;
+private:
+    ::com::sun::star::uno::Reference<
+        ::com::sun::star::animations::XAnimate>     mxAnimateNode;
+    ShapeAttributeLayerHolder                       maAttributeLayerHolder;
+    AnimationActivitySharedPtr                      mpActivity;

-            /// When valid, this node has a plain target shape
-            AttributableShapeSharedPtr                      mpShape;
-            /// When valid, this is a subsetted target shape
-            ShapeSubsetSharedPtr                            mpShapeSubset;
-            bool                                            mbIsIndependentSubset;
-        };
-    }
-}
+    /// When valid, this node has a plain target shape
+    AttributableShapeSharedPtr                      mpShape;
+    /// When valid, this is a subsetted target shape
+    ShapeSubsetSharedPtr                            mpShapeSubset;
+    bool                                            mbIsIndependentSubset;
+};

-#endif /* _SLIDESHOW_ANIMATIONBASENODE_HXX */
+} // namespace internal
+} // namespace presentation
+
+#endif /* INCLUDED_SLIDESHOW_ANIMATIONBASENODE_HXX */


INTEGRATION: CWS presfixes09 (1.5.16); FILE MERGED 2006/10/18 19:55:17 thb 1.5.16.5: RESYNC: (1.6-1.7); FILE MERGED 2006/09/15 22:15:30 thb 1.5.16.4: RESYNC: (1.5-1.6); FILE MERGED 2006/04/24 13:25:29 thb 1.5.16.3: #i53194# Unified include statements (local headers always have double quotes; external headers angle brackets); reverted EventMultiplexer pause events to shared_ptr; removed EventMultiplexer::removeViewHandler(), since the handler is held weakly, anyway. 2006/04/12 20:40:07 thb 1.5.16.2: #i37778# Replaced all shared_ptr.get() != NULL places with the more elegant automatic-conversion-to-bool version (at least where the compiler tolerated that) 2006/03/24 18:23:18 thb 1.5.16.1: #i37778# Moved whole slideshow engine from namespace presentation (which conflicts with one of the UNO subnamespaces) to slideshow

--- slideshow/source/engine/animationnodes/basecontainernode.cxx
+++ slideshow/source/engine/animationnodes/basecontainernode.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: basecontainernode.cxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.8 $
  *
- *  last change: $Author: obo $ $Date: 2006-09-17 08:35:24 $
+ *  last change: $Author: kz $ $Date: 2006-12-13 15:32:16 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -50,7 +50,7 @@

 using namespace com::sun::star;

-namespace presentation {
+namespace slideshow {
 namespace internal {

 BaseContainerNode::BaseContainerNode(
@@ -179,5 +179,5 @@
 #endif

 } // namespace internal
-} // namespace presentation
+} // namespace slideshow


fixed compile bug

fixed compile bug

--- NFServer/NFWorldNet_ServerPlugin/NFCWorldNet_ServerModule.cpp
+++ NFServer/NFWorldNet_ServerPlugin/NFCWorldNet_ServerModule.cpp
@@ -389,8 +389,9 @@

 void NFCWorldNet_ServerModule::OnTranspondServerReport(const int nFd, const int msgId, const char* buffer, const uint32_t nLen)
 {
+    NFGUID xGUID;
 	NFMsg::ServerInfoReport msg;
-	if (!m_pNetModule->ReceivePB(nFd,msgId, buffer, nLen, msg,NFGUID()))
+	if (!m_pNetModule->ReceivePB(nFd,msgId, buffer, nLen, msg, xGUID))
 	{
 		return;
 	}


[ARM64] Remove unused function. NFCI.

[ARM64] Remove unused function. NFCI.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@321651 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -75,19 +75,6 @@
 static inline bool IsZero(uint64_t x) { return x == 0; }

 static inline uint64_t NOT(uint64_t x) { return ~x; }
-
-#if 0
-// LSL_C()
-// =======
-static inline uint64_t
-LSL_C (uint64_t x, integer shift, bool &carry_out)
-{
-    assert (shift >= 0);
-    uint64_t result = x << shift;
-    carry_out = ((1ull << (64-1)) >> (shift - 1)) != 0;
-    return result;
-}
-#endif

 // LSL()
 // =====


add glm constants include to use glm::pi

--- source/gloperate/source/navigation/WorldInHandNavigation.cpp
+++ source/gloperate/source/navigation/WorldInHandNavigation.cpp
@@ -2,6 +2,7 @@

 #include <cassert>

+#include <glm/gtc/constants.hpp>
 #include <glm/gtc/matrix_transform.hpp>

 #include <gloperate/Camera.h>


DBus object

DBus object

--- contourd/recommendation/plugins/documents/Documents.cpp
+++ contourd/recommendation/plugins/documents/Documents.cpp
@@ -51,7 +51,7 @@

     // Making us visible on d-bus
     new RankingsClientAdaptor(this);
-    kDebug() << "registering the client" <<
+    // kDebug() << "registering the client" <<
     dbus.registerObject("/RankingsClient", this);

     if (dbus.interface()->isServiceRegistered(KAMD_DBUS_ADDRESS)) {