# HG changeset patch # User michelemartone # Date 1434918506 0 # Node ID bdd6ce97fa371ea0058312435dff3eb71e0b847a # Parent f4cf214fe3a4e672e0e57430fc4c0a64cfcea363 adjusting the documentation of the "render" case and correcting the symbols for the 'sparsersb' synopsis. diff -r f4cf214fe3a4 -r bdd6ce97fa37 main/sparsersb/doc/sparsersb.txt --- a/main/sparsersb/doc/sparsersb.txt Sun Jun 21 19:48:24 2015 +0000 +++ b/main/sparsersb/doc/sparsersb.txt Sun Jun 21 20:28:26 2015 +0000 @@ -4,16 +4,16 @@ -- Loadable Function: S = sparsersb (I, J, SV, M, N, NZMAX) -- Loadable Function: S = sparsersb (I, J, SV) -- Loadable Function: S = sparsersb (M, N) - -- Loadable Function: S = sparsersb (I, J, S, M, N, "unique") + -- Loadable Function: S = sparsersb (I, J, SV, M, N, "unique") -- Loadable Function: sparsersb ("set", OPN, OPV) - -- Loadable Function: V = sparsersb (A, "get", MIF) - -- Loadable Function: S = sparsersb (A, QS) + -- Loadable Function: V = sparsersb (S, "get", MIF) + -- Loadable Function: V = sparsersb (S, QS) -- Loadable Function: sparsersb (A,"save",MTXFILENAME) -- Loadable Function: [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] = sparsersb (MTXFILENAME, MTXTYPESTRING) - -- Loadable Function: S = sparsersb (A,"render", FILENAME[, RWIDTH, + -- Loadable Function: sparsersb (S,"render", FILENAME[, RWIDTH, RHEIGHT]) - -- Loadable Function: [O =] sparsersb (A,"autotune"[, TRANSA, NRHS, + -- Loadable Function: [O =] sparsersb (S,"autotune"[, TRANSA, NRHS, MAXR, TMAX, TN, SF]) Create or manipulate sparse matrices using the RSB format provided by librsb, as similarly as possible to `sparse'. @@ -44,7 +44,7 @@ Market matrix file named MTXFILENAME. *Note*: if multiple values are specified with the same I, J - indices, the corresponding values in S will be added. + indices, the corresponding values in SV will be added. The following are all equivalent: @@ -77,16 +77,16 @@ feature is still incomplete, and whatever the value of QS, a general information string will be returned. - If A is a sparsersb matrix and the "render" keyword is specified, + If S is a sparsersb matrix and the "render" keyword is specified, and FILENAME is a string, A will be rendered as an Encapsulated Postscript file FILENAME. Optionally, width and height can be specified in `RWIDTH, RHEIGHT'. Defaults are 512. - If A is a sparsersb matrix and the "autotune" keyword is + If S is a sparsersb matrix and the "autotune" keyword is specified, autotuning of the matrix will take place, with SpMV and autotuning parameters. After the "autotune" string, the remaining parameters are optional. Parameter TRANSA specifies whether to - tune for untransposed ("n") or transposed ("t"); NRHS the number + tune for untransposed ("N") or transposed ("T"); NRHS the number of right hand sides; MAXR the number of tuning rounds; TMAX the threads to use. If giving an output argument O, that will be assigned to the autotuned matrix, and the input one A will remain diff -r f4cf214fe3a4 -r bdd6ce97fa37 main/sparsersb/src/sparsersb.cc --- a/main/sparsersb/src/sparsersb.cc Sun Jun 21 19:48:24 2015 +0000 +++ b/main/sparsersb/src/sparsersb.cc Sun Jun 21 20:28:26 2015 +0000 @@ -221,15 +221,16 @@ #endif #if defined(RSB_LIBRSB_VER) && (RSB_LIBRSB_VER>=10100) #define RSBOI_10100_DOCH \ -"@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{A},\"render\", @var{filename}[, @var{rWidth}, @var{rHeight}])\n"\ -"@deftypefnx {Loadable Function} {[@var{O} =]} " RSBOI_FNS " (@var{A},\"autotune\"[, @var{transA}, @var{nrhs}, @var{maxr}, @var{tmax}, @var{tn}, @var{sf}])\n"\ +"@deftypefnx {Loadable Function} " RSBOI_FNS " (@var{S},\"render\", @var{filename}[, @var{rWidth}, @var{rHeight}])\n"\ +"@deftypefnx {Loadable Function} {[@var{O} =]} " RSBOI_FNS " (@var{S},\"autotune\"[, @var{transA}, @var{nrhs}, @var{maxr}, @var{tmax}, @var{tn}, @var{sf}])\n"\ +/* #define RSBOI_10100_DOC "If @var{S} is a " RSBOI_FNS " matrix and one of the \"render\",\"renderb\",\"renders\" keywords ... */ #define RSBOI_10100_DOC \ \ -"If @var{A} is a " RSBOI_FNS " matrix and the \"render\" keyword is specified, and @var{filename} is a string, @var{A} will be rendered as an Encapsulated Postscript file @var{filename}. Optionally, width and height can be specified in @code{@var{rWidth}, @var{rHeight}}. Defaults are 512.\n"\ +"If @var{S} is a " RSBOI_FNS " matrix and the \"render\" keyword is specified, and @var{filename} is a string, @var{A} will be rendered as an Encapsulated Postscript file @var{filename}. Optionally, width and height can be specified in @code{@var{rWidth}, @var{rHeight}}. Defaults are 512.\n"\ "\n"\ \ -"If @var{A} is a " RSBOI_FNS " matrix and the \"autotune\" keyword is specified, autotuning of the matrix will take place, with SpMV and autotuning parameters. After the \"autotune\" string, the remaining parameters are optional. Parameter @var{transA} specifies whether to tune for untransposed (\"n\") or transposed (\"t\"); @var{nrhs} the number of right hand sides; @var{maxr} the number of tuning rounds; @var{tmax} the threads to use. If giving an output argument @var{O}, that will be assigned to the autotuned matrix, and the input one @var{A} will remain unchanged. See librsb documentation for @code{rsb_tune_spmm} to learn more.\n" +"If @var{S} is a " RSBOI_FNS " matrix and the \"autotune\" keyword is specified, autotuning of the matrix will take place, with SpMV and autotuning parameters. After the \"autotune\" string, the remaining parameters are optional. Parameter @var{transA} specifies whether to tune for untransposed (\"N\") or transposed (\"T\"); @var{nrhs} the number of right hand sides; @var{maxr} the number of tuning rounds; @var{tmax} the threads to use. If giving an output argument @var{O}, that will be assigned to the autotuned matrix, and the input one @var{A} will remain unchanged. See librsb documentation for @code{rsb_tune_spmm} to learn more.\n" #else #define RSBOI_10100_DOC "" #define RSBOI_10100_DOCH "" @@ -1919,17 +1920,17 @@ DEFUN_DLD (RSB_SPARSERSB_LABEL, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{a})\n\ -@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv}, @var{m}, @var{n})\n\ -@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv}, @var{m}, @var{n}, @var{nzmax})\n\ -@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv})\n\ -@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{m}, @var{n})\n\ -@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{s}, @var{m}, @var{n}, \"unique\")\n\ +@deftypefn {Loadable Function} {@var{S} =} " RSBOI_FNS " (@var{a})\n\ +@deftypefnx {Loadable Function} {@var{S} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv}, @var{m}, @var{n})\n\ +@deftypefnx {Loadable Function} {@var{S} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv}, @var{m}, @var{n}, @var{nzmax})\n\ +@deftypefnx {Loadable Function} {@var{S} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv})\n\ +@deftypefnx {Loadable Function} {@var{S} =} " RSBOI_FNS " (@var{m}, @var{n})\n\ +@deftypefnx {Loadable Function} {@var{S} =} " RSBOI_FNS " (@var{i}, @var{j}, @var{sv}, @var{m}, @var{n}, \"unique\")\n\ @deftypefnx {Loadable Function} " RSBOI_FNS " (\"set\", @var{opn}, @var{opv})\n\ -@deftypefnx {Loadable Function} {@var{v} =} " RSBOI_FNS " (@var{A}, \"get\", @var{mif})\n\ -@deftypefnx {Loadable Function} {@var{s} =} " RSBOI_FNS " (@var{A}, @var{QS})\n\ +@deftypefnx {Loadable Function} {@var{v} =} " RSBOI_FNS " (@var{S}, \"get\", @var{mif})\n\ +@deftypefnx {Loadable Function} {@var{v} =} " RSBOI_FNS " (@var{S}, @var{QS})\n\ @deftypefnx {Loadable Function} " RSBOI_FNS " (@var{a},\"save\",@var{mtxfilename})\n\ -@deftypefnx {Loadable Function} {[@var{s}, @var{nrows}, @var{ncols}, @var{nnz}, @var{repinfo}, @var{field}, @var{symmetry}] =} " RSBOI_FNS " (@var{mtxfilename}, @var{mtxtypestring})\n\ +@deftypefnx {Loadable Function} {[@var{S}, @var{nrows}, @var{ncols}, @var{nnz}, @var{repinfo}, @var{field}, @var{symmetry}] =} " RSBOI_FNS " (@var{mtxfilename}, @var{mtxtypestring})\n\ " RSBOI_10100_DOCH ""\ \ "\n"\ @@ -1960,7 +1961,7 @@ "\n\ \ @strong{Note}: if multiple values are specified with the same\n\ -@var{i}, @var{j} indices, the corresponding values in @var{s} will\n\ +@var{i}, @var{j} indices, the corresponding values in @var{sv} will\n\ be added.\n\ \n\ The following are all equivalent:\n\ @@ -2457,7 +2458,7 @@ %!test %! sparsersb("set","RSB_IO_WANT_VERBOSE_TUNING","1") %!test -%! # sparsersb("get","RSB_IO_WANT_VERBOSE_TUNING","1") +%! # sparsersb("get","RSB_IO_WANT_VERBOSE_TUNING","1") # FIXME %!test %! sparsersb(sparsersb([11,0;21,22]),"RSB_MIF_TOTAL_SIZE__TO__SIZE_T") %!test @@ -2467,7 +2468,8 @@ %!test %! [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] = sparsersb("sparsersb_temporary_matrix_file.mtx", "Z"); assert(NROWS==2);assert(NCOLS==2);assert(NNZ==3);assert(FIELD=="complex");assert(SYMMETRY=='U'); %!test -%! sparsersb(sparsersb([11,0;21,22]),"render","sparsersb_temporary_rendering.eps",1024,1024) +%! rrm=sparsersb(sprand(1000,1000,0.001)); sparsersb(rrm,"render", "sparsersb_temporary_render.eps" ,1024,1024); +%! # sparsersb(rrm,"renderb", "sparsersb_temporary_renderb.eps"); sparsersb(rrm,"renders", "sparsersb_temporary_renders.eps"); # FIXME %!test %! sparsersb(sparsersb(sprand(100,100,0.4)),"autotune","n",20,4,1,1,1) */