@@ -196,16 +196,14 @@ NPY_NO_EXPORT void
196
196
* FLOAT, DOUBLE, HALF,
197
197
* CFLOAT, CDOUBLE, CLONGDOUBLE,
198
198
* UBYTE, USHORT, UINT, ULONG, ULONGLONG,
199
- * BYTE, SHORT, INT, LONG, LONGLONG,
200
- * BOOL#
199
+ * BYTE, SHORT, INT, LONG, LONGLONG#
201
200
* #typ = npy_longdouble,
202
201
* npy_float,npy_double,npy_half,
203
202
* npy_cfloat, npy_cdouble, npy_clongdouble,
204
203
* npy_ubyte, npy_ushort, npy_uint, npy_ulong, npy_ulonglong,
205
- * npy_byte, npy_short, npy_int, npy_long, npy_longlong,
206
- * npy_bool#
207
- * #IS_COMPLEX = 0, 0, 0, 0, 1, 1, 1, 0*11#
208
- * #IS_HALF = 0, 0, 0, 1, 0*14#
204
+ * npy_byte, npy_short, npy_int, npy_long, npy_longlong#
205
+ * #IS_COMPLEX = 0, 0, 0, 0, 1, 1, 1, 0*10#
206
+ * #IS_HALF = 0, 0, 0, 1, 0*13#
209
207
*/
210
208
211
209
NPY_NO_EXPORT void
@@ -266,7 +264,44 @@ NPY_NO_EXPORT void
266
264
}
267
265
268
266
/**end repeat**/
267
+ NPY_NO_EXPORT void
268
+ BOOL_matmul_inner_noblas (void * _ip1 , npy_intp is1_m , npy_intp is1_n ,
269
+ void * _ip2 , npy_intp is2_n , npy_intp is2_p ,
270
+ void * _op , npy_intp os_m , npy_intp os_p ,
271
+ npy_intp dm , npy_intp dn , npy_intp dp )
272
+
273
+ {
274
+ npy_intp m , n , p ;
275
+ npy_intp ib2_p , ob_p ;
276
+ char * ip1 = (char * )_ip1 , * ip2 = (char * )_ip2 , * op = (char * )_op ;
269
277
278
+ ib2_p = is2_p * dp ;
279
+ ob_p = os_p * dp ;
280
+
281
+ for (m = 0 ; m < dm ; m ++ ) {
282
+ for (p = 0 ; p < dp ; p ++ ) {
283
+ char * ip1tmp = ip1 ;
284
+ char * ip2tmp = ip2 ;
285
+ * (npy_bool * )op = NPY_FALSE ;
286
+ for (n = 0 ; n < dn ; n ++ ) {
287
+ npy_bool val1 = (* (npy_bool * )ip1tmp );
288
+ npy_bool val2 = (* (npy_bool * )ip2tmp );
289
+ if (val1 != 0 && val2 != 0 ) {
290
+ * (npy_bool * )op = NPY_TRUE ;
291
+ break ;
292
+ }
293
+ ip2tmp += is2_n ;
294
+ ip1tmp += is1_n ;
295
+ }
296
+ op += os_p ;
297
+ ip2 += is2_p ;
298
+ }
299
+ op -= ob_p ;
300
+ ip2 -= ib2_p ;
301
+ ip1 += is1_m ;
302
+ op += os_m ;
303
+ }
304
+ }
270
305
271
306
NPY_NO_EXPORT void
272
307
OBJECT_matmul_inner_noblas (void * _ip1 , npy_intp is1_m , npy_intp is1_n ,
0 commit comments