Skip to content

Commit a94493f

Browse files
Renamed notify_symbolic_width to notify_opaque_width
1 parent 2e5c7a6 commit a94493f

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

include/drjit-core/array.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ template <JitBackend Backend_, typename Value_> struct JitArray {
253253
return jit_var_size(m_index);
254254
}
255255

256-
auto symbolic_width() {
256+
auto opaque_width() {
257257
using UInt32 = JitArray<Backend_, uint32_t>;
258258
return UInt32::steal(jit_var_opaque_width(m_index));
259259
}

src/api.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ uint32_t jit_var_opaque_width(uint32_t index) {
626626
(JitBackend) var->backend, VarType::UInt32, &var_size, 1, true);
627627

628628
ThreadState *ts = thread_state(var->backend);
629-
ts->notify_symbolic_width(index, width_index);
629+
ts->notify_opaque_width(index, width_index);
630630

631631
return width_index;
632632
}

src/init.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,4 +768,4 @@ void ThreadState::reset_state() {
768768
}
769769
void ThreadState::notify_free(const void *) { }
770770
void ThreadState::notify_expand(uint32_t) { }
771-
void ThreadState::notify_symbolic_width(uint32_t, uint32_t) { }
771+
void ThreadState::notify_opaque_width(uint32_t, uint32_t) { }

src/internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ struct ThreadState : public ThreadStateBase {
720720
virtual void reduce_expanded(VarType vt, ReduceOp op, void *data,
721721
uint32_t exp, uint32_t size) = 0;
722722

723-
virtual void notify_symbolic_width(uint32_t index, uint32_t width_index);
723+
virtual void notify_opaque_width(uint32_t index, uint32_t width_index);
724724

725725
/// Notify the \c ThreadState that \c jitc_free has been called on a pointer.
726726
/// This is required for kernel freezing.

src/record_ts.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ int Recording::replay(const uint32_t *replay_inputs, uint32_t *replay_outputs) {
373373
if (!replay_aggregate(op))
374374
return false;
375375
break;
376-
case OpType::SymbolicWidth:
377-
if(!replay_symbolic_width(op))
376+
case OpType::OpaqueWidth:
377+
if(!replay_opaque_width(op))
378378
return false;
379379
break;
380380
case OpType::Free: {
@@ -475,7 +475,7 @@ void RecordThreadState::barrier() {
475475
return m_internal->barrier();
476476
}
477477

478-
void RecordThreadState::notify_symbolic_width(uint32_t index,
478+
void RecordThreadState::notify_opaque_width(uint32_t index,
479479
uint32_t width_index) {
480480
if (!paused()) {
481481
uint32_t start = m_recording.dependencies.size();
@@ -486,13 +486,13 @@ void RecordThreadState::notify_symbolic_width(uint32_t index,
486486
uint32_t end = m_recording.dependencies.size();
487487

488488
Operation op;
489-
op.type = OpType::SymbolicWidth;
489+
op.type = OpType::OpaqueWidth;
490490
op.dependency_range = std::pair(start, end);
491491
m_recording.operations.push_back(op);
492492
}
493493
}
494494

495-
int Recording::replay_symbolic_width(Operation &op){
495+
int Recording::replay_opaque_width(Operation &op){
496496

497497
uint32_t dependency_index = op.dependency_range.first;
498498
AccessInfo in_info = dependencies[dependency_index];

src/record_ts.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ enum class OpType {
3838
BlockPrefixReduce,
3939
ReduceDot,
4040
Aggregate,
41-
SymbolicWidth,
41+
OpaqueWidth,
4242
Free,
4343
Count,
4444
};
@@ -297,7 +297,7 @@ struct Recording {
297297

298298
int replay_aggregate(Operation &op);
299299

300-
int replay_symbolic_width(Operation &op);
300+
int replay_opaque_width(Operation &op);
301301

302302
/// This function is called after recording and checks that the recording is
303303
/// valid i.e. that no variables where left uninitialized.
@@ -431,7 +431,7 @@ struct RecordThreadState : ThreadState {
431431
void reduce_expanded(VarType vt, ReduceOp reduce_op, void *data,
432432
uint32_t exp, uint32_t size) override;
433433

434-
void notify_symbolic_width(uint32_t index, uint32_t width_index) override;
434+
void notify_opaque_width(uint32_t index, uint32_t width_index) override;
435435

436436
/**
437437
* This function is called every time a pointer is freed using \ref

tests/record.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,11 @@ TEST_LLVM(10_scatter) {
249249
}
250250
}
251251

252-
TEST_BOTH(11_symbolic_width) {
252+
TEST_BOTH(11_opaque_width) {
253253
auto func = [](UInt32 x) {
254254
auto y = block_prefix_sum(x+1, x.size());
255255
if (jit_flag(JitFlag::FreezingScope))
256-
y = y / x.symbolic_width();
256+
y = y / x.opaque_width();
257257
else
258258
y = y / x.size();
259259
return y;

0 commit comments

Comments
 (0)