mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Op refactor (#208)
* Add the binary and unary op enums to factorize some code. * Bugfix.
This commit is contained in:
@ -147,7 +147,7 @@ impl Storage {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn unary_impl<B: op::UnaryOp>(&self, layout: &Layout) -> Result<Self> {
|
||||
pub(crate) fn unary_impl<B: op::UnaryOpT>(&self, layout: &Layout) -> Result<Self> {
|
||||
// TODO: Different code path for the contiguous case?
|
||||
match self {
|
||||
Storage::Cpu(storage) => {
|
||||
@ -161,7 +161,7 @@ impl Storage {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn binary_impl<B: op::BinaryOp>(
|
||||
pub(crate) fn binary_impl<B: op::BinaryOpT>(
|
||||
&self,
|
||||
rhs: &Self,
|
||||
lhs_layout: &Layout,
|
||||
|
Reference in New Issue
Block a user