File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -172,14 +172,16 @@ impl Opfamily {
172
172
( B :: Vecf32 ( x) , PgDistanceKind :: L2 ) => O :: Vecf32 ( x. own ( ) ) ,
173
173
( B :: Vecf32 ( x) , PgDistanceKind :: Dot ) => O :: Vecf32 ( x. own ( ) ) ,
174
174
( B :: Vecf32 ( x) , PgDistanceKind :: Cos ) => O :: Vecf32 ( x. function_normalize ( ) ) ,
175
- ( B :: Vecf16 ( x) , _) => O :: Vecf16 ( x. own ( ) ) ,
175
+ ( B :: Vecf16 ( x) , PgDistanceKind :: L2 ) => O :: Vecf16 ( x. own ( ) ) ,
176
+ ( B :: Vecf16 ( x) , PgDistanceKind :: Dot ) => O :: Vecf16 ( x. own ( ) ) ,
177
+ ( B :: Vecf16 ( x) , PgDistanceKind :: Cos ) => O :: Vecf16 ( x. function_normalize ( ) ) ,
176
178
}
177
179
}
178
180
pub fn process ( self , x : Distance ) -> f32 {
179
181
match self . pg_distance {
180
182
PgDistanceKind :: Cos => f32:: from ( x) + 1.0f32 ,
181
183
PgDistanceKind :: L2 => f32:: from ( x) . sqrt ( ) ,
182
- _ => f32 :: from ( x ) ,
184
+ PgDistanceKind :: Dot => x . into ( ) ,
183
185
}
184
186
}
185
187
pub fn distance_kind ( self ) -> DistanceKind {
You can’t perform that action at this time.
0 commit comments