Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise blocks API #106

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Revise blocks API #106

merged 6 commits into from
Nov 20, 2024

Conversation

tpietzsch
Copy link
Member

  • Instead of delegating execution to BlockProcessor, UnaryBlockOperator takes care of chaining operations now:
    The new compute(BlockSupplier source, Interval, Object dest) method handles source interval computation, getting source data, and computing result in one go, instead of the sequential BlockProcessor API.
    This is much nicer. It enables pass-through operators (Convert.Identity or logging for example). It should also be easier now to extend the API to keep data on the GPU for sequences of GPU operators.

  • The copy/compute methods all operate on Interval now. Other signatures have been removed for simplicity. With the new BlockInterval class from imglib2 core, unnecessarily converting between int[] and long[] is usually avoided.

* Instead of delegating execution to BlockProcessor, UnaryBlockOperator
  takes care of chaining operations now:
  The new compute(BlockSupplier source, Interval, Object dest) method
  handles source interval computation, getting source data, and
  computing result in one go, instead of the sequential BlockProcessor
  API.
  This is much nicer. It enables pass-through operators
  (Convert.Identity or logging for example). It should also be easier
  now to extend the API to keep data on the GPU for sequences of GPU
  operators.
* The copy/compute API all operate on Interval now. Other signatures
  have been removed for simplicity. With the new BlockInterval class
  from imglib2 core, unnecessarily converting between int[] and long[]
  is usually avoided.
@tpietzsch tpietzsch merged commit df947d0 into master Nov 20, 2024
1 check passed
@tpietzsch tpietzsch deleted the blocks-revision branch November 20, 2024 19:43
@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/fiji-friends-weekly-dev-update-thread/103718/21

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.

2 participants