Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergcpp committed Apr 16, 2024
1 parent f95f9c2 commit 9a827bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ force_inline float mix(float x, float y, float a) { return x * (1.0f - a) + y *
force_inline float log_base(const float x, const float base) { return logf(x) / logf(base); }

force_inline float calc_voxel_size(const uint32_t grid_level, const cache_grid_params_t &params) {
return powf(params.log_base, grid_level) / (params.scale * powf(params.log_base, HASH_GRID_LEVEL_BIAS));
return powf(params.log_base, float(grid_level)) / (params.scale * powf(params.log_base, HASH_GRID_LEVEL_BIAS));
}

template <typename T> void rect_fill(Span<T> data, const int stride, const rect_t &rect, T &&val) {
Expand Down
2 changes: 1 addition & 1 deletion internal/RendererCPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ void Ray::Cpu::Renderer<SIMDPolicy>::ResolveSpatialCache(

static const int ResolvePortion = 32768;
assert((s.spatial_cache_entries_.size() % ResolvePortion) == 0);
const int JobsCount = (s.spatial_cache_entries_.size() / ResolvePortion);
const int JobsCount = int(s.spatial_cache_entries_.size() / ResolvePortion);

parallel_for(0, JobsCount, [&](const int i) {
Ref::SpatialCacheResolve(params, s.spatial_cache_entries_, s.spatial_cache_voxels_curr_,
Expand Down

0 comments on commit 9a827bd

Please sign in to comment.