Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code that is no longer used #32

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,4 @@ impl BufferLayout {
};
}

pub const NUM_BUFFERS: usize = 3;

pub const SHADER_ENTRY_POINT: &str = "matmul";

// Helper functions for index calculations
#[inline]
pub fn get_matrix_index(row: u32, col: u32, stride: u32) -> usize {
(row * stride + col) as usize
}

pub fn validate_dimensions(a_dims: (u32, u32), b_dims: (u32, u32)) -> bool {
a_dims.1 == b_dims.0
}

pub fn get_output_dimensions(a_dims: (u32, u32), b_dims: (u32, u32)) -> Option<(u32, u32)> {
if validate_dimensions(a_dims, b_dims) {
Some((a_dims.0, b_dims.1))
} else {
None
}
}