Skip to content

Commit b380801

Browse files
[cleanup] Fixing some truncation compiler warnings
1 parent db11bee commit b380801

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

openpgl/directional/dqt/DQTFactory.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class DirectionalQuadtreeFactory {
4848
// This additionally steers splitting of leaves which internally have an uneven distribution of incoming radiance.
4949
SplitMetric splitMetric = SplitMetric::MEAN;
5050
// Nodes are split if their metric is more than a fraction (splitThreshold) of the summed metric over all nodes
51-
float splitThreshold = 0.1;
51+
float splitThreshold = 0.1f;
5252
// Samples are accumulated into multiple nodes according to a footprint that is constructed from the sample center.
5353
// The footprint size is scaled by footprintFactor and the size of leaf in which the sample falls.
5454
// A footprint of 0 denotes that all radiance is accumulated into the single leaf in which the sample falls.
@@ -68,12 +68,12 @@ class DirectionalQuadtreeFactory {
6868
struct StatsNode {
6969
uint32_t offsetChildren = 0;
7070

71-
float sampleWeight = 0;
72-
float splitWeight = 0;
71+
float sampleWeight = 0.f;
72+
float splitWeight = 0.f;
7373

74-
float numSamples = 0;
75-
float firstMoment = 0;
76-
float secondMoment = 0;
74+
float numSamples = 0.f;
75+
float firstMoment = 0.f;
76+
float secondMoment = 0.f;
7777
};
7878

7979
struct Statistics {

openpgl/directional/vmm/AdaptiveSplitandMergeFactory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ struct AdaptiveSplitAndMergeFactory
3939
{
4040
typename WeightedEMFactory::Configuration weightedEMCfg;
4141

42-
float splittingThreshold { 0.75 };
43-
float mergingThreshold { 0.00625 };
42+
float splittingThreshold { 0.75f };
43+
float mergingThreshold { 0.00625f };
4444

4545
bool useSplitAndMerge {true};
4646

openpgl/directional/vmm/VMM.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ Vector3 VonMisesFisherMixture<VecSize, maxComponents>::sample( const Vector2 sam
675675
Vector2 _sample = sample;
676676
float searched = _sample[1];
677677
float sumWeights = 0.0f;
678-
float cdf = 0.0;
678+
float cdf = 0.0f;
679679
//int k0 = 0;
680680
//int k1 = 0;
681681
// find comp

openpgl/directional/vmm/WeightedEMVMMFactory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct WeightedEMVonMisesFisherFactory: public VonMisesFisherFactory< TVMMDistri
6060
{
6161
size_t numSamples {0};
6262
size_t numIterations {0};
63-
float summedWeightedLogLikelihood {0.0};
63+
float summedWeightedLogLikelihood {0.0f};
6464
};
6565

6666
struct PartialFittingMask
@@ -1066,7 +1066,7 @@ void WeightedEMVonMisesFisherFactory< TVMMDistribution>::estimatePartialMAPMeanD
10661066
vmm._meanDirections[cnt-1].z[i] = 1.0f;
10671067

10681068
vmm._meanCosines[cnt-1][i] = 0.0f;
1069-
vmm._kappas[cnt-1][i] = 0.0;
1069+
vmm._kappas[cnt-1][i] = 0.0f;
10701070
}
10711071
}
10721072

0 commit comments

Comments
 (0)