9 int packed =
class[2] ==
'p';
17 int *pdim =
DIM(from), m = pdim[0], n = pdim[1];
20 if (
class[1] !=
'g' && (ul =
UPLO(from)) ==
'U')
22 if (
class[1] ==
's' &&
class[0] ==
'z' &&
TRANS(from) !=
'C')
24 if (
class[1] ==
't' &&
DIAG(from) !=
'N')
30 x1 = PROTECT(Rf_allocVector(
TYPEOF(x0), XLENGTH(x0)));
31 size_t m_ = (size_t) m, n_ = (
size_t) n;
35 c##TYPE *px0 = c##PTR(x0), *px1 = c##PTR(x1); \
37 c##NAME(trans2)(px1, px0, m_, n_, op_ct); \
39 c##NAME(trans1)(px1, px0, n_, ul, op_ct); \
59 if (
class[2] ==
'T' || !lazy)
62 char cl[] =
"...Matrix";
65 cl[2] = (
class[2] ==
'C') ?
'R' :
'C';
69 int *pdim =
DIM(from), m = pdim[0], n = pdim[1];
72 if (
class[1] !=
'g' &&
UPLO(from) ==
'U')
74 if (
class[1] ==
's' &&
class[0] ==
'z' &&
TRANS(from) !=
'C')
76 if (
class[1] ==
't' &&
DIAG(from) !=
'N')
79 if (
class[2] !=
'T') {
88 int *pp0 = INTEGER(p0), *pi0 = INTEGER(i0), nnz = INTEGER(p0)[n];
95 if (
class[0] !=
'n') {
100 SEXP x1 = PROTECT(Rf_allocVector(CPLXSXP, nnz));
101 zvconj(COMPLEX(x1), COMPLEX(x0), (
size_t) nnz);
110 SEXP p1 = PROTECT(Rf_allocVector(INTSXP, (R_xlen_t) m + 1)),
111 i1 = PROTECT(Rf_allocVector(INTSXP, nnz));
112 int *pp1 = INTEGER(p1), *pi1 = INTEGER(i1), *iwork = NULL;
119 c##TYPE *px0 = NULL, *px1 = NULL; \
121 SEXP x0 = PROTECT(GET_SLOT(from, Matrix_xSym)), \
122 x1 = PROTECT(Rf_allocVector(c##TYPESXP, nnz)); \
125 SET_SLOT(to, Matrix_xSym, x1); \
128 c##csptrans(pp1, pi1, px1, pp0, pi0, px0, m, n, op_ct, iwork); \
149 if (
class[0] !=
'n') {
154 SEXP x1 = PROTECT(Rf_allocVector(CPLXSXP, XLENGTH(x0)));
155 zvconj(COMPLEX(x1), COMPLEX(x0), (
size_t) XLENGTH(x0));
#define SWITCH5(c, template)
#define SWITCH4(c, template)
#define SWAP(a, b, t, op)
const char * valid_dense[]
#define Matrix_Calloc(p, n, t)
#define SET_DIMNAMES(x, mode, value)
const char * Matrix_class(SEXP, const char **, int, const char *)
#define Matrix_Free(p, n)
#define DIMNAMES(x, mode)
#define GET_SLOT(x, name)
#define VALID_TRANS(s, c)
SEXP newObject(const char *)
#define COPY_SLOT(dest, src, name)
const char * valid_sparse[]
#define SET_SLOT(x, name, value)
#define VALID_LOGIC2(s, d)
void zvconj(Rcomplex *x, const Rcomplex *y, size_t n)
SEXP R_dense_transpose(SEXP s_from, SEXP s_trans)
SEXP sparse_transpose(SEXP from, const char *class, char op_ct, int lazy)
SEXP dense_transpose(SEXP from, const char *class, char op_ct)
SEXP R_sparse_transpose(SEXP s_from, SEXP s_trans, SEXP s_lazy)