Skip to content

Commit

Permalink
enqueue_host_func comment
Browse files Browse the repository at this point in the history
  • Loading branch information
DoeringChristian committed Nov 28, 2024
1 parent afd307f commit c4433a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/record_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1682,8 +1682,6 @@ void RecordThreadState::enqueue_host_func(void (*callback)(void *),
void *payload) {
jitc_raise("RecordThreadState::enqueue_host_func(): this function cannot "
"be recorded!");
// At the time of writing, \c enqueue_host_func is only called when freeing
// NumPy arrays, it is therefore fine to ignore during recording.
pause_scope pause(this);
return m_internal->enqueue_host_func(callback, payload);
}
Expand Down
14 changes: 10 additions & 4 deletions src/record_ts.h
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,20 @@ struct RecordThreadState : ThreadState {

/// Asynchronously update a single element in memory
/// Recording of this function is currently not supported, and the function
/// will throw an error. At the time of writing, \c poke is only called from
/// \c jit_var_write. \c src will therefore not be a pointer, allocated with
/// \c jitc_malloc, and we cannot track it.
/// will raise an exception. At the time of writing, \c poke is only called
/// from \c jit_var_write. \c src will therefore not be a pointer, allocated
/// with \c jitc_malloc, and we cannot track it.
void poke(void *dst, const void *src, uint32_t size) override;

void aggregate(void *dst, AggregationEntry *agg, uint32_t size) override;

// Enqueue a function to be run on the host once backend computation is done
/// Enqueue a function to be run on the host once backend computation is
/// done. Recording of this function is currently not supported, and the
/// function will raise an exception. It is not feasible to support this
/// function, since no information about the payload is known. At the time
/// of writing this function is only used to enqueue the destruction of
/// NumPy arrays i.e. when constructing a Dr.Jit array from a NumPy array.
/// This should only occur outside of frozen functions.
void enqueue_host_func(void (*callback)(void *), void *payload) override;

/// LLVM: reduce a variable that was previously expanded due to
Expand Down

0 comments on commit c4433a4

Please sign in to comment.