|
1 | | -use crate::array::Array; |
2 | | -use crate::defines::{AfError, MatProp}; |
3 | | -use crate::error::HANDLE_ERROR; |
4 | | -use crate::util::{af_array, to_u32}; |
5 | | -use crate::util::{FloatingPoint, HasAfEnum}; |
| 1 | +use super::core::{af_array, AfError, Array, FloatingPoint, HasAfEnum, MatProp, HANDLE_ERROR}; |
| 2 | + |
6 | 3 | use libc::{c_int, c_uint, c_void}; |
7 | 4 | use std::vec::Vec; |
8 | 5 |
|
@@ -133,8 +130,8 @@ pub fn gemm<T>( |
133 | 130 | let mut out = output.get(); |
134 | 131 | let err_val = af_gemm( |
135 | 132 | &mut out as *mut af_array, |
136 | | - to_u32(optlhs) as c_uint, |
137 | | - to_u32(optrhs) as c_uint, |
| 133 | + optlhs as c_uint, |
| 134 | + optrhs as c_uint, |
138 | 135 | alpha.as_ptr() as *const c_void, |
139 | 136 | lhs.get(), |
140 | 137 | rhs.get(), |
@@ -167,8 +164,8 @@ where |
167 | 164 | &mut temp as *mut af_array, |
168 | 165 | lhs.get(), |
169 | 166 | rhs.get(), |
170 | | - to_u32(optlhs) as c_uint, |
171 | | - to_u32(optrhs) as c_uint, |
| 167 | + optlhs as c_uint, |
| 168 | + optrhs as c_uint, |
172 | 169 | ); |
173 | 170 | HANDLE_ERROR(AfError::from(err_val)); |
174 | 171 | temp.into() |
@@ -199,8 +196,8 @@ where |
199 | 196 | &mut temp as *mut af_array, |
200 | 197 | lhs.get(), |
201 | 198 | rhs.get(), |
202 | | - to_u32(optlhs) as c_uint, |
203 | | - to_u32(optrhs) as c_uint, |
| 199 | + optlhs as c_uint, |
| 200 | + optrhs as c_uint, |
204 | 201 | ); |
205 | 202 | HANDLE_ERROR(AfError::from(err_val)); |
206 | 203 | temp.into() |
|
0 commit comments