Modernise
This commit is contained in:
16
flake.nix
16
flake.nix
@@ -27,7 +27,11 @@
|
||||
|
||||
# Common build inputs for all derivations
|
||||
commonArgs = {
|
||||
src = pkgs.lib.cleanSourceWith { src = ./.; name = "source"; filter = path: type: (builtins.match ".*csv$" path != null || craneLib.filterCargoSources path type); };
|
||||
src = pkgs.lib.cleanSourceWith {
|
||||
src = ./.;
|
||||
name = "source";
|
||||
filter = path: type: (builtins.match ".*csv$" path != null || craneLib.filterCargoSources path type);
|
||||
};
|
||||
strictDeps = true;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
@@ -64,20 +68,20 @@
|
||||
nativeBuildInputs = commonArgs.nativeBuildInputs;
|
||||
|
||||
# Additional dev tools
|
||||
packages = with pkgs; [
|
||||
packages = [
|
||||
rustToolchain
|
||||
rust-analyzer
|
||||
pkgs.rust-analyzer
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
|
||||
};
|
||||
|
||||
ci = pkgs.mkShell {
|
||||
buildInputs = commonArgs.buildInputs ++ ([
|
||||
buildInputs = commonArgs.buildInputs ++ [
|
||||
pkgs.nodePackages.markdown-link-check
|
||||
pkgs.nixpkgs-fmt
|
||||
pkgs.rustToolchain
|
||||
]);
|
||||
rustToolchain
|
||||
];
|
||||
|
||||
nativeBuildInputs = commonArgs.nativeBuildInputs;
|
||||
|
||||
|
@@ -727,10 +727,10 @@ impl<A, Tag, const RANK: usize> RankedDifferentiableTagged<A, Tag, RANK> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map2_tagged<'a, 'b, B, C, Tag2, Tag3, F>(
|
||||
pub fn map2_tagged<'a, B, C, Tag2, Tag3, F>(
|
||||
self: &'a RankedDifferentiableTagged<A, Tag, RANK>,
|
||||
other: &'a RankedDifferentiableTagged<B, Tag2, RANK>,
|
||||
f: &'b mut F,
|
||||
f: &mut F,
|
||||
) -> RankedDifferentiableTagged<C, Tag3, RANK>
|
||||
where
|
||||
F: FnMut(&Scalar<A>, Tag, &Scalar<B>, Tag2) -> (Scalar<C>, Tag3),
|
||||
@@ -843,8 +843,7 @@ where
|
||||
F: FnMut(
|
||||
&[DifferentiableTagged<A, Tag>; PARAM_RANK],
|
||||
) -> RankedDifferentiableTagged<A, Tag, RANK>,
|
||||
A: ?Sized
|
||||
+ Clone
|
||||
A: Clone
|
||||
+ Hash
|
||||
+ AddAssign
|
||||
+ Add<Output = A>
|
||||
|
@@ -32,6 +32,7 @@ where
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[expect(clippy::type_complexity)]
|
||||
pub fn dense<'b, A, Tag>(
|
||||
input_len: usize,
|
||||
neuron_count: usize,
|
||||
|
Reference in New Issue
Block a user