Displaying 2 results from an estimated 2 matches for "int64_vector_search".
2020 Jul 07
0
[nbdkit PATCH 1/3] vector: Add VECT_remove
...+ for (i = 0; i < 10; ++i)
+ assert (v.ptr[i] == 9 - i);
+ int64_vector_sort (&v, compare);
for (i = 0; i < 10; ++i)
assert (v.ptr[i] == i);
+
+ r = int64_vector_remove (&v, 1);
+ assert (r == 0);
+ assert (v.size == 9);
+ assert (v.ptr[1] == 2);
+
+ tmp = 10;
+ p = int64_vector_search (&v, &tmp, (void*) compare);
+ assert (p == NULL);
+ tmp = 8;
+ p = int64_vector_search (&v, &tmp, (void*) compare);
+ assert (p == &v.ptr[7]);
+
free (v.ptr);
}
--
2.27.0
2020 Jul 07
6
[RFC nbdkit PATCH 0/3] aligned .extents
Ultimately, both the blocksize and swab filters want to return aligned
extents to the client. I'm posting this as a snapshot of my work in
progress on how I plan to get there (it's not quite working yet, but
I'm done for today and wanted to at least document my ideas).
I might also add a convenience function for nbdkit_extents_offset,
since we have a number of filters that repeat the