#include <stdio.h>
int main(
const int argc,
char *
const argv[])
{
char ib[200];
struct rsb_mtx_t *mtxAp = NULL;
printf("Hello, RSB!\n");
printf("Initializing the library...\n");
{
printf("Error initializing the library!\n");
goto err;
}
printf("Correctly initialized the library.\n");
printf("Attempting to set the"
" RSB_IO_WANT_EXTRA_VERBOSE_INTERFACE library option.\n");
{
{
char errbuf[256];
printf("Failed setting the"
" RSB_IO_WANT_EXTRA_VERBOSE_INTERFACE"
" library option (reason string:\n%s).\n",errbuf);
{
printf("This error may be safely ignored.\n");
}
else
{
printf("Some unexpected error occurred!\n");
goto err;
}
}
else
{
printf("Setting back the "
"RSB_IO_WANT_EXTRA_VERBOSE_INTERFACE"
" library option.\n");
evi = 0;
&evi);
}
}
VA,IA,JA,nnzA,typecode,nrA,ncA,brA,bcA,
,&errval);
{
printf("Error while allocating the matrix!\n");
goto err;
}
printf("Correctly allocated a matrix.\n");
printf("Summary information of the matrix:\n");
ib,sizeof(ib));
printf("%s",ib);
printf("\n");
if((errval =
{
printf("Error performing a multiplication!\n");
goto err;
}
printf("Correctly performed a SPMV.\n");
printf("Correctly freed the matrix.\n");
{
printf("Error finalizing the library!\n");
goto err;
}
printf("Correctly finalized the library.\n");
printf("Program terminating with no error.\n");
return EXIT_SUCCESS;
err:
printf("Program terminating with error.\n");
return EXIT_FAILURE;
}
auto main() -> int
Definition: assemble.cpp:38
rsb_err_t rsb_strerror_r(rsb_err_t errval, rsb_char_t *buf, size_t buflen)
Definition: rsb_rsb.c:836
rsb_err_t rsb_lib_set_opt(enum rsb_opt_t iof, const void *iop)
Definition: rsb_rsb.c:104
rsb_err_t rsb_mtx_get_info_str(const struct rsb_mtx_t *mtxAp, const rsb_char_t *mis, void *minfop, size_t buflen)
Definition: rsb_rsb.c:1630
rsb_err_t rsb_spmv(rsb_trans_t transA, const void *alphap, const struct rsb_mtx_t *mtxAp, const void *Xp, rsb_coo_idx_t incX, const void *betap, void *Yp, rsb_coo_idx_t incY)
Definition: rsb_rsb.c:529
rsb_err_t rsb_lib_exit(struct rsb_initopts *iop)
Definition: rsb_rsb.c:202
rsb_err_t rsb_perror(void *stream, rsb_err_t errval)
Definition: rsb_rsb.c:814
struct rsb_mtx_t * rsb_mtx_free(struct rsb_mtx_t *mtxAp)
Definition: rsb_rsb.c:301
rsb_err_t rsb_lib_init(struct rsb_initopts *iop)
Definition: rsb_rsb.c:56
struct rsb_mtx_t * rsb_mtx_alloc_from_coo_const(const void *VA, const rsb_coo_idx_t *IA, const rsb_coo_idx_t *JA, rsb_nnz_idx_t nnzA, rsb_type_t typecode, rsb_coo_idx_t nrA, rsb_coo_idx_t ncA, rsb_blk_idx_t brA, rsb_blk_idx_t bcA, rsb_flags_t flagsA, rsb_err_t *errvalp)
Definition: rsb_rsb.c:240
@ RSB_IO_WANT_EXTRA_VERBOSE_INTERFACE
Definition: rsb.h:743
This file declares the user interface functions and data structures for the librsb library (see The l...
#define RSB_FLAG_NOFLAGS
Definition: rsb.h:478
#define RSB_ERR_NO_ERROR
Definition: rsb.h:616
#define RSB_NULL_EXIT_OPTIONS
Definition: rsb.h:848
#define RSB_DEFAULT_BLOCKING
Definition: rsb.h:429
signed int rsb_nnz_idx_t
Definition: rsb.h:362
signed int rsb_coo_idx_t
Definition: rsb.h:349
#define RSB_ERRS_UNSUPPORTED_FEATURES
Definition: rsb.h:676
signed int rsb_err_t
Definition: rsb.h:386
char rsb_type_t
Definition: rsb.h:378
signed int rsb_blk_idx_t
Definition: rsb.h:338
#define RSB_NULL_INIT_OPTIONS
Definition: rsb.h:847
signed int rsb_int_t
Definition: rsb.h:392
#define RSB_FLAG_DUPLICATES_SUM
Definition: rsb.h:526
#define RSB_NUMERICAL_TYPE_DEFAULT
A default numerical matrix type.
Definition: rsb_types.h:200
#define RSB_TRANSPOSITION_N
N: Non transposed flag, valid for rsb_trans_t typed variables.
Definition: rsb_types.h:138
#define RSB_DEFAULT_TYPE
The default numerical matrix type (can be used for declarations), used in the example programs.
Definition: rsb_types.h:73