Skip to content

Commit

Permalink
Add Missing repr(C)s (#61)
Browse files Browse the repository at this point in the history
Bench: 1305294
  • Loading branch information
jw1912 authored Sep 24, 2024
1 parent 48cfe6a commit 6afaea8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/networks/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::Board;

use super::{accumulator::Accumulator, activation::Activation};

#[repr(C)]
#[derive(Clone, Copy)]
pub struct Layer<T: Copy, const M: usize, const N: usize> {
weights: [Accumulator<T, N>; M],
Expand Down Expand Up @@ -102,6 +103,7 @@ impl<const M: usize, const N: usize> Layer<f32, M, N> {
}
}

#[repr(C)]
#[derive(Clone, Copy)]
pub struct TransposedLayer<T: Copy, const M: usize, const N: usize> {
weights: [Accumulator<T, M>; N],
Expand Down

0 comments on commit 6afaea8

Please sign in to comment.