18 #if defined(PASTIX_WITH_STARPU)
48 if ( B_ptr == NULL ) {
49 pastix_print_error(
"pastixRhsInit: wrong B parameter" );
65 #if defined(PASTIX_WITH_STARPU)
66 B->starpu_desc = NULL;
95 pastix_print_error(
"pastixRhsFinalize: wrong B parameter" );
104 pastix_print_warning(
"Calling pastixRhsFinalize before restoring the ordering of vector b.\n"
106 " pastix_subtask_applyorder( pastix_data, flttype, PastixDirBackward, m, n,\n"
108 "prior to this call to restore it.\n" );
112 if ( B->
cblkb != NULL ) {
113 memFree_null( B->
cblkb );
123 #if defined(PASTIX_WITH_STARPU)
125 if ( B->starpu_desc != NULL ) {
127 free( B->starpu_desc );
129 B->starpu_desc = NULL;
169 if ( ( dB->
flttype != PastixComplex64 ) &&
170 ( dB->
flttype != PastixDouble ) )
172 pastix_print_error(
"bvecDoubletoSingle: Invalid float type for mixed-precision" );
177 size_t size = dB->
ld * dB->
n;
183 sB->
b = malloc( size * pastix_size_of( sB->
flttype ) );
189 assert( sB->
b != NULL );
190 assert( sB->
m == dB->
m );
191 assert( sB->
n == dB->
n );
194 case PastixComplex64:
195 rc = LAPACKE_zlag2c_work( LAPACK_COL_MAJOR, dB->
m, dB->
n, dB->
b, dB->
ld, sB->
b, sB->
ld );
198 rc = LAPACKE_dlag2s_work( LAPACK_COL_MAJOR, dB->
m, dB->
n, dB->
b, dB->
ld, sB->
b, sB->
ld );
202 pastix_print_error(
"bvecDoubletoSingle: Invalid input float type for mixed-precision" );
249 if ( ( sB->
flttype != PastixComplex32 ) &&
250 ( sB->
flttype != PastixFloat ) )
252 pastix_print_error(
"bvecSingleToDouble: Invalid input float type for mixed-precision" );
257 size_t size = sB->
ld * sB->
n;
263 dB->
b = malloc( size * pastix_size_of( dB->
flttype ) );
269 assert( dB->
b != NULL );
270 assert( dB->
m == sB->
m );
271 assert( dB->
n == sB->
n );
274 case PastixComplex32:
275 rc = LAPACKE_clag2z_work( LAPACK_COL_MAJOR, sB->
m, sB->
n, sB->
b, sB->
ld, dB->
b, dB->
ld );
278 rc = LAPACKE_slag2d_work( LAPACK_COL_MAJOR, sB->
m, sB->
n, sB->
b, sB->
ld, dB->
b, dB->
ld );
282 pastix_print_error(
"bvecSingleToDouble: Invalid float type for mixed-precision" );
int pastixRhsInit(pastix_rhs_t *B_ptr)
Initialize an RHS data structure.
int pastixRhsFinalize(pastix_rhs_t B)
Cleanup an RHS data structure.
@ PASTIX_ERR_BADPARAMETER
int pastixRhsDoubletoSingle(const pastix_rhs_t dB, pastix_rhs_t sB)
Reduces the precision of an RHS.
int pastixRhsSingleToDouble(const pastix_rhs_t sB, pastix_rhs_t dB)
Increases the precision of an RHS.
void starpu_rhs_destroy(starpu_rhs_desc_t *desc)
Free the StarPU descriptor of the dense matrix.
pastix_int_t * Ploc2Pglob
bvec_handle_comm_t * rhs_comm
pastix_coeftype_t flttype
Main PaStiX RHS structure.