libflame  revision_anchor
Functions
bl1_copymrt.c File Reference

(r)

Functions

void bl1_scopymrt (uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_dcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_ccopymrt (uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_zcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_sscopymrt (uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_sdcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_sccopymrt (uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_szcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_dscopymrt (uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_ddcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_dccopymrt (uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_dzcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_cscopymrt (uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_cdcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_cccopymrt (uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_czcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_zscopymrt (uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_zdcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_zccopymrt (uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_zzcopymrt (uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 

Function Documentation

◆ bl1_cccopymrt()

void bl1_cccopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
1497 {
1498  scomplex* a_begin;
1499  scomplex* b_begin;
1500  int lda, inca;
1501  int ldb, incb;
1502  int n_iter;
1503  int n_elem;
1504  int n_elem_max;
1505  int n_elem_is_descending;
1506  int j;
1507  conj1_t conj;
1508 
1509  // Return early if possible.
1510  if ( bl1_zero_dim2( m, n ) ) return;
1511 
1512  // Initialize variables based on storage format of B and value of uplo.
1513  if ( bl1_is_col_storage( b_rs, b_cs ) )
1514  {
1515  if ( bl1_is_lower( uplo ) )
1516  {
1517  n_iter = bl1_min( m, n );
1518  n_elem_max = m;
1519  lda = a_cs;
1520  inca = a_rs;
1521  ldb = b_cs;
1522  incb = b_rs;
1523  n_elem_is_descending = TRUE;
1524  }
1525  else // if ( bl1_is_upper( uplo ) )
1526  {
1527  n_iter = n;
1528  n_elem_max = bl1_min( m, n );
1529  lda = a_cs;
1530  inca = a_rs;
1531  ldb = b_cs;
1532  incb = b_rs;
1533  n_elem_is_descending = FALSE;
1534  }
1535  }
1536  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1537  {
1538  if ( bl1_is_lower( uplo ) )
1539  {
1540  n_iter = m;
1541  n_elem_max = bl1_min( m, n );
1542  lda = a_rs;
1543  inca = a_cs;
1544  ldb = b_rs;
1545  incb = b_cs;
1546  n_elem_is_descending = FALSE;
1547  }
1548  else // if ( bl1_is_upper( uplo ) )
1549  {
1550  n_iter = bl1_min( m, n );
1551  n_elem_max = n;
1552  lda = a_rs;
1553  inca = a_cs;
1554  ldb = b_rs;
1555  incb = b_cs;
1556  n_elem_is_descending = TRUE;
1557  }
1558  }
1559 
1560  // Swap lda and inca if we're doing a transpose.
1561  if ( bl1_does_trans( trans ) )
1562  {
1563  bl1_swap_ints( lda, inca );
1564  }
1565 
1566  // Extract conj component from trans parameter.
1567  conj = bl1_proj_trans1_to_conj( trans );
1568 
1569  // Choose the loop based on whether n_elem will be shrinking or growing
1570  // with each iteration.
1571  if ( n_elem_is_descending )
1572  {
1573  for ( j = 0; j < n_iter; j++ )
1574  {
1575  n_elem = n_elem_max - j;
1576  a_begin = a + j*lda + j*inca;
1577  b_begin = b + j*ldb + j*incb;
1578 
1579  bl1_ccopyv( conj,
1580  n_elem,
1581  a_begin, inca,
1582  b_begin, incb );
1583  }
1584  }
1585  else // if ( n_elem_is_ascending )
1586  {
1587  for ( j = 0; j < n_iter; j++ )
1588  {
1589  n_elem = bl1_min( j + 1, n_elem_max );
1590  a_begin = a + j*lda;
1591  b_begin = b + j*ldb;
1592 
1593  bl1_ccopyv( conj,
1594  n_elem,
1595  a_begin, inca,
1596  b_begin, incb );
1597  }
1598  }
1599 }
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
int bl1_is_lower(uplo1_t uplo)
Definition: bl1_is.c:49
int bl1_is_col_storage(int rs, int cs)
Definition: bl1_is.c:90
conj1_t bl1_proj_trans1_to_conj(trans1_t trans)
Definition: bl1_proj.c:13
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
int bl1_does_trans(trans1_t trans)
Definition: bl1_does.c:13
conj1_t
Definition: blis_type_defs.h:80
Definition: blis_type_defs.h:133

References bl1_ccopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

◆ bl1_ccopymrt()

void bl1_ccopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
224 {
225  scomplex* a_begin;
226  scomplex* b_begin;
227  int lda, inca;
228  int ldb, incb;
229  int n_iter;
230  int n_elem;
231  int n_elem_max;
232  int n_elem_is_descending;
233  int j;
234  conj1_t conj;
235 
236  // Return early if possible.
237  if ( bl1_zero_dim2( m, n ) ) return;
238 
239  // Initialize variables based on storage format of B and value of uplo.
240  if ( bl1_is_col_storage( b_rs, b_cs ) )
241  {
242  if ( bl1_is_lower( uplo ) )
243  {
244  n_iter = bl1_min( m, n );
245  n_elem_max = m;
246  lda = a_cs;
247  inca = a_rs;
248  ldb = b_cs;
249  incb = b_rs;
250  n_elem_is_descending = TRUE;
251  }
252  else // if ( bl1_is_upper( uplo ) )
253  {
254  n_iter = n;
255  n_elem_max = bl1_min( m, n );
256  lda = a_cs;
257  inca = a_rs;
258  ldb = b_cs;
259  incb = b_rs;
260  n_elem_is_descending = FALSE;
261  }
262  }
263  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
264  {
265  if ( bl1_is_lower( uplo ) )
266  {
267  n_iter = m;
268  n_elem_max = bl1_min( m, n );
269  lda = a_rs;
270  inca = a_cs;
271  ldb = b_rs;
272  incb = b_cs;
273  n_elem_is_descending = FALSE;
274  }
275  else // if ( bl1_is_upper( uplo ) )
276  {
277  n_iter = bl1_min( m, n );
278  n_elem_max = n;
279  lda = a_rs;
280  inca = a_cs;
281  ldb = b_rs;
282  incb = b_cs;
283  n_elem_is_descending = TRUE;
284  }
285  }
286 
287  // Swap lda and inca if we're doing a transpose.
288  if ( bl1_does_trans( trans ) )
289  {
290  bl1_swap_ints( lda, inca );
291  }
292 
293  // Extract conj component from trans parameter.
294  conj = bl1_proj_trans1_to_conj( trans );
295 
296  // Choose the loop based on whether n_elem will be shrinking or growing
297  // with each iteration.
298  if ( n_elem_is_descending )
299  {
300  for ( j = 0; j < n_iter; j++ )
301  {
302  n_elem = n_elem_max - j;
303  a_begin = a + j*lda + j*inca;
304  b_begin = b + j*ldb + j*incb;
305 
306  bl1_ccopyv( conj,
307  n_elem,
308  a_begin, inca,
309  b_begin, incb );
310  }
311  }
312  else // if ( n_elem_is_ascending )
313  {
314  for ( j = 0; j < n_iter; j++ )
315  {
316  n_elem = bl1_min( j + 1, n_elem_max );
317  a_begin = a + j*lda;
318  b_begin = b + j*ldb;
319 
320  bl1_ccopyv( conj,
321  n_elem,
322  a_begin, inca,
323  b_begin, incb );
324  }
325  }
326 }

References bl1_ccopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by bl1_chemm(), bl1_ctrmm(), bl1_ctrsm(), FLA_Copyrt_external(), FLA_Lyap_h_opc_var1(), FLA_Lyap_h_opc_var2(), FLA_Lyap_h_opc_var3(), FLA_Lyap_h_opc_var4(), FLA_Lyap_n_opc_var1(), FLA_Lyap_n_opc_var2(), FLA_Lyap_n_opc_var3(), and FLA_Lyap_n_opc_var4().

◆ bl1_cdcopymrt()

void bl1_cdcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)
1391 {
1392  scomplex* a_begin;
1393  double* b_begin;
1394  int lda, inca;
1395  int ldb, incb;
1396  int n_iter;
1397  int n_elem;
1398  int n_elem_max;
1399  int n_elem_is_descending;
1400  int j;
1401  conj1_t conj;
1402 
1403  // Return early if possible.
1404  if ( bl1_zero_dim2( m, n ) ) return;
1405 
1406  // Initialize variables based on storage format of B and value of uplo.
1407  if ( bl1_is_col_storage( b_rs, b_cs ) )
1408  {
1409  if ( bl1_is_lower( uplo ) )
1410  {
1411  n_iter = bl1_min( m, n );
1412  n_elem_max = m;
1413  lda = a_cs;
1414  inca = a_rs;
1415  ldb = b_cs;
1416  incb = b_rs;
1417  n_elem_is_descending = TRUE;
1418  }
1419  else // if ( bl1_is_upper( uplo ) )
1420  {
1421  n_iter = n;
1422  n_elem_max = bl1_min( m, n );
1423  lda = a_cs;
1424  inca = a_rs;
1425  ldb = b_cs;
1426  incb = b_rs;
1427  n_elem_is_descending = FALSE;
1428  }
1429  }
1430  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1431  {
1432  if ( bl1_is_lower( uplo ) )
1433  {
1434  n_iter = m;
1435  n_elem_max = bl1_min( m, n );
1436  lda = a_rs;
1437  inca = a_cs;
1438  ldb = b_rs;
1439  incb = b_cs;
1440  n_elem_is_descending = FALSE;
1441  }
1442  else // if ( bl1_is_upper( uplo ) )
1443  {
1444  n_iter = bl1_min( m, n );
1445  n_elem_max = n;
1446  lda = a_rs;
1447  inca = a_cs;
1448  ldb = b_rs;
1449  incb = b_cs;
1450  n_elem_is_descending = TRUE;
1451  }
1452  }
1453 
1454  // Swap lda and inca if we're doing a transpose.
1455  if ( bl1_does_trans( trans ) )
1456  {
1457  bl1_swap_ints( lda, inca );
1458  }
1459 
1460  // Extract conj component from trans parameter.
1461  conj = bl1_proj_trans1_to_conj( trans );
1462 
1463  // Choose the loop based on whether n_elem will be shrinking or growing
1464  // with each iteration.
1465  if ( n_elem_is_descending )
1466  {
1467  for ( j = 0; j < n_iter; j++ )
1468  {
1469  n_elem = n_elem_max - j;
1470  a_begin = a + j*lda + j*inca;
1471  b_begin = b + j*ldb + j*incb;
1472 
1473  bl1_cdcopyv( conj,
1474  n_elem,
1475  a_begin, inca,
1476  b_begin, incb );
1477  }
1478  }
1479  else // if ( n_elem_is_ascending )
1480  {
1481  for ( j = 0; j < n_iter; j++ )
1482  {
1483  n_elem = bl1_min( j + 1, n_elem_max );
1484  a_begin = a + j*lda;
1485  b_begin = b + j*ldb;
1486 
1487  bl1_cdcopyv( conj,
1488  n_elem,
1489  a_begin, inca,
1490  b_begin, incb );
1491  }
1492  }
1493 }
void bl1_cdcopyv(conj1_t conj, int m, scomplex *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:236

References bl1_cdcopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_cscopymrt()

void bl1_cscopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)
1285 {
1286  scomplex* a_begin;
1287  float* b_begin;
1288  int lda, inca;
1289  int ldb, incb;
1290  int n_iter;
1291  int n_elem;
1292  int n_elem_max;
1293  int n_elem_is_descending;
1294  int j;
1295  conj1_t conj;
1296 
1297  // Return early if possible.
1298  if ( bl1_zero_dim2( m, n ) ) return;
1299 
1300  // Initialize variables based on storage format of B and value of uplo.
1301  if ( bl1_is_col_storage( b_rs, b_cs ) )
1302  {
1303  if ( bl1_is_lower( uplo ) )
1304  {
1305  n_iter = bl1_min( m, n );
1306  n_elem_max = m;
1307  lda = a_cs;
1308  inca = a_rs;
1309  ldb = b_cs;
1310  incb = b_rs;
1311  n_elem_is_descending = TRUE;
1312  }
1313  else // if ( bl1_is_upper( uplo ) )
1314  {
1315  n_iter = n;
1316  n_elem_max = bl1_min( m, n );
1317  lda = a_cs;
1318  inca = a_rs;
1319  ldb = b_cs;
1320  incb = b_rs;
1321  n_elem_is_descending = FALSE;
1322  }
1323  }
1324  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1325  {
1326  if ( bl1_is_lower( uplo ) )
1327  {
1328  n_iter = m;
1329  n_elem_max = bl1_min( m, n );
1330  lda = a_rs;
1331  inca = a_cs;
1332  ldb = b_rs;
1333  incb = b_cs;
1334  n_elem_is_descending = FALSE;
1335  }
1336  else // if ( bl1_is_upper( uplo ) )
1337  {
1338  n_iter = bl1_min( m, n );
1339  n_elem_max = n;
1340  lda = a_rs;
1341  inca = a_cs;
1342  ldb = b_rs;
1343  incb = b_cs;
1344  n_elem_is_descending = TRUE;
1345  }
1346  }
1347 
1348  // Swap lda and inca if we're doing a transpose.
1349  if ( bl1_does_trans( trans ) )
1350  {
1351  bl1_swap_ints( lda, inca );
1352  }
1353 
1354  // Extract conj component from trans parameter.
1355  conj = bl1_proj_trans1_to_conj( trans );
1356 
1357  // Choose the loop based on whether n_elem will be shrinking or growing
1358  // with each iteration.
1359  if ( n_elem_is_descending )
1360  {
1361  for ( j = 0; j < n_iter; j++ )
1362  {
1363  n_elem = n_elem_max - j;
1364  a_begin = a + j*lda + j*inca;
1365  b_begin = b + j*ldb + j*incb;
1366 
1367  bl1_cscopyv( conj,
1368  n_elem,
1369  a_begin, inca,
1370  b_begin, incb );
1371  }
1372  }
1373  else // if ( n_elem_is_ascending )
1374  {
1375  for ( j = 0; j < n_iter; j++ )
1376  {
1377  n_elem = bl1_min( j + 1, n_elem_max );
1378  a_begin = a + j*lda;
1379  b_begin = b + j*ldb;
1380 
1381  bl1_cscopyv( conj,
1382  n_elem,
1383  a_begin, inca,
1384  b_begin, incb );
1385  }
1386  }
1387 }
void bl1_cscopyv(conj1_t conj, int m, scomplex *x, int incx, float *y, int incy)
Definition: bl1_copyv.c:146

References bl1_cscopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_czcopymrt()

void bl1_czcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
1603 {
1604  scomplex* a_begin;
1605  dcomplex* b_begin;
1606  int lda, inca;
1607  int ldb, incb;
1608  int n_iter;
1609  int n_elem;
1610  int n_elem_max;
1611  int n_elem_is_descending;
1612  int j;
1613  conj1_t conj;
1614 
1615  // Return early if possible.
1616  if ( bl1_zero_dim2( m, n ) ) return;
1617 
1618  // Initialize variables based on storage format of B and value of uplo.
1619  if ( bl1_is_col_storage( b_rs, b_cs ) )
1620  {
1621  if ( bl1_is_lower( uplo ) )
1622  {
1623  n_iter = bl1_min( m, n );
1624  n_elem_max = m;
1625  lda = a_cs;
1626  inca = a_rs;
1627  ldb = b_cs;
1628  incb = b_rs;
1629  n_elem_is_descending = TRUE;
1630  }
1631  else // if ( bl1_is_upper( uplo ) )
1632  {
1633  n_iter = n;
1634  n_elem_max = bl1_min( m, n );
1635  lda = a_cs;
1636  inca = a_rs;
1637  ldb = b_cs;
1638  incb = b_rs;
1639  n_elem_is_descending = FALSE;
1640  }
1641  }
1642  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1643  {
1644  if ( bl1_is_lower( uplo ) )
1645  {
1646  n_iter = m;
1647  n_elem_max = bl1_min( m, n );
1648  lda = a_rs;
1649  inca = a_cs;
1650  ldb = b_rs;
1651  incb = b_cs;
1652  n_elem_is_descending = FALSE;
1653  }
1654  else // if ( bl1_is_upper( uplo ) )
1655  {
1656  n_iter = bl1_min( m, n );
1657  n_elem_max = n;
1658  lda = a_rs;
1659  inca = a_cs;
1660  ldb = b_rs;
1661  incb = b_cs;
1662  n_elem_is_descending = TRUE;
1663  }
1664  }
1665 
1666  // Swap lda and inca if we're doing a transpose.
1667  if ( bl1_does_trans( trans ) )
1668  {
1669  bl1_swap_ints( lda, inca );
1670  }
1671 
1672  // Extract conj component from trans parameter.
1673  conj = bl1_proj_trans1_to_conj( trans );
1674 
1675  // Choose the loop based on whether n_elem will be shrinking or growing
1676  // with each iteration.
1677  if ( n_elem_is_descending )
1678  {
1679  for ( j = 0; j < n_iter; j++ )
1680  {
1681  n_elem = n_elem_max - j;
1682  a_begin = a + j*lda + j*inca;
1683  b_begin = b + j*ldb + j*incb;
1684 
1685  bl1_czcopyv( conj,
1686  n_elem,
1687  a_begin, inca,
1688  b_begin, incb );
1689  }
1690  }
1691  else // if ( n_elem_is_ascending )
1692  {
1693  for ( j = 0; j < n_iter; j++ )
1694  {
1695  n_elem = bl1_min( j + 1, n_elem_max );
1696  a_begin = a + j*lda;
1697  b_begin = b + j*ldb;
1698 
1699  bl1_czcopyv( conj,
1700  n_elem,
1701  a_begin, inca,
1702  b_begin, incb );
1703  }
1704  }
1705 }
void bl1_czcopyv(conj1_t conj, int m, scomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:304
Definition: blis_type_defs.h:138

References bl1_czcopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_dccopymrt()

void bl1_dccopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
1073 {
1074  double* a_begin;
1075  scomplex* b_begin;
1076  int lda, inca;
1077  int ldb, incb;
1078  int n_iter;
1079  int n_elem;
1080  int n_elem_max;
1081  int n_elem_is_descending;
1082  int j;
1083  conj1_t conj;
1084 
1085  // Return early if possible.
1086  if ( bl1_zero_dim2( m, n ) ) return;
1087 
1088  // Initialize variables based on storage format of B and value of uplo.
1089  if ( bl1_is_col_storage( b_rs, b_cs ) )
1090  {
1091  if ( bl1_is_lower( uplo ) )
1092  {
1093  n_iter = bl1_min( m, n );
1094  n_elem_max = m;
1095  lda = a_cs;
1096  inca = a_rs;
1097  ldb = b_cs;
1098  incb = b_rs;
1099  n_elem_is_descending = TRUE;
1100  }
1101  else // if ( bl1_is_upper( uplo ) )
1102  {
1103  n_iter = n;
1104  n_elem_max = bl1_min( m, n );
1105  lda = a_cs;
1106  inca = a_rs;
1107  ldb = b_cs;
1108  incb = b_rs;
1109  n_elem_is_descending = FALSE;
1110  }
1111  }
1112  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1113  {
1114  if ( bl1_is_lower( uplo ) )
1115  {
1116  n_iter = m;
1117  n_elem_max = bl1_min( m, n );
1118  lda = a_rs;
1119  inca = a_cs;
1120  ldb = b_rs;
1121  incb = b_cs;
1122  n_elem_is_descending = FALSE;
1123  }
1124  else // if ( bl1_is_upper( uplo ) )
1125  {
1126  n_iter = bl1_min( m, n );
1127  n_elem_max = n;
1128  lda = a_rs;
1129  inca = a_cs;
1130  ldb = b_rs;
1131  incb = b_cs;
1132  n_elem_is_descending = TRUE;
1133  }
1134  }
1135 
1136  // Swap lda and inca if we're doing a transpose.
1137  if ( bl1_does_trans( trans ) )
1138  {
1139  bl1_swap_ints( lda, inca );
1140  }
1141 
1142  // Extract conj component from trans parameter.
1143  conj = bl1_proj_trans1_to_conj( trans );
1144 
1145  // Choose the loop based on whether n_elem will be shrinking or growing
1146  // with each iteration.
1147  if ( n_elem_is_descending )
1148  {
1149  for ( j = 0; j < n_iter; j++ )
1150  {
1151  n_elem = n_elem_max - j;
1152  a_begin = a + j*lda + j*inca;
1153  b_begin = b + j*ldb + j*incb;
1154 
1155  bl1_dccopyv( conj,
1156  n_elem,
1157  a_begin, inca,
1158  b_begin, incb );
1159  }
1160  }
1161  else // if ( n_elem_is_ascending )
1162  {
1163  for ( j = 0; j < n_iter; j++ )
1164  {
1165  n_elem = bl1_min( j + 1, n_elem_max );
1166  a_begin = a + j*lda;
1167  b_begin = b + j*ldb;
1168 
1169  bl1_dccopyv( conj,
1170  n_elem,
1171  a_begin, inca,
1172  b_begin, incb );
1173  }
1174  }
1175 }
void bl1_dccopyv(conj1_t conj, int m, double *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:214

References bl1_dccopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_dcopymrt()

void bl1_dcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)
119 {
120  double* a_begin;
121  double* b_begin;
122  int lda, inca;
123  int ldb, incb;
124  int n_iter;
125  int n_elem;
126  int n_elem_max;
127  int n_elem_is_descending;
128  int j;
129  conj1_t conj;
130 
131  // Return early if possible.
132  if ( bl1_zero_dim2( m, n ) ) return;
133 
134  // Initialize variables based on storage format of B and value of uplo.
135  if ( bl1_is_col_storage( b_rs, b_cs ) )
136  {
137  if ( bl1_is_lower( uplo ) )
138  {
139  n_iter = bl1_min( m, n );
140  n_elem_max = m;
141  lda = a_cs;
142  inca = a_rs;
143  ldb = b_cs;
144  incb = b_rs;
145  n_elem_is_descending = TRUE;
146  }
147  else // if ( bl1_is_upper( uplo ) )
148  {
149  n_iter = n;
150  n_elem_max = bl1_min( m, n );
151  lda = a_cs;
152  inca = a_rs;
153  ldb = b_cs;
154  incb = b_rs;
155  n_elem_is_descending = FALSE;
156  }
157  }
158  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
159  {
160  if ( bl1_is_lower( uplo ) )
161  {
162  n_iter = m;
163  n_elem_max = bl1_min( m, n );
164  lda = a_rs;
165  inca = a_cs;
166  ldb = b_rs;
167  incb = b_cs;
168  n_elem_is_descending = FALSE;
169  }
170  else // if ( bl1_is_upper( uplo ) )
171  {
172  n_iter = bl1_min( m, n );
173  n_elem_max = n;
174  lda = a_rs;
175  inca = a_cs;
176  ldb = b_rs;
177  incb = b_cs;
178  n_elem_is_descending = TRUE;
179  }
180  }
181 
182  // Swap lda and inca if we're doing a transpose.
183  if ( bl1_does_trans( trans ) )
184  {
185  bl1_swap_ints( lda, inca );
186  }
187 
188  // Extract conj component from trans parameter.
189  conj = bl1_proj_trans1_to_conj( trans );
190 
191  // Choose the loop based on whether n_elem will be shrinking or growing
192  // with each iteration.
193  if ( n_elem_is_descending )
194  {
195  for ( j = 0; j < n_iter; j++ )
196  {
197  n_elem = n_elem_max - j;
198  a_begin = a + j*lda + j*inca;
199  b_begin = b + j*ldb + j*incb;
200 
201  bl1_dcopyv( conj,
202  n_elem,
203  a_begin, inca,
204  b_begin, incb );
205  }
206  }
207  else // if ( n_elem_is_ascending )
208  {
209  for ( j = 0; j < n_iter; j++ )
210  {
211  n_elem = bl1_min( j + 1, n_elem_max );
212  a_begin = a + j*lda;
213  b_begin = b + j*ldb;
214 
215  bl1_dcopyv( conj,
216  n_elem,
217  a_begin, inca,
218  b_begin, incb );
219  }
220  }
221 }
void bl1_dcopyv(conj1_t conj, int m, double *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:42

References bl1_dcopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external(), FLA_Lyap_h_opd_var1(), FLA_Lyap_h_opd_var2(), FLA_Lyap_h_opd_var3(), FLA_Lyap_h_opd_var4(), FLA_Lyap_n_opd_var1(), FLA_Lyap_n_opd_var2(), FLA_Lyap_n_opd_var3(), and FLA_Lyap_n_opd_var4().

◆ bl1_ddcopymrt()

void bl1_ddcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)
967 {
968  double* a_begin;
969  double* b_begin;
970  int lda, inca;
971  int ldb, incb;
972  int n_iter;
973  int n_elem;
974  int n_elem_max;
975  int n_elem_is_descending;
976  int j;
977  conj1_t conj;
978 
979  // Return early if possible.
980  if ( bl1_zero_dim2( m, n ) ) return;
981 
982  // Initialize variables based on storage format of B and value of uplo.
983  if ( bl1_is_col_storage( b_rs, b_cs ) )
984  {
985  if ( bl1_is_lower( uplo ) )
986  {
987  n_iter = bl1_min( m, n );
988  n_elem_max = m;
989  lda = a_cs;
990  inca = a_rs;
991  ldb = b_cs;
992  incb = b_rs;
993  n_elem_is_descending = TRUE;
994  }
995  else // if ( bl1_is_upper( uplo ) )
996  {
997  n_iter = n;
998  n_elem_max = bl1_min( m, n );
999  lda = a_cs;
1000  inca = a_rs;
1001  ldb = b_cs;
1002  incb = b_rs;
1003  n_elem_is_descending = FALSE;
1004  }
1005  }
1006  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1007  {
1008  if ( bl1_is_lower( uplo ) )
1009  {
1010  n_iter = m;
1011  n_elem_max = bl1_min( m, n );
1012  lda = a_rs;
1013  inca = a_cs;
1014  ldb = b_rs;
1015  incb = b_cs;
1016  n_elem_is_descending = FALSE;
1017  }
1018  else // if ( bl1_is_upper( uplo ) )
1019  {
1020  n_iter = bl1_min( m, n );
1021  n_elem_max = n;
1022  lda = a_rs;
1023  inca = a_cs;
1024  ldb = b_rs;
1025  incb = b_cs;
1026  n_elem_is_descending = TRUE;
1027  }
1028  }
1029 
1030  // Swap lda and inca if we're doing a transpose.
1031  if ( bl1_does_trans( trans ) )
1032  {
1033  bl1_swap_ints( lda, inca );
1034  }
1035 
1036  // Extract conj component from trans parameter.
1037  conj = bl1_proj_trans1_to_conj( trans );
1038 
1039  // Choose the loop based on whether n_elem will be shrinking or growing
1040  // with each iteration.
1041  if ( n_elem_is_descending )
1042  {
1043  for ( j = 0; j < n_iter; j++ )
1044  {
1045  n_elem = n_elem_max - j;
1046  a_begin = a + j*lda + j*inca;
1047  b_begin = b + j*ldb + j*incb;
1048 
1049  bl1_dcopyv( conj,
1050  n_elem,
1051  a_begin, inca,
1052  b_begin, incb );
1053  }
1054  }
1055  else // if ( n_elem_is_ascending )
1056  {
1057  for ( j = 0; j < n_iter; j++ )
1058  {
1059  n_elem = bl1_min( j + 1, n_elem_max );
1060  a_begin = a + j*lda;
1061  b_begin = b + j*ldb;
1062 
1063  bl1_dcopyv( conj,
1064  n_elem,
1065  a_begin, inca,
1066  b_begin, incb );
1067  }
1068  }
1069 }

References bl1_dcopyv(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

◆ bl1_dscopymrt()

void bl1_dscopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)
861 {
862  double* a_begin;
863  float* b_begin;
864  int lda, inca;
865  int ldb, incb;
866  int n_iter;
867  int n_elem;
868  int n_elem_max;
869  int n_elem_is_descending;
870  int j;
871  conj1_t conj;
872 
873  // Return early if possible.
874  if ( bl1_zero_dim2( m, n ) ) return;
875 
876  // Initialize variables based on storage format of B and value of uplo.
877  if ( bl1_is_col_storage( b_rs, b_cs ) )
878  {
879  if ( bl1_is_lower( uplo ) )
880  {
881  n_iter = bl1_min( m, n );
882  n_elem_max = m;
883  lda = a_cs;
884  inca = a_rs;
885  ldb = b_cs;
886  incb = b_rs;
887  n_elem_is_descending = TRUE;
888  }
889  else // if ( bl1_is_upper( uplo ) )
890  {
891  n_iter = n;
892  n_elem_max = bl1_min( m, n );
893  lda = a_cs;
894  inca = a_rs;
895  ldb = b_cs;
896  incb = b_rs;
897  n_elem_is_descending = FALSE;
898  }
899  }
900  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
901  {
902  if ( bl1_is_lower( uplo ) )
903  {
904  n_iter = m;
905  n_elem_max = bl1_min( m, n );
906  lda = a_rs;
907  inca = a_cs;
908  ldb = b_rs;
909  incb = b_cs;
910  n_elem_is_descending = FALSE;
911  }
912  else // if ( bl1_is_upper( uplo ) )
913  {
914  n_iter = bl1_min( m, n );
915  n_elem_max = n;
916  lda = a_rs;
917  inca = a_cs;
918  ldb = b_rs;
919  incb = b_cs;
920  n_elem_is_descending = TRUE;
921  }
922  }
923 
924  // Swap lda and inca if we're doing a transpose.
925  if ( bl1_does_trans( trans ) )
926  {
927  bl1_swap_ints( lda, inca );
928  }
929 
930  // Extract conj component from trans parameter.
931  conj = bl1_proj_trans1_to_conj( trans );
932 
933  // Choose the loop based on whether n_elem will be shrinking or growing
934  // with each iteration.
935  if ( n_elem_is_descending )
936  {
937  for ( j = 0; j < n_iter; j++ )
938  {
939  n_elem = n_elem_max - j;
940  a_begin = a + j*lda + j*inca;
941  b_begin = b + j*ldb + j*incb;
942 
943  bl1_dscopyv( conj,
944  n_elem,
945  a_begin, inca,
946  b_begin, incb );
947  }
948  }
949  else // if ( n_elem_is_ascending )
950  {
951  for ( j = 0; j < n_iter; j++ )
952  {
953  n_elem = bl1_min( j + 1, n_elem_max );
954  a_begin = a + j*lda;
955  b_begin = b + j*ldb;
956 
957  bl1_dscopyv( conj,
958  n_elem,
959  a_begin, inca,
960  b_begin, incb );
961  }
962  }
963 }
void bl1_dscopyv(conj1_t conj, int m, double *x, int incx, float *y, int incy)
Definition: bl1_copyv.c:101

References bl1_does_trans(), bl1_dscopyv(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_dzcopymrt()

void bl1_dzcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
1179 {
1180  double* a_begin;
1181  dcomplex* b_begin;
1182  int lda, inca;
1183  int ldb, incb;
1184  int n_iter;
1185  int n_elem;
1186  int n_elem_max;
1187  int n_elem_is_descending;
1188  int j;
1189  conj1_t conj;
1190 
1191  // Return early if possible.
1192  if ( bl1_zero_dim2( m, n ) ) return;
1193 
1194  // Initialize variables based on storage format of B and value of uplo.
1195  if ( bl1_is_col_storage( b_rs, b_cs ) )
1196  {
1197  if ( bl1_is_lower( uplo ) )
1198  {
1199  n_iter = bl1_min( m, n );
1200  n_elem_max = m;
1201  lda = a_cs;
1202  inca = a_rs;
1203  ldb = b_cs;
1204  incb = b_rs;
1205  n_elem_is_descending = TRUE;
1206  }
1207  else // if ( bl1_is_upper( uplo ) )
1208  {
1209  n_iter = n;
1210  n_elem_max = bl1_min( m, n );
1211  lda = a_cs;
1212  inca = a_rs;
1213  ldb = b_cs;
1214  incb = b_rs;
1215  n_elem_is_descending = FALSE;
1216  }
1217  }
1218  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1219  {
1220  if ( bl1_is_lower( uplo ) )
1221  {
1222  n_iter = m;
1223  n_elem_max = bl1_min( m, n );
1224  lda = a_rs;
1225  inca = a_cs;
1226  ldb = b_rs;
1227  incb = b_cs;
1228  n_elem_is_descending = FALSE;
1229  }
1230  else // if ( bl1_is_upper( uplo ) )
1231  {
1232  n_iter = bl1_min( m, n );
1233  n_elem_max = n;
1234  lda = a_rs;
1235  inca = a_cs;
1236  ldb = b_rs;
1237  incb = b_cs;
1238  n_elem_is_descending = TRUE;
1239  }
1240  }
1241 
1242  // Swap lda and inca if we're doing a transpose.
1243  if ( bl1_does_trans( trans ) )
1244  {
1245  bl1_swap_ints( lda, inca );
1246  }
1247 
1248  // Extract conj component from trans parameter.
1249  conj = bl1_proj_trans1_to_conj( trans );
1250 
1251  // Choose the loop based on whether n_elem will be shrinking or growing
1252  // with each iteration.
1253  if ( n_elem_is_descending )
1254  {
1255  for ( j = 0; j < n_iter; j++ )
1256  {
1257  n_elem = n_elem_max - j;
1258  a_begin = a + j*lda + j*inca;
1259  b_begin = b + j*ldb + j*incb;
1260 
1261  bl1_dzcopyv( conj,
1262  n_elem,
1263  a_begin, inca,
1264  b_begin, incb );
1265  }
1266  }
1267  else // if ( n_elem_is_ascending )
1268  {
1269  for ( j = 0; j < n_iter; j++ )
1270  {
1271  n_elem = bl1_min( j + 1, n_elem_max );
1272  a_begin = a + j*lda;
1273  b_begin = b + j*ldb;
1274 
1275  bl1_dzcopyv( conj,
1276  n_elem,
1277  a_begin, inca,
1278  b_begin, incb );
1279  }
1280  }
1281 }
void bl1_dzcopyv(conj1_t conj, int m, double *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:259

References bl1_does_trans(), bl1_dzcopyv(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_sccopymrt()

void bl1_sccopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
649 {
650  float* a_begin;
651  scomplex* b_begin;
652  int lda, inca;
653  int ldb, incb;
654  int n_iter;
655  int n_elem;
656  int n_elem_max;
657  int n_elem_is_descending;
658  int j;
659  conj1_t conj;
660 
661  // Return early if possible.
662  if ( bl1_zero_dim2( m, n ) ) return;
663 
664  // Initialize variables based on storage format of B and value of uplo.
665  if ( bl1_is_col_storage( b_rs, b_cs ) )
666  {
667  if ( bl1_is_lower( uplo ) )
668  {
669  n_iter = bl1_min( m, n );
670  n_elem_max = m;
671  lda = a_cs;
672  inca = a_rs;
673  ldb = b_cs;
674  incb = b_rs;
675  n_elem_is_descending = TRUE;
676  }
677  else // if ( bl1_is_upper( uplo ) )
678  {
679  n_iter = n;
680  n_elem_max = bl1_min( m, n );
681  lda = a_cs;
682  inca = a_rs;
683  ldb = b_cs;
684  incb = b_rs;
685  n_elem_is_descending = FALSE;
686  }
687  }
688  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
689  {
690  if ( bl1_is_lower( uplo ) )
691  {
692  n_iter = m;
693  n_elem_max = bl1_min( m, n );
694  lda = a_rs;
695  inca = a_cs;
696  ldb = b_rs;
697  incb = b_cs;
698  n_elem_is_descending = FALSE;
699  }
700  else // if ( bl1_is_upper( uplo ) )
701  {
702  n_iter = bl1_min( m, n );
703  n_elem_max = n;
704  lda = a_rs;
705  inca = a_cs;
706  ldb = b_rs;
707  incb = b_cs;
708  n_elem_is_descending = TRUE;
709  }
710  }
711 
712  // Swap lda and inca if we're doing a transpose.
713  if ( bl1_does_trans( trans ) )
714  {
715  bl1_swap_ints( lda, inca );
716  }
717 
718  // Extract conj component from trans parameter.
719  conj = bl1_proj_trans1_to_conj( trans );
720 
721  // Choose the loop based on whether n_elem will be shrinking or growing
722  // with each iteration.
723  if ( n_elem_is_descending )
724  {
725  for ( j = 0; j < n_iter; j++ )
726  {
727  n_elem = n_elem_max - j;
728  a_begin = a + j*lda + j*inca;
729  b_begin = b + j*ldb + j*incb;
730 
731  bl1_sccopyv( conj,
732  n_elem,
733  a_begin, inca,
734  b_begin, incb );
735  }
736  }
737  else // if ( n_elem_is_ascending )
738  {
739  for ( j = 0; j < n_iter; j++ )
740  {
741  n_elem = bl1_min( j + 1, n_elem_max );
742  a_begin = a + j*lda;
743  b_begin = b + j*ldb;
744 
745  bl1_sccopyv( conj,
746  n_elem,
747  a_begin, inca,
748  b_begin, incb );
749  }
750  }
751 }
void bl1_sccopyv(conj1_t conj, int m, float *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:124

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_sccopyv(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_scopymrt()

void bl1_scopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)
14 {
15  float* a_begin;
16  float* b_begin;
17  int lda, inca;
18  int ldb, incb;
19  int n_iter;
20  int n_elem;
21  int n_elem_max;
22  int n_elem_is_descending;
23  int j;
24  conj1_t conj;
25 
26  // Return early if possible.
27  if ( bl1_zero_dim2( m, n ) ) return;
28 
29  // Initialize variables based on storage format of B and value of uplo.
30  if ( bl1_is_col_storage( b_rs, b_cs ) )
31  {
32  if ( bl1_is_lower( uplo ) )
33  {
34  n_iter = bl1_min( m, n );
35  n_elem_max = m;
36  lda = a_cs;
37  inca = a_rs;
38  ldb = b_cs;
39  incb = b_rs;
40  n_elem_is_descending = TRUE;
41  }
42  else // if ( bl1_is_upper( uplo ) )
43  {
44  n_iter = n;
45  n_elem_max = bl1_min( m, n );
46  lda = a_cs;
47  inca = a_rs;
48  ldb = b_cs;
49  incb = b_rs;
50  n_elem_is_descending = FALSE;
51  }
52  }
53  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
54  {
55  if ( bl1_is_lower( uplo ) )
56  {
57  n_iter = m;
58  n_elem_max = bl1_min( m, n );
59  lda = a_rs;
60  inca = a_cs;
61  ldb = b_rs;
62  incb = b_cs;
63  n_elem_is_descending = FALSE;
64  }
65  else // if ( bl1_is_upper( uplo ) )
66  {
67  n_iter = bl1_min( m, n );
68  n_elem_max = n;
69  lda = a_rs;
70  inca = a_cs;
71  ldb = b_rs;
72  incb = b_cs;
73  n_elem_is_descending = TRUE;
74  }
75  }
76 
77  // Swap lda and inca if we're doing a transpose.
78  if ( bl1_does_trans( trans ) )
79  {
80  bl1_swap_ints( lda, inca );
81  }
82 
83  // Extract conj component from trans parameter.
84  conj = bl1_proj_trans1_to_conj( trans );
85 
86  // Choose the loop based on whether n_elem will be shrinking or growing
87  // with each iteration.
88  if ( n_elem_is_descending )
89  {
90  for ( j = 0; j < n_iter; j++ )
91  {
92  n_elem = n_elem_max - j;
93  a_begin = a + j*lda + j*inca;
94  b_begin = b + j*ldb + j*incb;
95 
96  bl1_scopyv( conj,
97  n_elem,
98  a_begin, inca,
99  b_begin, incb );
100  }
101  }
102  else // if ( n_elem_is_ascending )
103  {
104  for ( j = 0; j < n_iter; j++ )
105  {
106  n_elem = bl1_min( j + 1, n_elem_max );
107  a_begin = a + j*lda;
108  b_begin = b + j*ldb;
109 
110  bl1_scopyv( conj,
111  n_elem,
112  a_begin, inca,
113  b_begin, incb );
114  }
115  }
116 }
void bl1_scopyv(conj1_t conj, int m, float *x, int incx, float *y, int incy)
Definition: bl1_copyv.c:35

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_scopyv(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external(), FLA_Lyap_h_ops_var1(), FLA_Lyap_h_ops_var2(), FLA_Lyap_h_ops_var3(), FLA_Lyap_h_ops_var4(), FLA_Lyap_n_ops_var1(), FLA_Lyap_n_ops_var2(), FLA_Lyap_n_ops_var3(), and FLA_Lyap_n_ops_var4().

◆ bl1_sdcopymrt()

void bl1_sdcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)
543 {
544  float* a_begin;
545  double* b_begin;
546  int lda, inca;
547  int ldb, incb;
548  int n_iter;
549  int n_elem;
550  int n_elem_max;
551  int n_elem_is_descending;
552  int j;
553  conj1_t conj;
554 
555  // Return early if possible.
556  if ( bl1_zero_dim2( m, n ) ) return;
557 
558  // Initialize variables based on storage format of B and value of uplo.
559  if ( bl1_is_col_storage( b_rs, b_cs ) )
560  {
561  if ( bl1_is_lower( uplo ) )
562  {
563  n_iter = bl1_min( m, n );
564  n_elem_max = m;
565  lda = a_cs;
566  inca = a_rs;
567  ldb = b_cs;
568  incb = b_rs;
569  n_elem_is_descending = TRUE;
570  }
571  else // if ( bl1_is_upper( uplo ) )
572  {
573  n_iter = n;
574  n_elem_max = bl1_min( m, n );
575  lda = a_cs;
576  inca = a_rs;
577  ldb = b_cs;
578  incb = b_rs;
579  n_elem_is_descending = FALSE;
580  }
581  }
582  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
583  {
584  if ( bl1_is_lower( uplo ) )
585  {
586  n_iter = m;
587  n_elem_max = bl1_min( m, n );
588  lda = a_rs;
589  inca = a_cs;
590  ldb = b_rs;
591  incb = b_cs;
592  n_elem_is_descending = FALSE;
593  }
594  else // if ( bl1_is_upper( uplo ) )
595  {
596  n_iter = bl1_min( m, n );
597  n_elem_max = n;
598  lda = a_rs;
599  inca = a_cs;
600  ldb = b_rs;
601  incb = b_cs;
602  n_elem_is_descending = TRUE;
603  }
604  }
605 
606  // Swap lda and inca if we're doing a transpose.
607  if ( bl1_does_trans( trans ) )
608  {
609  bl1_swap_ints( lda, inca );
610  }
611 
612  // Extract conj component from trans parameter.
613  conj = bl1_proj_trans1_to_conj( trans );
614 
615  // Choose the loop based on whether n_elem will be shrinking or growing
616  // with each iteration.
617  if ( n_elem_is_descending )
618  {
619  for ( j = 0; j < n_iter; j++ )
620  {
621  n_elem = n_elem_max - j;
622  a_begin = a + j*lda + j*inca;
623  b_begin = b + j*ldb + j*incb;
624 
625  bl1_sdcopyv( conj,
626  n_elem,
627  a_begin, inca,
628  b_begin, incb );
629  }
630  }
631  else // if ( n_elem_is_ascending )
632  {
633  for ( j = 0; j < n_iter; j++ )
634  {
635  n_elem = bl1_min( j + 1, n_elem_max );
636  a_begin = a + j*lda;
637  b_begin = b + j*ldb;
638 
639  bl1_sdcopyv( conj,
640  n_elem,
641  a_begin, inca,
642  b_begin, incb );
643  }
644  }
645 }
void bl1_sdcopyv(conj1_t conj, int m, float *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:80

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_sdcopyv(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_sscopymrt()

void bl1_sscopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)
437 {
438  float* a_begin;
439  float* b_begin;
440  int lda, inca;
441  int ldb, incb;
442  int n_iter;
443  int n_elem;
444  int n_elem_max;
445  int n_elem_is_descending;
446  int j;
447  conj1_t conj;
448 
449  // Return early if possible.
450  if ( bl1_zero_dim2( m, n ) ) return;
451 
452  // Initialize variables based on storage format of B and value of uplo.
453  if ( bl1_is_col_storage( b_rs, b_cs ) )
454  {
455  if ( bl1_is_lower( uplo ) )
456  {
457  n_iter = bl1_min( m, n );
458  n_elem_max = m;
459  lda = a_cs;
460  inca = a_rs;
461  ldb = b_cs;
462  incb = b_rs;
463  n_elem_is_descending = TRUE;
464  }
465  else // if ( bl1_is_upper( uplo ) )
466  {
467  n_iter = n;
468  n_elem_max = bl1_min( m, n );
469  lda = a_cs;
470  inca = a_rs;
471  ldb = b_cs;
472  incb = b_rs;
473  n_elem_is_descending = FALSE;
474  }
475  }
476  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
477  {
478  if ( bl1_is_lower( uplo ) )
479  {
480  n_iter = m;
481  n_elem_max = bl1_min( m, n );
482  lda = a_rs;
483  inca = a_cs;
484  ldb = b_rs;
485  incb = b_cs;
486  n_elem_is_descending = FALSE;
487  }
488  else // if ( bl1_is_upper( uplo ) )
489  {
490  n_iter = bl1_min( m, n );
491  n_elem_max = n;
492  lda = a_rs;
493  inca = a_cs;
494  ldb = b_rs;
495  incb = b_cs;
496  n_elem_is_descending = TRUE;
497  }
498  }
499 
500  // Swap lda and inca if we're doing a transpose.
501  if ( bl1_does_trans( trans ) )
502  {
503  bl1_swap_ints( lda, inca );
504  }
505 
506  // Extract conj component from trans parameter.
507  conj = bl1_proj_trans1_to_conj( trans );
508 
509  // Choose the loop based on whether n_elem will be shrinking or growing
510  // with each iteration.
511  if ( n_elem_is_descending )
512  {
513  for ( j = 0; j < n_iter; j++ )
514  {
515  n_elem = n_elem_max - j;
516  a_begin = a + j*lda + j*inca;
517  b_begin = b + j*ldb + j*incb;
518 
519  bl1_scopyv( conj,
520  n_elem,
521  a_begin, inca,
522  b_begin, incb );
523  }
524  }
525  else // if ( n_elem_is_ascending )
526  {
527  for ( j = 0; j < n_iter; j++ )
528  {
529  n_elem = bl1_min( j + 1, n_elem_max );
530  a_begin = a + j*lda;
531  b_begin = b + j*ldb;
532 
533  bl1_scopyv( conj,
534  n_elem,
535  a_begin, inca,
536  b_begin, incb );
537  }
538  }
539 }

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_scopyv(), and bl1_zero_dim2().

◆ bl1_szcopymrt()

void bl1_szcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
755 {
756  float* a_begin;
757  dcomplex* b_begin;
758  int lda, inca;
759  int ldb, incb;
760  int n_iter;
761  int n_elem;
762  int n_elem_max;
763  int n_elem_is_descending;
764  int j;
765  conj1_t conj;
766 
767  // Return early if possible.
768  if ( bl1_zero_dim2( m, n ) ) return;
769 
770  // Initialize variables based on storage format of B and value of uplo.
771  if ( bl1_is_col_storage( b_rs, b_cs ) )
772  {
773  if ( bl1_is_lower( uplo ) )
774  {
775  n_iter = bl1_min( m, n );
776  n_elem_max = m;
777  lda = a_cs;
778  inca = a_rs;
779  ldb = b_cs;
780  incb = b_rs;
781  n_elem_is_descending = TRUE;
782  }
783  else // if ( bl1_is_upper( uplo ) )
784  {
785  n_iter = n;
786  n_elem_max = bl1_min( m, n );
787  lda = a_cs;
788  inca = a_rs;
789  ldb = b_cs;
790  incb = b_rs;
791  n_elem_is_descending = FALSE;
792  }
793  }
794  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
795  {
796  if ( bl1_is_lower( uplo ) )
797  {
798  n_iter = m;
799  n_elem_max = bl1_min( m, n );
800  lda = a_rs;
801  inca = a_cs;
802  ldb = b_rs;
803  incb = b_cs;
804  n_elem_is_descending = FALSE;
805  }
806  else // if ( bl1_is_upper( uplo ) )
807  {
808  n_iter = bl1_min( m, n );
809  n_elem_max = n;
810  lda = a_rs;
811  inca = a_cs;
812  ldb = b_rs;
813  incb = b_cs;
814  n_elem_is_descending = TRUE;
815  }
816  }
817 
818  // Swap lda and inca if we're doing a transpose.
819  if ( bl1_does_trans( trans ) )
820  {
821  bl1_swap_ints( lda, inca );
822  }
823 
824  // Extract conj component from trans parameter.
825  conj = bl1_proj_trans1_to_conj( trans );
826 
827  // Choose the loop based on whether n_elem will be shrinking or growing
828  // with each iteration.
829  if ( n_elem_is_descending )
830  {
831  for ( j = 0; j < n_iter; j++ )
832  {
833  n_elem = n_elem_max - j;
834  a_begin = a + j*lda + j*inca;
835  b_begin = b + j*ldb + j*incb;
836 
837  bl1_szcopyv( conj,
838  n_elem,
839  a_begin, inca,
840  b_begin, incb );
841  }
842  }
843  else // if ( n_elem_is_ascending )
844  {
845  for ( j = 0; j < n_iter; j++ )
846  {
847  n_elem = bl1_min( j + 1, n_elem_max );
848  a_begin = a + j*lda;
849  b_begin = b + j*ldb;
850 
851  bl1_szcopyv( conj,
852  n_elem,
853  a_begin, inca,
854  b_begin, incb );
855  }
856  }
857 }
void bl1_szcopyv(conj1_t conj, int m, float *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:169

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_szcopyv(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_zccopymrt()

void bl1_zccopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
1921 {
1922  dcomplex* a_begin;
1923  scomplex* b_begin;
1924  int lda, inca;
1925  int ldb, incb;
1926  int n_iter;
1927  int n_elem;
1928  int n_elem_max;
1929  int n_elem_is_descending;
1930  int j;
1931  conj1_t conj;
1932 
1933  // Return early if possible.
1934  if ( bl1_zero_dim2( m, n ) ) return;
1935 
1936  // Initialize variables based on storage format of B and value of uplo.
1937  if ( bl1_is_col_storage( b_rs, b_cs ) )
1938  {
1939  if ( bl1_is_lower( uplo ) )
1940  {
1941  n_iter = bl1_min( m, n );
1942  n_elem_max = m;
1943  lda = a_cs;
1944  inca = a_rs;
1945  ldb = b_cs;
1946  incb = b_rs;
1947  n_elem_is_descending = TRUE;
1948  }
1949  else // if ( bl1_is_upper( uplo ) )
1950  {
1951  n_iter = n;
1952  n_elem_max = bl1_min( m, n );
1953  lda = a_cs;
1954  inca = a_rs;
1955  ldb = b_cs;
1956  incb = b_rs;
1957  n_elem_is_descending = FALSE;
1958  }
1959  }
1960  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1961  {
1962  if ( bl1_is_lower( uplo ) )
1963  {
1964  n_iter = m;
1965  n_elem_max = bl1_min( m, n );
1966  lda = a_rs;
1967  inca = a_cs;
1968  ldb = b_rs;
1969  incb = b_cs;
1970  n_elem_is_descending = FALSE;
1971  }
1972  else // if ( bl1_is_upper( uplo ) )
1973  {
1974  n_iter = bl1_min( m, n );
1975  n_elem_max = n;
1976  lda = a_rs;
1977  inca = a_cs;
1978  ldb = b_rs;
1979  incb = b_cs;
1980  n_elem_is_descending = TRUE;
1981  }
1982  }
1983 
1984  // Swap lda and inca if we're doing a transpose.
1985  if ( bl1_does_trans( trans ) )
1986  {
1987  bl1_swap_ints( lda, inca );
1988  }
1989 
1990  // Extract conj component from trans parameter.
1991  conj = bl1_proj_trans1_to_conj( trans );
1992 
1993  // Choose the loop based on whether n_elem will be shrinking or growing
1994  // with each iteration.
1995  if ( n_elem_is_descending )
1996  {
1997  for ( j = 0; j < n_iter; j++ )
1998  {
1999  n_elem = n_elem_max - j;
2000  a_begin = a + j*lda + j*inca;
2001  b_begin = b + j*ldb + j*incb;
2002 
2003  bl1_zccopyv( conj,
2004  n_elem,
2005  a_begin, inca,
2006  b_begin, incb );
2007  }
2008  }
2009  else // if ( n_elem_is_ascending )
2010  {
2011  for ( j = 0; j < n_iter; j++ )
2012  {
2013  n_elem = bl1_min( j + 1, n_elem_max );
2014  a_begin = a + j*lda;
2015  b_begin = b + j*ldb;
2016 
2017  bl1_zccopyv( conj,
2018  n_elem,
2019  a_begin, inca,
2020  b_begin, incb );
2021  }
2022  }
2023 }
void bl1_zccopyv(conj1_t conj, int m, dcomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:330

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_zccopyv(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_zcopymrt()

void bl1_zcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
329 {
330  dcomplex* a_begin;
331  dcomplex* b_begin;
332  int lda, inca;
333  int ldb, incb;
334  int n_iter;
335  int n_elem;
336  int n_elem_max;
337  int n_elem_is_descending;
338  int j;
339  conj1_t conj;
340 
341  // Return early if possible.
342  if ( bl1_zero_dim2( m, n ) ) return;
343 
344  // Initialize variables based on storage format of B and value of uplo.
345  if ( bl1_is_col_storage( b_rs, b_cs ) )
346  {
347  if ( bl1_is_lower( uplo ) )
348  {
349  n_iter = bl1_min( m, n );
350  n_elem_max = m;
351  lda = a_cs;
352  inca = a_rs;
353  ldb = b_cs;
354  incb = b_rs;
355  n_elem_is_descending = TRUE;
356  }
357  else // if ( bl1_is_upper( uplo ) )
358  {
359  n_iter = n;
360  n_elem_max = bl1_min( m, n );
361  lda = a_cs;
362  inca = a_rs;
363  ldb = b_cs;
364  incb = b_rs;
365  n_elem_is_descending = FALSE;
366  }
367  }
368  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
369  {
370  if ( bl1_is_lower( uplo ) )
371  {
372  n_iter = m;
373  n_elem_max = bl1_min( m, n );
374  lda = a_rs;
375  inca = a_cs;
376  ldb = b_rs;
377  incb = b_cs;
378  n_elem_is_descending = FALSE;
379  }
380  else // if ( bl1_is_upper( uplo ) )
381  {
382  n_iter = bl1_min( m, n );
383  n_elem_max = n;
384  lda = a_rs;
385  inca = a_cs;
386  ldb = b_rs;
387  incb = b_cs;
388  n_elem_is_descending = TRUE;
389  }
390  }
391 
392  // Swap lda and inca if we're doing a transpose.
393  if ( bl1_does_trans( trans ) )
394  {
395  bl1_swap_ints( lda, inca );
396  }
397 
398  // Extract conj component from trans parameter.
399  conj = bl1_proj_trans1_to_conj( trans );
400 
401  // Choose the loop based on whether n_elem will be shrinking or growing
402  // with each iteration.
403  if ( n_elem_is_descending )
404  {
405  for ( j = 0; j < n_iter; j++ )
406  {
407  n_elem = n_elem_max - j;
408  a_begin = a + j*lda + j*inca;
409  b_begin = b + j*ldb + j*incb;
410 
411  bl1_zcopyv( conj,
412  n_elem,
413  a_begin, inca,
414  b_begin, incb );
415  }
416  }
417  else // if ( n_elem_is_ascending )
418  {
419  for ( j = 0; j < n_iter; j++ )
420  {
421  n_elem = bl1_min( j + 1, n_elem_max );
422  a_begin = a + j*lda;
423  b_begin = b + j*ldb;
424 
425  bl1_zcopyv( conj,
426  n_elem,
427  a_begin, inca,
428  b_begin, incb );
429  }
430  }
431 }
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_zcopyv(), and bl1_zero_dim2().

Referenced by bl1_zhemm(), bl1_ztrmm(), bl1_ztrsm(), FLA_Copyrt_external(), FLA_Lyap_h_opz_var1(), FLA_Lyap_h_opz_var2(), FLA_Lyap_h_opz_var3(), FLA_Lyap_h_opz_var4(), FLA_Lyap_n_opz_var1(), FLA_Lyap_n_opz_var2(), FLA_Lyap_n_opz_var3(), and FLA_Lyap_n_opz_var4().

◆ bl1_zdcopymrt()

void bl1_zdcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)
1815 {
1816  dcomplex* a_begin;
1817  double* b_begin;
1818  int lda, inca;
1819  int ldb, incb;
1820  int n_iter;
1821  int n_elem;
1822  int n_elem_max;
1823  int n_elem_is_descending;
1824  int j;
1825  conj1_t conj;
1826 
1827  // Return early if possible.
1828  if ( bl1_zero_dim2( m, n ) ) return;
1829 
1830  // Initialize variables based on storage format of B and value of uplo.
1831  if ( bl1_is_col_storage( b_rs, b_cs ) )
1832  {
1833  if ( bl1_is_lower( uplo ) )
1834  {
1835  n_iter = bl1_min( m, n );
1836  n_elem_max = m;
1837  lda = a_cs;
1838  inca = a_rs;
1839  ldb = b_cs;
1840  incb = b_rs;
1841  n_elem_is_descending = TRUE;
1842  }
1843  else // if ( bl1_is_upper( uplo ) )
1844  {
1845  n_iter = n;
1846  n_elem_max = bl1_min( m, n );
1847  lda = a_cs;
1848  inca = a_rs;
1849  ldb = b_cs;
1850  incb = b_rs;
1851  n_elem_is_descending = FALSE;
1852  }
1853  }
1854  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1855  {
1856  if ( bl1_is_lower( uplo ) )
1857  {
1858  n_iter = m;
1859  n_elem_max = bl1_min( m, n );
1860  lda = a_rs;
1861  inca = a_cs;
1862  ldb = b_rs;
1863  incb = b_cs;
1864  n_elem_is_descending = FALSE;
1865  }
1866  else // if ( bl1_is_upper( uplo ) )
1867  {
1868  n_iter = bl1_min( m, n );
1869  n_elem_max = n;
1870  lda = a_rs;
1871  inca = a_cs;
1872  ldb = b_rs;
1873  incb = b_cs;
1874  n_elem_is_descending = TRUE;
1875  }
1876  }
1877 
1878  // Swap lda and inca if we're doing a transpose.
1879  if ( bl1_does_trans( trans ) )
1880  {
1881  bl1_swap_ints( lda, inca );
1882  }
1883 
1884  // Extract conj component from trans parameter.
1885  conj = bl1_proj_trans1_to_conj( trans );
1886 
1887  // Choose the loop based on whether n_elem will be shrinking or growing
1888  // with each iteration.
1889  if ( n_elem_is_descending )
1890  {
1891  for ( j = 0; j < n_iter; j++ )
1892  {
1893  n_elem = n_elem_max - j;
1894  a_begin = a + j*lda + j*inca;
1895  b_begin = b + j*ldb + j*incb;
1896 
1897  bl1_zdcopyv( conj,
1898  n_elem,
1899  a_begin, inca,
1900  b_begin, incb );
1901  }
1902  }
1903  else // if ( n_elem_is_ascending )
1904  {
1905  for ( j = 0; j < n_iter; j++ )
1906  {
1907  n_elem = bl1_min( j + 1, n_elem_max );
1908  a_begin = a + j*lda;
1909  b_begin = b + j*ldb;
1910 
1911  bl1_zdcopyv( conj,
1912  n_elem,
1913  a_begin, inca,
1914  b_begin, incb );
1915  }
1916  }
1917 }
void bl1_zdcopyv(conj1_t conj, int m, dcomplex *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:281

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_zdcopyv(), and bl1_zero_dim2().

Referenced by FLA_Copyrt_external().

◆ bl1_zscopymrt()

void bl1_zscopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)
1709 {
1710  dcomplex* a_begin;
1711  float* b_begin;
1712  int lda, inca;
1713  int ldb, incb;
1714  int n_iter;
1715  int n_elem;
1716  int n_elem_max;
1717  int n_elem_is_descending;
1718  int j;
1719  conj1_t conj;
1720 
1721  // Return early if possible.
1722  if ( bl1_zero_dim2( m, n ) ) return;
1723 
1724  // Initialize variables based on storage format of B and value of uplo.
1725  if ( bl1_is_col_storage( b_rs, b_cs ) )
1726  {
1727  if ( bl1_is_lower( uplo ) )
1728  {
1729  n_iter = bl1_min( m, n );
1730  n_elem_max = m;
1731  lda = a_cs;
1732  inca = a_rs;
1733  ldb = b_cs;
1734  incb = b_rs;
1735  n_elem_is_descending = TRUE;
1736  }
1737  else // if ( bl1_is_upper( uplo ) )
1738  {
1739  n_iter = n;
1740  n_elem_max = bl1_min( m, n );
1741  lda = a_cs;
1742  inca = a_rs;
1743  ldb = b_cs;
1744  incb = b_rs;
1745  n_elem_is_descending = FALSE;
1746  }
1747  }
1748  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
1749  {
1750  if ( bl1_is_lower( uplo ) )
1751  {
1752  n_iter = m;
1753  n_elem_max = bl1_min( m, n );
1754  lda = a_rs;
1755  inca = a_cs;
1756  ldb = b_rs;
1757  incb = b_cs;
1758  n_elem_is_descending = FALSE;
1759  }
1760  else // if ( bl1_is_upper( uplo ) )
1761  {
1762  n_iter = bl1_min( m, n );
1763  n_elem_max = n;
1764  lda = a_rs;
1765  inca = a_cs;
1766  ldb = b_rs;
1767  incb = b_cs;
1768  n_elem_is_descending = TRUE;
1769  }
1770  }
1771 
1772  // Swap lda and inca if we're doing a transpose.
1773  if ( bl1_does_trans( trans ) )
1774  {
1775  bl1_swap_ints( lda, inca );
1776  }
1777 
1778  // Extract conj component from trans parameter.
1779  conj = bl1_proj_trans1_to_conj( trans );
1780 
1781  // Choose the loop based on whether n_elem will be shrinking or growing
1782  // with each iteration.
1783  if ( n_elem_is_descending )
1784  {
1785  for ( j = 0; j < n_iter; j++ )
1786  {
1787  n_elem = n_elem_max - j;
1788  a_begin = a + j*lda + j*inca;
1789  b_begin = b + j*ldb + j*incb;
1790 
1791  bl1_zscopyv( conj,
1792  n_elem,
1793  a_begin, inca,
1794  b_begin, incb );
1795  }
1796  }
1797  else // if ( n_elem_is_ascending )
1798  {
1799  for ( j = 0; j < n_iter; j++ )
1800  {
1801  n_elem = bl1_min( j + 1, n_elem_max );
1802  a_begin = a + j*lda;
1803  b_begin = b + j*ldb;
1804 
1805  bl1_zscopyv( conj,
1806  n_elem,
1807  a_begin, inca,
1808  b_begin, incb );
1809  }
1810  }
1811 }
void bl1_zscopyv(conj1_t conj, int m, dcomplex *x, int incx, float *y, int incy)
Definition: bl1_copyv.c:191

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_zero_dim2(), and bl1_zscopyv().

Referenced by FLA_Copyrt_external().

◆ bl1_zzcopymrt()

void bl1_zzcopymrt ( uplo1_t  uplo,
trans1_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
2027 {
2028  dcomplex* a_begin;
2029  dcomplex* b_begin;
2030  int lda, inca;
2031  int ldb, incb;
2032  int n_iter;
2033  int n_elem;
2034  int n_elem_max;
2035  int n_elem_is_descending;
2036  int j;
2037  conj1_t conj;
2038 
2039  // Return early if possible.
2040  if ( bl1_zero_dim2( m, n ) ) return;
2041 
2042  // Initialize variables based on storage format of B and value of uplo.
2043  if ( bl1_is_col_storage( b_rs, b_cs ) )
2044  {
2045  if ( bl1_is_lower( uplo ) )
2046  {
2047  n_iter = bl1_min( m, n );
2048  n_elem_max = m;
2049  lda = a_cs;
2050  inca = a_rs;
2051  ldb = b_cs;
2052  incb = b_rs;
2053  n_elem_is_descending = TRUE;
2054  }
2055  else // if ( bl1_is_upper( uplo ) )
2056  {
2057  n_iter = n;
2058  n_elem_max = bl1_min( m, n );
2059  lda = a_cs;
2060  inca = a_rs;
2061  ldb = b_cs;
2062  incb = b_rs;
2063  n_elem_is_descending = FALSE;
2064  }
2065  }
2066  else // if ( bl1_is_row_storage( b_rs, b_cs ) )
2067  {
2068  if ( bl1_is_lower( uplo ) )
2069  {
2070  n_iter = m;
2071  n_elem_max = bl1_min( m, n );
2072  lda = a_rs;
2073  inca = a_cs;
2074  ldb = b_rs;
2075  incb = b_cs;
2076  n_elem_is_descending = FALSE;
2077  }
2078  else // if ( bl1_is_upper( uplo ) )
2079  {
2080  n_iter = bl1_min( m, n );
2081  n_elem_max = n;
2082  lda = a_rs;
2083  inca = a_cs;
2084  ldb = b_rs;
2085  incb = b_cs;
2086  n_elem_is_descending = TRUE;
2087  }
2088  }
2089 
2090  // Swap lda and inca if we're doing a transpose.
2091  if ( bl1_does_trans( trans ) )
2092  {
2093  bl1_swap_ints( lda, inca );
2094  }
2095 
2096  // Extract conj component from trans parameter.
2097  conj = bl1_proj_trans1_to_conj( trans );
2098 
2099  // Choose the loop based on whether n_elem will be shrinking or growing
2100  // with each iteration.
2101  if ( n_elem_is_descending )
2102  {
2103  for ( j = 0; j < n_iter; j++ )
2104  {
2105  n_elem = n_elem_max - j;
2106  a_begin = a + j*lda + j*inca;
2107  b_begin = b + j*ldb + j*incb;
2108 
2109  bl1_zcopyv( conj,
2110  n_elem,
2111  a_begin, inca,
2112  b_begin, incb );
2113  }
2114  }
2115  else // if ( n_elem_is_ascending )
2116  {
2117  for ( j = 0; j < n_iter; j++ )
2118  {
2119  n_elem = bl1_min( j + 1, n_elem_max );
2120  a_begin = a + j*lda;
2121  b_begin = b + j*ldb;
2122 
2123  bl1_zcopyv( conj,
2124  n_elem,
2125  a_begin, inca,
2126  b_begin, incb );
2127  }
2128  }
2129 }

References bl1_does_trans(), bl1_is_col_storage(), bl1_is_lower(), bl1_proj_trans1_to_conj(), bl1_zcopyv(), and bl1_zero_dim2().