@@ -1490,26 +1490,6 @@ TIMEDELTA_mm_qm_divmod(char **args, npy_intp const *dimensions, npy_intp const *
14901490 *****************************************************************************
14911491 */
14921492
1493- /**begin repeat
1494- * Float types
1495- * #type = npy_float, npy_double#
1496- * #TYPE = FLOAT, DOUBLE#
1497- * #scalarf = npy_sqrtf, npy_sqrt#
1498- */
1499-
1500- NPY_NO_EXPORT void
1501- @TYPE @_sqrt (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (func ))
1502- {
1503- if (!run_unary_simd_sqrt_ @TYPE @(args , dimensions , steps )) {
1504- UNARY_LOOP {
1505- const @type @ in1 = * (@type @ * )ip1 ;
1506- * (@type @ * )op1 = @scalarf @(in1 );
1507- }
1508- }
1509- }
1510-
1511- /**end repeat**/
1512-
15131493/**begin repeat
15141494 * #func = rint, ceil, floor, trunc#
15151495 * #scalarf = npy_rint, npy_ceil, npy_floor, npy_trunc#
@@ -1579,53 +1559,6 @@ DOUBLE_log(char **args, npy_intp const *dimensions, npy_intp const *steps, void
15791559 * #typesub = f, #
15801560 */
15811561
1582- NPY_NO_EXPORT NPY_GCC_OPT_3 void
1583- @TYPE @_sqrt_ @isa @(char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
1584- {
1585- if (!run_unary_ @isa @_sqrt_ @TYPE @(args , dimensions , steps )) {
1586- UNARY_LOOP {
1587- const @type @ in1 = * (@type @ * )ip1 ;
1588- * (@type @ * )op1 = npy_sqrt @typesub @(in1 );
1589- }
1590- }
1591- }
1592-
1593- NPY_NO_EXPORT NPY_GCC_OPT_3 void
1594- @TYPE @_absolute_ @isa @(char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
1595- {
1596- if (!run_unary_ @isa @_absolute_ @TYPE @(args , dimensions , steps )) {
1597- UNARY_LOOP {
1598- const @type @ in1 = * (@type @ * )ip1 ;
1599- const @type @ tmp = in1 > 0 ? in1 : - in1 ;
1600- /* add 0 to clear -0.0 */
1601- * ((@type @ * )op1 ) = tmp + 0 ;
1602- }
1603- }
1604- npy_clear_floatstatus_barrier ((char * )dimensions );
1605- }
1606-
1607- NPY_NO_EXPORT NPY_GCC_OPT_3 void
1608- @TYPE @_square_ @isa @(char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
1609- {
1610- if (!run_unary_ @isa @_square_ @TYPE @(args , dimensions , steps )) {
1611- UNARY_LOOP {
1612- const @type @ in1 = * (@type @ * )ip1 ;
1613- * (@type @ * )op1 = in1 * in1 ;
1614- }
1615- }
1616- }
1617-
1618- NPY_NO_EXPORT NPY_GCC_OPT_3 void
1619- @TYPE @_reciprocal_ @isa @(char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
1620- {
1621- if (!run_unary_ @isa @_reciprocal_ @TYPE @(args , dimensions , steps )) {
1622- UNARY_LOOP {
1623- const @type @ in1 = * (@type @ * )ip1 ;
1624- * (@type @ * )op1 = 1.0f /in1 ;
1625- }
1626- }
1627- }
1628-
16291562/**begin repeat2
16301563 * #func = rint, ceil, floor, trunc#
16311564 * #scalarf = npy_rint, npy_ceil, npy_floor, npy_trunc#
@@ -2047,33 +1980,6 @@ NPY_NO_EXPORT void
20471980 }
20481981}
20491982
2050- NPY_NO_EXPORT void
2051- @TYPE @_square (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
2052- {
2053- char * margs [] = {args [0 ], args [0 ], args [1 ]};
2054- npy_intp msteps [] = {steps [0 ], steps [0 ], steps [1 ]};
2055- if (!run_binary_simd_multiply_ @TYPE @(margs , dimensions , msteps )) {
2056- UNARY_LOOP {
2057- const @type @ in1 = * (@type @ * )ip1 ;
2058- * ((@type @ * )op1 ) = in1 * in1 ;
2059- }
2060- }
2061- }
2062-
2063- NPY_NO_EXPORT void
2064- @TYPE @_reciprocal (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
2065- {
2066- @type @ one = 1. @c @;
2067- char * margs [] = {(char * )& one , args [0 ], args [1 ]};
2068- npy_intp msteps [] = {0 , steps [0 ], steps [1 ]};
2069- if (!run_binary_simd_divide_ @TYPE @(margs , dimensions , msteps )) {
2070- UNARY_LOOP {
2071- const @type @ in1 = * (@type @ * )ip1 ;
2072- * ((@type @ * )op1 ) = 1 /in1 ;
2073- }
2074- }
2075- }
2076-
20771983NPY_NO_EXPORT void
20781984@TYPE @__ones_like (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
20791985{
@@ -2091,20 +1997,6 @@ NPY_NO_EXPORT void
20911997 }
20921998}
20931999
2094- NPY_NO_EXPORT void
2095- @TYPE @_absolute (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (func ))
2096- {
2097- if (!run_unary_simd_absolute_ @TYPE @(args , dimensions , steps )) {
2098- UNARY_LOOP {
2099- const @type @ in1 = * (@type @ * )ip1 ;
2100- const @type @ tmp = in1 > 0 ? in1 : - in1 ;
2101- /* add 0 to clear -0.0 */
2102- * ((@type @ * )op1 ) = tmp + 0 ;
2103- }
2104- }
2105- npy_clear_floatstatus_barrier ((char * )dimensions );
2106- }
2107-
21082000NPY_NO_EXPORT void
21092001@TYPE @_negative (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (func ))
21102002{
@@ -2214,6 +2106,42 @@ NPY_NO_EXPORT void
22142106
22152107/**end repeat**/
22162108
2109+ /*
2110+ *****************************************************************************
2111+ ** LONGDOUBLE LOOPS **
2112+ *****************************************************************************
2113+ */
2114+
2115+ NPY_NO_EXPORT void
2116+ LONGDOUBLE_reciprocal (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
2117+ {
2118+ UNARY_LOOP {
2119+ const npy_longdouble in1 = * (npy_longdouble * )ip1 ;
2120+ * ((npy_longdouble * )op1 ) = 1 /in1 ;
2121+ }
2122+ }
2123+
2124+ NPY_NO_EXPORT void
2125+ LONGDOUBLE_absolute (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (func ))
2126+ {
2127+ UNARY_LOOP {
2128+ const npy_longdouble in1 = * (npy_longdouble * )ip1 ;
2129+ const npy_longdouble tmp = in1 > 0 ? in1 : - in1 ;
2130+ /* add 0 to clear -0.0 */
2131+ * ((npy_longdouble * )op1 ) = tmp + 0 ;
2132+ }
2133+ npy_clear_floatstatus_barrier ((char * )dimensions );
2134+ }
2135+
2136+ NPY_NO_EXPORT void
2137+ LONGDOUBLE_square (char * * args , npy_intp const * dimensions , npy_intp const * steps , void * NPY_UNUSED (data ))
2138+ {
2139+ UNARY_LOOP {
2140+ const npy_longdouble in1 = * (npy_longdouble * )ip1 ;
2141+ * ((npy_longdouble * )op1 ) = in1 * in1 ;
2142+ }
2143+ }
2144+
22172145/*
22182146 *****************************************************************************
22192147 ** HALF-FLOAT LOOPS **
0 commit comments