-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for Openslide 4.x (#118)
- Loading branch information
Showing
10 changed files
with
203 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use crate::{bindings, Result}; | ||
|
||
#[derive(Debug)] | ||
pub(crate) struct Cache(pub(crate) bindings::CacheWrapper); | ||
|
||
impl Drop for Cache { | ||
fn drop(&mut self) { | ||
bindings::cache_release(*self.0); | ||
} | ||
} | ||
|
||
impl Cache { | ||
/// Create a new cache with the given capacity | ||
pub fn new(capacity: usize) -> Result<Cache> { | ||
let cache = bindings::CacheWrapper(bindings::cache_create(capacity)?); | ||
Ok(Cache(cache)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1911455
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openslide-rs Benchmark
deepzoom_read_image_256
1174741
ns/iter (± 8226
)1174243
ns/iter (± 5732
)1.00
deepzoom_read_image_256_arc
1175096
ns/iter (± 9223
)1174068
ns/iter (± 6883
)1.00
deepzoom_read_image_256_recreate_dz
1176436
ns/iter (± 12406
)deepzoom_read_image_512
4728602
ns/iter (± 28274
)4709524
ns/iter (± 41606
)1.00
deepzoom_read_image_512_arc
4725596
ns/iter (± 50711
)4711445
ns/iter (± 51159
)1.00
deepzoom_read_image_512_recreate_dz
4724551
ns/iter (± 56379
)openslide_read_image_256
1139618
ns/iter (± 11657
)1136848
ns/iter (± 9235
)1.00
openslide_read_image_512
4738644
ns/iter (± 86330
)4726958
ns/iter (± 56626
)1.00
openslide_read_region_256
1087743
ns/iter (± 8899
)1088449
ns/iter (± 6957
)1.00
openslide_read_region_512
4531293
ns/iter (± 60344
)4525222
ns/iter (± 89830
)1.00
This comment was automatically generated by workflow using github-action-benchmark.