Skip to content

Conversation

@keptsecret
Copy link
Contributor

No description provided.

struct decode_before_scramble_helper
{
using scalar_type = typename Q::scalar_type;
using unsigned_scalar_type = typename Q::scalar_type;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scalar_type is a misnomer, I'd at least call it storage_scalar_type

{
NBL_CONSTEXPR_STATIC_INLINE uint16_t Dim = Q::Dimension;
using sequence_type = Q;
using unorm_vec_type = vector<F, Dim>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

total misnomer, F is a floating point type, so call it uniform_vec_type or input_type

Comment on lines 48 to 49
using unsigned_scalar_type = unsigned_integer_of_size_t<sizeof(F)>;
using uvec_type = vector<unsigned_scalar_type, Dim>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsigned_scalar_type and uvbec_type are misnomers, I'd call them uniform_storage_scalar_type and uniform_storage_type and also add a comment that explains they're the type which holds the uint bit representation of a unorm thats allowed to have 1s in MSB (normalized w.r.t whole scalar)

@devshgraphicsprogramming
Copy link
Member

@keptsecret the HLSL Path Tracer (on the other branch) works with a quantized sequence from the latest commit here, correct?

@AnastaZIuk
Copy link
Member

all of those asserts is typo & false trigger

store_type get(const uint16_t idx) { assert(idx > 0 && idx < 1); return data; }

void set(const uint16_t idx, const store_type value) { assert(idx > 0 && idx < 1); data = value; }

scalar_type get(const uint16_t idx) { assert(idx > 0 && idx < Dim); return data[idx]; }

void set(const uint16_t idx, const scalar_type value) { assert(idx > 0 && idx < Dim); data[idx] = value; }

since index can be 0

static this_t create(const vector<store_type, Dimension> value)
{
this_t seq;
seq.data = store_type(0u);
NBL_UNROLL for (uint16_t i = 0; i < Dimension; i++)
seq.set(i, value[i]);

should be idx < Dim or idx >= 0 && idx < Dim

@keptsecret
Copy link
Contributor Author

@keptsecret the HLSL Path Tracer (on the other branch) works with a quantized sequence from the latest commit here, correct?

Yep, last I checked still works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants