Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22ffd4fc64 | ||
|
|
9ac3d4d699 |
@ -60,9 +60,9 @@ pub fn Tensor(
|
||||
}
|
||||
|
||||
pub fn copy(self: *const Self, alloc: Allocator) !Self {
|
||||
var new = try splat(alloc, 0);
|
||||
new.data = self.data;
|
||||
return new;
|
||||
const vec_ptr = try alloc.create(Vec);
|
||||
vec_ptr.* = self.data.*;
|
||||
return .{ .data = vec_ptr };
|
||||
}
|
||||
|
||||
/// Convert N-D coords (row-major) to flat index — fully comptime.
|
||||
|
||||
1775
src/TensorGpu.zig
Normal file
1775
src/TensorGpu.zig
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ const std = @import("std");
|
||||
|
||||
pub const TensorStatic = @import("TensorStatic.zig").Tensor;
|
||||
pub const TensorAlloc = @import("TensorAlloc.zig").Tensor;
|
||||
pub const TensorGpu = @import("TensorGpu.zig").Tensor;
|
||||
pub const Dimensions = @import("Dimensions.zig");
|
||||
pub const Scales = @import("Scales.zig");
|
||||
pub const Base = @import("Base.zig");
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
test {
|
||||
_ = @import("TensorStatic.zig");
|
||||
_ = @import("TensorAlloc.zig");
|
||||
_ = @import("TensorGpu.zig");
|
||||
_ = @import("Dimensions.zig");
|
||||
_ = @import("Scales.zig");
|
||||
_ = @import("Base.zig");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user