p2 build tests
This commit is contained in:
parent
9a295f3f2f
commit
b2495bcff7
|
|
@ -1,8 +1,9 @@
|
|||
.{
|
||||
.name = "miniaudio",
|
||||
.name = .miniaudio,
|
||||
.version = "0.0.0",
|
||||
.dependencies = .{},
|
||||
.paths = .{
|
||||
"",
|
||||
},
|
||||
.fingerprint = 0xaeac616fa937921a,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
.{
|
||||
.name = "nfd",
|
||||
.name = .nfd,
|
||||
.version = "0.0.0",
|
||||
.dependencies = .{ .p2 = .{ .path = "../p2" } },
|
||||
.paths = .{
|
||||
"",
|
||||
},
|
||||
.fingerprint = 0xc4705658dee6a489,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,14 +73,14 @@ pub const Span = spans.Span;
|
|||
pub const shell = @import("utils/shell.zig");
|
||||
|
||||
comptime {
|
||||
// std.testing.refAllDecls(utils);
|
||||
// std.testing.refAllDecls(static_structures);
|
||||
// std.testing.refAllDecls(ring_queue);
|
||||
// std.testing.refAllDecls(sparse_set);
|
||||
// std.testing.refAllDecls(stack_structures);
|
||||
// std.testing.refAllDecls(index_pool);
|
||||
// std.testing.refAllDecls(concurrent_queue);
|
||||
// std.testing.refAllDecls(string_pool);
|
||||
std.testing.refAllDecls(utils);
|
||||
std.testing.refAllDecls(static_structures);
|
||||
std.testing.refAllDecls(ring_queue);
|
||||
std.testing.refAllDecls(sparse_set);
|
||||
std.testing.refAllDecls(stack_structures);
|
||||
std.testing.refAllDecls(index_pool);
|
||||
std.testing.refAllDecls(concurrent_queue);
|
||||
std.testing.refAllDecls(string_pool);
|
||||
std.testing.refAllDecls(spans);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ pub fn ConcurrentQueueUnmanagedAdvanced(comptime T: type, comptime opts: struct
|
|||
// tail points to next free slot
|
||||
// head points to the next one to pop
|
||||
pub fn initCapacity(allocator: std.mem.Allocator, cap: usize) !@This() {
|
||||
const new = .{
|
||||
const new = @This(){
|
||||
.data = try allocator.alloc(T, cap + 1),
|
||||
.status = try allocator.alloc(Atomic(bool), cap + 1),
|
||||
.head = Atomic(usize).init(0),
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ test "index pool test" {
|
|||
}
|
||||
|
||||
// Insert 1 randomly add and delete objects another million objects in groups
|
||||
var prng = std.rand.DefaultPrng.init(0x1234);
|
||||
var prng = std.Random.DefaultPrng.init(0x1234);
|
||||
var rand = prng.random();
|
||||
|
||||
var workBuffer: [5]Handle = .{ .{}, .{}, .{}, .{}, .{} };
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ const StringAllocation = struct {
|
|||
const rc: [*]std.atomic.Value(u8) = @ptrCast(self.ptr); //+= 1;
|
||||
|
||||
if (rc[3].fetchSub(1, .release) == 1) {
|
||||
rc[3].fence(.acquire);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +202,7 @@ const Bucket = struct {
|
|||
|
||||
return rv;
|
||||
} else {
|
||||
const index = self.freeSlots.pop();
|
||||
const index = self.freeSlots.pop().?;
|
||||
|
||||
const rv: BucketAllocation = .{
|
||||
.bytes = self.indexToSlot(self.i2p(index), self.ibp(index)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue