Skip to content

Commit

Permalink
Change bulk evaluation signature (#107)
Browse files Browse the repository at this point in the history
Changed `BulkEvaluator::eval` signature to take x, y, z arguments as
`&[T]` instead of `&[f32]`. This is more flexible for gradient
evaluation, because it allows the caller to specify up to three
gradients, without pinning them to specific argument.

(this is a building block for eventually decoupling evaluation from
specifically requiring`(x, y, z)` arguments)
  • Loading branch information
mkeeter authored May 17, 2024
1 parent 4d80ae5 commit a3ef12e
Show file tree
Hide file tree
Showing 12 changed files with 226 additions and 186 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
- Change signature of `fidget::render::render2d` to pass the mode only as a
generic parameter, instead of an argument
- Add new operations: `floor`, `ceil`, `round`, `atan2`
- Changed `BulkEvaluator::eval` signature to take x, y, z arguments as `&[T]`
instead of `&[f32]`. This is more flexible for gradient evaluation, because
it allows the caller to specify up to three gradients, without pinning them to
specific argument.

# 0.2.6
This is a relatively small release; there are a few features to improve the
Expand Down
6 changes: 3 additions & 3 deletions fidget/src/core/eval/bulk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pub trait BulkEvaluator: Default {
fn eval(
&mut self,
tape: &Self::Tape,
x: &[f32],
y: &[f32],
z: &[f32],
x: &[Self::Data],
y: &[Self::Data],
z: &[Self::Data],
) -> Result<&[Self::Data], Error>;

/// Build a new empty evaluator
Expand Down
Loading

0 comments on commit a3ef12e

Please sign in to comment.