Skip to content

Commit 852a95d

Browse files
The MR_TIMER macro now requires a trailing ;. (#4450)
1 parent 7bd56e5 commit 852a95d

File tree

169 files changed

+889
-890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+889
-890
lines changed

source/MRCuda/MRCudaFastWindingNumber.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Expected<void> FastWindingNumber::prepareData_( ProgressCallback cb )
5252
return unexpectedOperationCanceled();
5353
return {};
5454
}
55-
MR_TIMER
55+
MR_TIMER;
5656

5757
auto data = std::make_shared<FastWindingNumberDataBuffers>();
5858

@@ -86,7 +86,7 @@ Expected<void> FastWindingNumber::prepareData_( ProgressCallback cb )
8686

8787
Expected<void> FastWindingNumber::calcFromVector( std::vector<float>& res, const std::vector<Vector3f>& points, float beta, FaceId skipFace, const ProgressCallback& cb )
8888
{
89-
MR_TIMER
89+
MR_TIMER;
9090
return prepareData_( subprogress( cb, 0.0, 0.5f ) ).and_then( [&]() -> Expected<void>
9191
{
9292
const auto totalSize = points.size();
@@ -128,7 +128,7 @@ Expected<void> FastWindingNumber::calcFromVector( std::vector<float>& res, const
128128

129129
Expected<void> FastWindingNumber::calcSelfIntersections( FaceBitSet& res, float beta, const ProgressCallback& cb )
130130
{
131-
MR_TIMER
131+
MR_TIMER;
132132
return prepareData_( subprogress( cb, 0.0, 0.5f ) ).and_then( [&]() -> Expected<void>
133133
{
134134
const auto totalSize = mesh_.topology.faceSize();
@@ -174,7 +174,7 @@ Expected<void> FastWindingNumber::calcSelfIntersections( FaceBitSet& res, float
174174

175175
Expected<void> FastWindingNumber::calcFromGrid( std::vector<float>& res, const Vector3i& dims, const AffineXf3f& gridToMeshXf, float beta, const ProgressCallback& cb )
176176
{
177-
MR_TIMER
177+
MR_TIMER;
178178
if ( auto maybe = prepareData_( subprogress( cb, 0.0, 0.5f ) ); !maybe )
179179
return unexpected( std::move( maybe.error() ) );
180180

@@ -229,7 +229,7 @@ Expected<void> FastWindingNumber::calcFromGrid( std::vector<float>& res, const V
229229

230230
Expected<void> FastWindingNumber::calcFromGridWithDistances( std::vector<float>& res, const Vector3i& dims, const AffineXf3f& gridToMeshXf, const DistanceToMeshOptions& options, const ProgressCallback& cb )
231231
{
232-
MR_TIMER
232+
MR_TIMER;
233233
if ( auto maybe = prepareData_( subprogress( cb, 0.0, 0.5f ) ); !maybe )
234234
return unexpected( std::move( maybe.error() ) );
235235

@@ -284,7 +284,7 @@ Expected<void> FastWindingNumber::calcFromGridWithDistances( std::vector<float>&
284284

285285
Expected<void> FastWindingNumber::calcFromGridByParts( GridByPartsFunc resFunc, const Vector3i& dims, const AffineXf3f& gridToMeshXf, float beta, int layerOverlap, const ProgressCallback& cb )
286286
{
287-
MR_TIMER
287+
MR_TIMER;
288288

289289
if ( auto maybe = prepareData_( subprogress( cb, 0.0, 0.5f ) ); !maybe )
290290
return unexpected( std::move( maybe.error() ) );
@@ -353,7 +353,7 @@ Expected<void> FastWindingNumber::calcFromGridByParts( GridByPartsFunc resFunc,
353353

354354
Expected<void> FastWindingNumber::calcFromGridWithDistancesByParts( GridByPartsFunc resFunc, const Vector3i& dims, const AffineXf3f& gridToMeshXf, const DistanceToMeshOptions& options, int layerOverlap, const ProgressCallback& cb )
355355
{
356-
MR_TIMER
356+
MR_TIMER;
357357

358358
if ( auto maybe = prepareData_( subprogress( cb, 0.0, 0.5f ) ); !maybe )
359359
return unexpected( std::move( maybe.error() ) );

source/MRCuda/MRCudaPointsToDistanceVolume.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ namespace Cuda
2121

2222
Expected<MR::SimpleVolumeMinMax> pointsToDistanceVolume( const PointCloud& cloud, const MR::PointsToDistanceVolumeParams& params )
2323
{
24-
MR_TIMER
24+
MR_TIMER;
2525

2626
const auto& tree = cloud.getAABBTree();
2727
const auto& nodes = tree.nodes();
2828

2929
DynamicArray<Node3> cudaNodes;
3030
CUDA_LOGE_RETURN_UNEXPECTED( cudaNodes.fromVector( nodes.vec_ ) );
31-
31+
3232
DynamicArray<OrderedPoint> cudaPoints;
3333
CUDA_LOGE_RETURN_UNEXPECTED( cudaPoints.fromVector( tree.orderedPoints() ) );
3434

@@ -80,14 +80,14 @@ Expected<MR::SimpleVolumeMinMax> pointsToDistanceVolume( const PointCloud& cloud
8080
MRCUDA_API Expected<void> pointsToDistanceVolumeByParts( const PointCloud& cloud, const MR::PointsToDistanceVolumeParams& params,
8181
std::function<Expected<void> ( const SimpleVolumeMinMax&, int )> addPart, int layerOverlap )
8282
{
83-
MR_TIMER
83+
MR_TIMER;
8484

8585
const auto& tree = cloud.getAABBTree();
8686
const auto& nodes = tree.nodes();
8787

8888
DynamicArray<Node3> cudaNodes;
8989
CUDA_LOGE_RETURN_UNEXPECTED( cudaNodes.fromVector( nodes.vec_ ) );
90-
90+
9191
DynamicArray<OrderedPoint> cudaPoints;
9292
CUDA_LOGE_RETURN_UNEXPECTED( cudaPoints.fromVector( tree.orderedPoints() ) );
9393

source/MRCuda/MRCudaPointsToMeshProjector.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void PointsToMeshProjector::updateMeshData( const MR::Mesh* mesh )
3535
mesh_ = nullptr;
3636
return;
3737
}
38-
MR_TIMER
38+
MR_TIMER;
3939

4040
const AABBTree& tree = mesh->getAABBTree();
4141
const auto& nodes = tree.nodes();
@@ -52,13 +52,13 @@ void PointsToMeshProjector::updateMeshData( const MR::Mesh* mesh )
5252
void PointsToMeshProjector::findProjections(
5353
std::vector<MR::MeshProjectionResult>& res, const std::vector<Vector3f>& points, const AffineXf3f* objXf, const AffineXf3f* refObjXf, float upDistLimitSq, float loDistLimitSq )
5454
{
55-
MR_TIMER
55+
MR_TIMER;
5656
if ( !mesh_ )
5757
{
5858
assert( false );
5959
return;
6060
}
61-
61+
6262
CUDA_EXEC( cudaSetDevice( 0 ) );
6363

6464
const auto getCudaMatrix = [] ( const AffineXf3f& xf )
@@ -134,4 +134,4 @@ size_t PointsToMeshProjector::projectionsHeapBytes( size_t numProjections ) cons
134134

135135
}
136136

137-
}
137+
}

source/MRCuda/MRCudaSolarRadiation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static std::vector<IntersectionPrecomputes> calcPrecs( const std::vector<MR::Sky
4343

4444
BitSet findSkyRays( const Mesh& terrain, const VertCoords& samples, const VertBitSet& validSamples, const std::vector<MR::SkyPatch>& skyPatches, std::vector<MR::MeshIntersectionResult>* outIntersections )
4545
{
46-
MR_TIMER
46+
MR_TIMER;
4747

4848
const auto& tree = terrain.getAABBTree();
4949
const auto& nodes = tree.nodes();
@@ -86,7 +86,7 @@ VertScalars computeSkyViewFactor( const Mesh& terrain,
8686
const std::vector<MR::SkyPatch>& skyPatches,
8787
BitSet* outSkyRays, std::vector<MR::MeshIntersectionResult>* outIntersections )
8888
{
89-
MR_TIMER
89+
MR_TIMER;
9090

9191
const auto& tree = terrain.getAABBTree();
9292
const auto& nodes = tree.nodes();

source/MRIOExtras/MRCtm.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Saver
6262

6363
Expected<void> Saver::run()
6464
{
65-
MR_TIMER
65+
MR_TIMER;
6666
if ( !stream_ )
6767
return unexpected( std::string( "Bad stream before CTM-encoding" ) );
6868
ctmSaveCustom( context_, []( const void* buf, CTMuint size, void* data ) -> CTMuint
@@ -107,7 +107,7 @@ Expected<Mesh> fromCtm( const std::filesystem::path& file, const MeshLoadSetting
107107

108108
Expected<Mesh> fromCtm( std::istream& in, const MeshLoadSettings& settings /*= {}*/ )
109109
{
110-
MR_TIMER
110+
MR_TIMER;
111111

112112
auto context = ctmNewContext( CTM_IMPORT );
113113
MR_FINALLY { ctmFreeContext( context ); };
@@ -216,7 +216,7 @@ Expected<void> toCtm( const Mesh & mesh, const std::filesystem::path & file, con
216216

217217
Expected<void> toCtm( const Mesh & mesh, std::ostream & out, const CtmSaveOptions& options )
218218
{
219-
MR_TIMER
219+
MR_TIMER;
220220

221221
class ScopedCtmConext
222222
{
@@ -327,7 +327,7 @@ Expected<MR::PointCloud> fromCtm( const std::filesystem::path& file, const Point
327327

328328
Expected<MR::PointCloud> fromCtm( std::istream& in, const PointsLoadSettings& settings )
329329
{
330-
MR_TIMER
330+
MR_TIMER;
331331

332332
auto context = ctmNewContext( CTM_IMPORT );
333333
MR_FINALLY { ctmFreeContext( context ); };
@@ -420,7 +420,7 @@ Expected<void> toCtm( const PointCloud& points, const std::filesystem::path& fil
420420

421421
Expected<void> toCtm( const PointCloud& cloud, std::ostream& out, const CtmSavePointsOptions& options )
422422
{
423-
MR_TIMER
423+
MR_TIMER;
424424

425425
if ( ( options.saveValidOnly && !cloud.validPoints.any() ) ||
426426
( !options.saveValidOnly && cloud.points.empty() ) )

source/MRIOExtras/MRE57.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace MR::PointsLoad
2727

2828
Expected<std::vector<NamedCloud>> fromSceneE57File( const std::filesystem::path& file, const E57LoadSettings & settings )
2929
{
30-
MR_TIMER
30+
MR_TIMER;
3131
std::vector<NamedCloud> res;
3232
std::optional<AffineXf3d> xf0; // returned transformation of the first not-empty cloud
3333
if ( settings.identityXf )

source/MRIOExtras/MRStep.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ struct StepLoader
210210

211211
[[nodiscard]] Expected<void> loadModelStructure( STEPControl_Reader& reader, [[maybe_unused]] const ProgressCallback& callback )
212212
{
213-
MR_TIMER
213+
MR_TIMER;
214214

215215
{
216-
MR_NAMED_TIMER( "transfer roots" )
216+
MR_NAMED_TIMER( "transfer roots" );
217217

218218
#if MODERN_PROGRESS_INDICATION_SUPPORTED
219219
ProgressIndicator progress( subprogress( callback, 0.00f, 0.80f ) );
@@ -274,7 +274,7 @@ struct StepLoader
274274
/// load object structure without actual geometry data
275275
void loadModelStructure( const Handle( TDocStd_Document )& document )
276276
{
277-
MR_TIMER
277+
MR_TIMER;
278278

279279
const auto shapeTool = XCAFDoc_DocumentTool::ShapeTool( document->Main() );
280280
#if STEP_LOAD_COLORS
@@ -308,7 +308,7 @@ struct StepLoader
308308
/// load and triangulate meshes
309309
void loadMeshes()
310310
{
311-
MR_TIMER
311+
MR_TIMER;
312312

313313
ParallelFor( 0, (int)meshTriangulationContexts_.size(), [&] ( int i )
314314
{
@@ -507,7 +507,7 @@ struct StepLoader
507507

508508
static TopoDS_Shape triangulateShape_( const TopoDS_Shape& shape )
509509
{
510-
MR_TIMER
510+
MR_TIMER;
511511

512512
#if MODERN_BREPMESH_SUPPORTED
513513
IMeshTools_Parameters parameters;
@@ -525,7 +525,7 @@ struct StepLoader
525525

526526
static std::vector<Triangle3f> loadShape_( const TopoDS_Shape& shape )
527527
{
528-
MR_TIMER
528+
MR_TIMER;
529529

530530
struct FeatureData
531531
{
@@ -655,7 +655,7 @@ std::mutex cOpenCascadeTempFileMutex = {};
655655

656656
Expected<void> readFromFile( STEPControl_Reader& reader, const std::filesystem::path& path )
657657
{
658-
MR_TIMER
658+
MR_TIMER;
659659

660660
const TCollection_AsciiString pathStr( path.c_str() );
661661
if ( reader.ReadFile( pathStr.ToCString() ) != IFSelect_RetDone )
@@ -665,7 +665,7 @@ Expected<void> readFromFile( STEPControl_Reader& reader, const std::filesystem::
665665

666666
Expected<void> readFromStream( STEPControl_Reader& reader, std::istream& in )
667667
{
668-
MR_TIMER
668+
MR_TIMER;
669669

670670
#if STEP_READSTREAM_SUPPORTED
671671
if ( reader.ReadStream( "STEP file", in ) != IFSelect_RetDone )
@@ -739,7 +739,7 @@ std::mutex cOpenCascadeMutex = {};
739739

740740
Expected<Mesh> fromStepImpl( const std::function<Expected<void> ( STEPControl_Reader& )>& readFunc, const MeshLoadSettings& settings )
741741
{
742-
MR_TIMER
742+
MR_TIMER;
743743

744744
std::unique_lock lock( cOpenCascadeMutex );
745745

@@ -771,7 +771,7 @@ Expected<Mesh> fromStepImpl( const std::function<Expected<void> ( STEPControl_Re
771771
#ifndef MRIOEXTRAS_OPENCASCADE_USE_XDE
772772
Expected<std::shared_ptr<Object>> fromSceneStepFileImpl( const std::function<Expected<void> ( STEPControl_Reader& )>& readFunc, const MeshLoadSettings& settings )
773773
{
774-
MR_TIMER
774+
MR_TIMER;
775775

776776
std::unique_lock lock( cOpenCascadeMutex );
777777

@@ -797,7 +797,7 @@ Expected<std::shared_ptr<Object>> fromSceneStepFileImpl( const std::function<Exp
797797
#ifdef MRIOEXTRAS_OPENCASCADE_USE_XDE
798798
Expected<std::shared_ptr<Object>> fromSceneStepFileImpl( const std::function<Expected<void> ( STEPControl_Reader& )>& readFunc, const MeshLoadSettings& settings )
799799
{
800-
MR_TIMER
800+
MR_TIMER;
801801

802802
std::unique_lock lock( cOpenCascadeMutex );
803803

@@ -813,7 +813,7 @@ Expected<std::shared_ptr<Object>> fromSceneStepFileImpl( const std::function<Exp
813813

814814
Handle( TDocStd_Document ) document = new TDocStd_Document( "MDTV-CAF" );
815815
{
816-
MR_NAMED_TIMER( "transfer data" )
816+
MR_NAMED_TIMER( "transfer data" );
817817

818818
reader.SetNameMode( true );
819819
#if STEP_LOAD_COLORS

source/MRMesh/MRAABBTree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ inline Box3f computeFaceBox( const Mesh & mesh, FaceId f )
2929

3030
AABBTree::AABBTree( const MeshPart & mp )
3131
{
32-
MR_TIMER
32+
MR_TIMER;
3333

3434
const auto numFaces = mp.region ? (int)mp.region->count() : mp.mesh.topology.numValidFaces();
3535
if ( numFaces <= 0 )
@@ -64,7 +64,7 @@ AABBTree::AABBTree( const MeshPart & mp )
6464

6565
void AABBTree::refit( const Mesh & mesh, const VertBitSet & changedVerts )
6666
{
67-
MR_TIMER
67+
MR_TIMER;
6868

6969
const auto changedFaces = getIncidentFaces( mesh.topology, changedVerts );
7070

source/MRMesh/MRAABBTreeBase.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace MR
1010
template <typename T>
1111
auto AABBTreeBase<T>::getSubtrees( int minNum ) const -> std::vector<NodeId>
1212
{
13-
MR_TIMER
13+
MR_TIMER;
1414
assert( minNum > 0 );
1515
std::vector<NodeId> res;
1616
if ( nodes_.empty() )
@@ -40,7 +40,7 @@ auto AABBTreeBase<T>::getSubtrees( int minNum ) const -> std::vector<NodeId>
4040
template <typename T>
4141
auto AABBTreeBase<T>::getSubtreeLeaves( NodeId subtreeRoot ) const -> LeafBitSet
4242
{
43-
MR_TIMER
43+
MR_TIMER;
4444
LeafBitSet res;
4545

4646
constexpr int MaxStackSize = 32; // to avoid allocations
@@ -71,7 +71,7 @@ auto AABBTreeBase<T>::getSubtreeLeaves( NodeId subtreeRoot ) const -> LeafBitSet
7171
template <typename T>
7272
NodeBitSet AABBTreeBase<T>::getNodesFromLeaves( const LeafBitSet & leaves ) const
7373
{
74-
MR_TIMER
74+
MR_TIMER;
7575
NodeBitSet res( nodes_.size() );
7676

7777
// mark leaves
@@ -96,7 +96,7 @@ NodeBitSet AABBTreeBase<T>::getNodesFromLeaves( const LeafBitSet & leaves ) cons
9696
template <typename T>
9797
void AABBTreeBase<T>::getLeafOrder( LeafBMap & leafMap ) const
9898
{
99-
MR_TIMER
99+
MR_TIMER;
100100
LeafId l( 0 );
101101
for ( auto & n : nodes_ )
102102
{
@@ -110,7 +110,7 @@ void AABBTreeBase<T>::getLeafOrder( LeafBMap & leafMap ) const
110110
template <typename T>
111111
void AABBTreeBase<T>::getLeafOrderAndReset( LeafBMap & leafMap )
112112
{
113-
MR_TIMER
113+
MR_TIMER;
114114
LeafId l( 0 );
115115
for ( auto & n : nodes_ )
116116
{

source/MRMesh/MRAABBTreeObjects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ template void AABBTreeBase<ObjTreeTraits>::getLeafOrderAndReset( LeafBMap & leaf
1515

1616
AABBTreeObjects::AABBTreeObjects( Vector<MeshOrPointsXf, ObjId> objs ) : objs_( std::move( objs ) )
1717
{
18-
MR_TIMER
18+
MR_TIMER;
1919
using BoxedObj = BoxedLeaf<Traits>;
2020
Buffer<BoxedObj> boxedObjs( objs_.size() );
2121
toLocal_.resize( objs_.size() );

0 commit comments

Comments
 (0)