Matrix r5059
Loading...
Searching...
No Matches
forceCanonical.c File Reference
#include "Mdefines.h"
#include "M5.h"
#include "idz.h"

Go to the source code of this file.

Macros

#define TEMPLATE(c)
 
#define TEMPLATE(c)
 
#define TEMPLATE(c)
 

Functions

SEXP dense_force_canonical (SEXP from, const char *class, int check)
 
SEXP sparse_force_canonical (SEXP from, const char *class, int check)
 
SEXP R_dense_force_canonical (SEXP s_from, SEXP s_check)
 
SEXP R_sparse_force_canonical (SEXP s_from, SEXP s_check)
 

Macro Definition Documentation

◆ TEMPLATE [1/3]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px = c##PTR(x); \
canonical = (!packed) \
? !c##NAME(test2)(px, (size_t) n, ul, ct, nu) \
: !c##NAME(test1)(px, (size_t) n, ul, ct, nu); \
} while (0)
cholmod_common c
Definition cholmod-etc.c:5

Referenced by dense_force_canonical(), and sparse_force_canonical().

◆ TEMPLATE [2/3]

#define TEMPLATE ( c)
Value:
do { \
c##TYPE *px = c##PTR(x), *py = c##PTR(y); \
if (class[1] == 'g') \
memcpy(py, px, sizeof(c##TYPE) * (size_t) m * (size_t) n); \
else if (!packed) \
c##NAME(force2)(py, px, (size_t) n, ul, ct, nu); \
else \
c##NAME(force1)(py, px, (size_t) n, ul, ct, nu); \
} while (0)

◆ TEMPLATE [3/3]

#define TEMPLATE ( c)
Value:
do { \
value = Rf_allocVector(c##TYPESXP, 1); \
c##PTR(value)[0] = c##UNIT; \
} while (0)

Function Documentation

◆ dense_force_canonical()

SEXP dense_force_canonical ( SEXP from,
const char * class,
int check )

◆ R_dense_force_canonical()

SEXP R_dense_force_canonical ( SEXP s_from,
SEXP s_check )

Definition at line 188 of file forceCanonical.c.

References dense_force_canonical(), Matrix_class(), valid_dense, and VALID_LOGIC2.

◆ R_sparse_force_canonical()

SEXP R_sparse_force_canonical ( SEXP s_from,
SEXP s_check )

Definition at line 198 of file forceCanonical.c.

References Matrix_class(), sparse_force_canonical(), VALID_LOGIC2, and valid_sparse.

◆ sparse_force_canonical()

SEXP sparse_force_canonical ( SEXP from,
const char * class,
int check )