#include <Rocblas.h>
Classes | |
struct | acosa |
struct | assn |
struct | limit1v |
struct | maxof |
struct | maxv |
struct | minv |
struct | nega |
struct | random |
struct | random< double > |
struct | sqrta |
struct | sumv |
struct | swapp |
Static Public Member Functions | |
static void | init (const std::string &name) |
Creates window for Rocblas and registers functions. More... | |
static void | finalize (const std::string &name) |
Delete window for Rocblas. More... | |
static void | add (const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for addition. More... | |
static void | sub (const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for subtraction. More... | |
static void | mul (const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for multiplication. More... | |
static void | limit1 (const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for limit1. More... | |
static void | div (const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for division. More... | |
static void | add_scalar (const Attribute *x, const void *y, Attribute *z, int swap=0) |
Operation wrapper for addition with y as a scalar pointer. More... | |
static void | sub_scalar (const Attribute *x, const void *y, Attribute *z, int swap=0) |
Operation wrapper for subtraction with y as a scalar pointer. More... | |
static void | mul_scalar (const Attribute *x, const void *y, Attribute *z, int swap=0) |
Operation wrapper for multiplication with y as a scalar pointer. More... | |
static void | div_scalar (const Attribute *x, const void *y, Attribute *z, int swap=0) |
Operation wrapper for division with y as a scalar pointer. More... | |
static void | maxof_scalar (const Attribute *x, const void *y, Attribute *z, int swap=0) |
Operation wrapper for addition with y as a scalar pointer. More... | |
static void | dot (const Attribute *x, const Attribute *y, Attribute *z, const Attribute *mults=NULL) |
Wrapper for dot product. More... | |
static void | dot_scalar (const Attribute *x, const Attribute *y, void *z, const Attribute *mults=NULL) |
Wrapper for 2-norm with z as a scalar pointer. More... | |
static void | dot_MPI (const Attribute *x, const Attribute *y, Attribute *z, const MPI_Comm *comm=NULL, const Attribute *mults=NULL) |
Wrapper for dot product. More... | |
static void | dot_scalar_MPI (const Attribute *x, const Attribute *y, void *z, const MPI_Comm *comm=NULL, const Attribute *mults=NULL) |
Wrapper for 2-norm with z as a scalar pointer. More... | |
static void | nrm2 (const Attribute *x, Attribute *y, const Attribute *mults=NULL) |
Wrapper for 2-norm. More... | |
static void | nrm2_scalar (const Attribute *x, void *y, const Attribute *mults=NULL) |
Wrapper for 2-norm with y as a scalar pointer. More... | |
static void | nrm2_MPI (const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL, const Attribute *mults=NULL) |
Wrapper for 2-norm with MPI. More... | |
static void | nrm2_scalar_MPI (const Attribute *x, void *y, const MPI_Comm *comm, const Attribute *mults=NULL) |
Wrapper for 2-norm with y as a scalar pointer with MPI. More... | |
static void | swap (Attribute *x, Attribute *y) |
Wrapper for swap. More... | |
static void | copy (const Attribute *x, Attribute *y) |
Wrapper for copy. More... | |
static void | rand (const Attribute *a, Attribute *z) |
Generate a random number between 0 and $a$ for each entry in z. More... | |
static void | copy_scalar (const void *x, Attribute *y) |
Operation wrapper for copy (x is a scalar pointer). More... | |
static void | rand_scalar (const void *a, Attribute *z) |
Generate a random number between 0 and $a$ for each entry in z. More... | |
static void | neg (const Attribute *x, Attribute *y) |
Wrapper for neg (y=-x). More... | |
static void | sqrt (const Attribute *x, Attribute *y) |
Wrapper for sqrt (y=sqrt(x)). More... | |
static void | acos (const Attribute *x, Attribute *y) |
Wrapper for acos (y=acos(x)). More... | |
static void | max_MPI (const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL) |
Wrapper for max. More... | |
static void | max_scalar_MPI (const Attribute *x, void *y, const MPI_Comm *comm=NULL) |
Operation wrapper for max (y is a scalar pointer). More... | |
static void | min_MPI (const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL) |
Wrapper for min. More... | |
static void | min_scalar_MPI (const Attribute *x, void *y, const MPI_Comm *comm=NULL) |
Operation wrapper for min (y is a scalar pointer). More... | |
static void | sum_MPI (const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL) |
Wrapper for sum. More... | |
static void | sum_scalar_MPI (const Attribute *x, void *y, const MPI_Comm *comm=NULL) |
Operation wrapper for sum (y is a scalar pointer). More... | |
static void | axpy (const Attribute *a, const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for z = a * x + y. More... | |
static void | axpy_scalar (const void *a, const Attribute *x, const Attribute *y, Attribute *z) |
Operation wrapper for z = a * x + y (a is a scalar pointer). More... | |
Protected Types | |
enum | { BLAS_VOID, BLAS_SCALAR, BLAS_VEC, BLAS_SCNE, BLAS_VEC2D } |
Static Protected Member Functions | |
template<class FuncType , int ytype> | |
static void | calc (Attribute *z, const Attribute *x, const void *yin, FuncType opp, bool swap=false) |
Performs the operation: z = x op y. More... | |
template<class data_type , int ztype> | |
static void | calcDot (void *zout, const Attribute *x, const Attribute *y, const MPI_Comm *comm=NULL, const Attribute *mults=NULL) |
Performs the operation: z = <x, y> More... | |
template<class FuncType , int ytype> | |
static void | gen2arg (Attribute *z, void *yin, FuncType opp) |
Performs the operation opp(x, y) More... | |
template<class data_type , int atype> | |
static void | axpy_gen (const void *a, const Attribute *x, const Attribute *y, Attribute *z) |
Performs the operation: z = a*x + y. More... | |
template<class FuncType > | |
static void | calcChoose (const Attribute *x, const Attribute *y, Attribute *z, FuncType opp) |
Chooses which calc function to call based on type of y. More... | |
template<class Op > | |
static void | copy_helper (const Attribute *x, Attribute *z) |
template<int attr_type> | |
static int | get_stride (const Attribute *attr) |
template<class data_type , int attr_type, bool is_staggered> | |
static data_type & | getref (data_type *base, const int r, const int c, const int nc) |
template<class data_type , int attr_type, bool is_staggered> | |
static const data_type & | getref (const data_type *base, const int r, const int c, const int nc) |
template<class OPint , class OPdbl , int OPMPI> | |
static void | reduce_MPI (const Attribute *x, Attribute *z, const MPI_Comm *comm, int, double) |
template<class OPint , class OPdbl , int OPMPI> | |
static void | reduce_scalar_MPI (const Attribute *x, void *y, const MPI_Comm *comm, int, double) |
static std::string | to_str (int i) |
Private Types | |
typedef unsigned int | Size |
|
protected |
Enumerator | |
---|---|
BLAS_VOID | |
BLAS_SCALAR | |
BLAS_VEC | |
BLAS_SCNE | |
BLAS_VEC2D |
Definition at line 259 of file Rocblas.h.
Wrapper for acos (y=acos(x)).
Definition at line 545 of file op2args.C.
References BLAS_SCALAR, BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), Attribute::fullname(), Attribute::is_windowed(), Attribute::size_of_components(), x, and z.
Referenced by init().
Operation wrapper for addition.
Definition at line 221 of file op3args.C.
References calcChoose(), COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), and Attribute::fullname().
Referenced by FaceOffset_3::balance_mass(), update_py::burn_get_burning_rate1d(), init(), Window_manifold_2::perturb_mesh(), Rocprop::propagate(), FaceOffset_3::rescale_displacements(), and FaceOffset_3::time_stepping().
Operation wrapper for addition with y as a scalar pointer.
Definition at line 299 of file op3args.C.
References BLAS_VOID, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by init(), and rescale_object().
Operation wrapper for z = a * x + y.
Definition at line 170 of file axpy.C.
References COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), Attribute::fullname(), Attribute::is_windowed(), Attribute::size_of_components(), x, y, and z.
Referenced by init().
|
staticprotected |
Performs the operation: z = a*x + y.
Definition at line 27 of file axpy.C.
References BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, BLAS_VOID, COM_assertion_msg, COM_compatible_types(), Attribute::data_type(), Attribute::fullname(), i, Attribute::id(), Attribute::is_windowed(), j, Mesquite::length(), Window::name(), Window::panes(), Attribute::pointer(), s, Attribute::size_of_components(), Attribute::size_of_items(), to_str(), and Attribute::window().
Operation wrapper for z = a * x + y (a is a scalar pointer).
Definition at line 210 of file axpy.C.
References COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by init().
|
staticprotected |
Performs the operation: z = x op y.
Definition at line 49 of file op3args.C.
References BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, BLAS_VOID, COM_assertion_msg, COM_compatible_types(), Attribute::data_type(), Attribute::fullname(), i, Attribute::id(), Attribute::is_windowed(), j, Mesquite::length(), Window::name(), Window::panes(), Attribute::pointer(), s, Attribute::size_of_components(), Attribute::size_of_items(), to_str(), Attribute::window(), and y.
|
staticprotected |
Chooses which calc function to call based on type of y.
Definition at line 192 of file op3args.C.
References Attribute::is_windowed(), Attribute::size_of_components(), x, y, and z.
Referenced by add(), div(), limit1(), mul(), and sub().
|
staticprotected |
Performs the operation: z = <x, y>
Definition at line 27 of file dots.C.
References BLAS_SCALAR, BLAS_VEC, BLAS_VOID, COM_assertion_msg, COM_compatible_types(), COM_INT, COM_INTEGER, COMMPI_Initialized(), Attribute::data_type(), Attribute::fullname(), i, Attribute::id(), Attribute::is_windowed(), j, Mesquite::length(), MPI_SUM, n, Window::name(), ni, nj, Window::panes(), Attribute::pointer(), s, Attribute::size_of_components(), Attribute::size_of_items(), Attribute::stride(), to_str(), Attribute::window(), and y.
Wrapper for copy.
Definition at line 333 of file op2args.C.
References Window::attributes(), COM_ALL, COM_assertion_msg, COM_ATTS, COM_CHAR, COM_CONN, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, COM_MESH, COM_PMESH, Attribute::data_type(), Attribute::fullname(), i, Attribute::id(), Window::name(), Attribute::window(), x, and z.
Referenced by Rocmop::add_aspect_ratios(), FaceOffset_3::balance_mass(), FaceOffset_3::compute_quadrics(), FaceOffset_3::filter_and_identify_ridge_edges(), init(), Rocprop::propagate(), Propagation_3::set_constraints(), Rocmop::smooth_surf_medial(), Rocmop::smooth_vol_mesq_ng(), and FaceOffset_3::time_stepping().
Definition at line 315 of file op2args.C.
References Attribute::is_windowed(), Attribute::size_of_components(), x, and z.
|
static |
Operation wrapper for copy (x is a scalar pointer).
Definition at line 583 of file op2args.C.
References COM_assertion_msg, COM_CHAR, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, and z.
Referenced by FaceOffset_3::balance_mass(), FaceOffset_3::build_ridge_neighbor_list(), FaceOffset_3::compute_anisotropic_vertex_centers(), Window_manifold_2::compute_mcn(), Rocmop::compute_medial_quadric(), FaceOffset_3::compute_quadrics(), Window_manifold_2::compute_shortest_edgelen_nodes(), Propagation_3::convert_constraints(), FaceOffset_3::denoise_surface(), Propagation_3::determine_constraint_boundary(), FaceOffset_3::distribute_volume_e2n(), FaceOffset_3::filter_and_identify_ridge_edges(), Rocmop::get_redist_safe_factor(), init(), FaceOffset_3::mark_weak_vertices(), FaceOffset_3::nulaplacian_smooth(), FaceOffset_3::reclassify_ridge_vertices(), Rocmop::redistribute_vertices_ridge(), Rocmop::redistribute_vertices_smooth(), reduce_MPI(), Rocmop::smooth_vol_mesq_ng(), and FaceOffset_3::time_stepping().
Operation wrapper for division.
Definition at line 269 of file op3args.C.
References calcChoose(), COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), and Attribute::fullname().
Referenced by rflu_modrepair3d::angfnd(), FaceOffset_3::compute_anisotropic_vertex_centers(), Window_manifold_2::compute_mcn(), FaceOffset_3::compute_quadrics(), computeflux(), FaceOffset_3::denoise_surface(), init(), rflo_viscousfluxpatch(), and Rocmop::smooth_vol_mesq_ng().
Operation wrapper for division with y as a scalar pointer.
Definition at line 363 of file op3args.C.
References BLAS_VOID, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by Rocmop::constrain_displacements(), Rocmop::get_usr_disp(), and init().
|
static |
Wrapper for dot product.
Wrapper for 2-norm.
Definition at line 279 of file dots.C.
References dot_MPI().
Referenced by angle_rad_3d(), FaceOffset_3::balance_mass(), and init().
|
static |
Wrapper for dot product.
Definition at line 226 of file dots.C.
References COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), Attribute::fullname(), Attribute::is_windowed(), Attribute::size_of_components(), x, y, and z.
Referenced by dot(), init(), nrm2(), and nrm2_MPI().
|
static |
Wrapper for 2-norm with z as a scalar pointer.
Definition at line 283 of file dots.C.
References dot_scalar_MPI().
Referenced by init().
|
static |
Wrapper for 2-norm with z as a scalar pointer.
Definition at line 264 of file dots.C.
References COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by dot_scalar(), init(), nrm2_scalar(), and nrm2_scalar_MPI().
|
static |
Delete window for Rocblas.
Definition at line 112 of file Rocblas.C.
References COM_delete_window().
Referenced by Rocblas_unload_module(), rocblas_unload_module(), ROCBLAS_UNLOAD_MODULE(), rocblas_unload_module_(), and ROCBLAS_UNLOAD_MODULE_().
|
staticprotected |
Performs the operation opp(x, y)
Definition at line 114 of file op2args.C.
References BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, BLAS_VOID, COM_assertion_msg, COM_compatible_types(), Attribute::data_type(), Attribute::fullname(), i, Pane::id(), Attribute::id(), Attribute::is_windowed(), j, Mesquite::length(), Window::name(), Attribute::pane(), Window::panes(), Attribute::pointer(), s, Attribute::size_of_components(), Attribute::size_of_items(), to_str(), Attribute::window(), y, and z.
|
inlinestaticprotected |
Definition at line 291 of file Rocblas.h.
References BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, Attribute::size_of_items(), and Attribute::stride().
|
inlinestaticprotected |
Definition at line 306 of file Rocblas.h.
References BLAS_SCNE, BLAS_VEC, and BLAS_VEC2D.
|
inlinestaticprotected |
Definition at line 319 of file Rocblas.h.
References BLAS_SCNE, BLAS_VEC, and BLAS_VEC2D.
|
static |
Creates window for Rocblas and registers functions.
Definition at line 37 of file Rocblas.C.
References acos(), add(), add_scalar(), axpy(), axpy_scalar(), COM_INT, COM_METADATA, COM_MPI_COMM, COM_new_window(), COM_set_function(), COM_VOID, COM_window_init_done(), copy(), copy_scalar(), div(), div_scalar(), dot(), dot_MPI(), dot_scalar(), dot_scalar_MPI(), limit1(), max_MPI(), max_scalar_MPI(), maxof_scalar(), min_MPI(), min_scalar_MPI(), mul(), mul_scalar(), neg(), nrm2(), nrm2_MPI(), nrm2_scalar(), nrm2_scalar_MPI(), rand(), rand_scalar(), sqrt(), sub(), sub_scalar(), sum_MPI(), sum_scalar_MPI(), and swap().
Referenced by Rocblas_load_module(), rocblas_load_module(), ROCBLAS_LOAD_MODULE(), rocblas_load_module_(), and ROCBLAS_LOAD_MODULE_().
Operation wrapper for limit1.
Definition at line 284 of file op3args.C.
References calcChoose(), COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), and Attribute::fullname().
Referenced by init().
|
static |
Operation wrapper for addition with y as a scalar pointer.
Definition at line 315 of file op3args.C.
References BLAS_VOID, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by init().
|
static |
Operation wrapper for multiplication.
Definition at line 253 of file op3args.C.
References calcChoose(), COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), and Attribute::fullname().
Referenced by init(), MarkerParticles_3::multiply_nodal_normals(), Window_manifold_2::perturb_mesh(), and turb_flowlmupdateloglay().
Operation wrapper for multiplication with y as a scalar pointer.
Definition at line 347 of file op3args.C.
References BLAS_VOID, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by init(), FaceOffset_3::rescale_displacements(), rescale_object(), MarkerParticles_3::time_stepping(), and FaceOffset_3::time_stepping().
Wrapper for neg (y=-x).
Definition at line 455 of file op2args.C.
References BLAS_SCALAR, BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, COM_assertion_msg, COM_CHAR, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), Attribute::fullname(), Attribute::is_windowed(), Attribute::size_of_components(), x, and z.
Referenced by init().
Wrapper for 2-norm.
Definition at line 288 of file dots.C.
References dot_MPI().
Referenced by init().
|
static |
Wrapper for 2-norm with MPI.
Definition at line 298 of file dots.C.
References dot_MPI().
Referenced by init().
Wrapper for 2-norm with y as a scalar pointer.
Definition at line 293 of file dots.C.
References dot_scalar_MPI().
Referenced by init().
|
static |
Wrapper for 2-norm with y as a scalar pointer with MPI.
Definition at line 303 of file dots.C.
References dot_scalar_MPI().
Referenced by init().
Generate a random number between 0 and $a$ for each entry in z.
Definition at line 388 of file op2args.C.
References Window::attributes(), BLAS_SCALAR, BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, COM_ALL, COM_assertion_msg, COM_ATTS, COM_CONN, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, COM_MESH, COM_PMESH, Attribute::data_type(), Attribute::fullname(), i, Attribute::id(), Attribute::is_windowed(), Window::name(), Attribute::size_of_components(), Attribute::window(), x, and z.
Referenced by init().
|
static |
Generate a random number between 0 and $a$ for each entry in z.
Definition at line 604 of file op2args.C.
References BLAS_VOID, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), and z.
Referenced by init(), and Window_manifold_2::perturb_mesh().
|
inlinestaticprotected |
Definition at line 630 of file op2args.C.
References COM_assertion_msg, COM_CHAR, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, COMMPI_Initialized(), convert2mpiop(), copy_scalar(), Attribute::data_type(), Attribute::fullname(), Attribute::is_windowed(), Attribute::pointer(), Attribute::size_of_components(), and x.
|
inlinestaticprotected |
Definition at line 726 of file op2args.C.
References COM_assertion_msg, COM_CHAR, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, COMMPI_Initialized(), convert2mpiop(), Attribute::data_type(), Attribute::fullname(), and x.
Wrapper for sqrt (y=sqrt(x)).
Definition at line 507 of file op2args.C.
References BLAS_SCALAR, BLAS_SCNE, BLAS_VEC, BLAS_VEC2D, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), Attribute::fullname(), Attribute::is_windowed(), Attribute::size_of_components(), x, and z.
Referenced by Window_manifold_2::compute_shortest_edgelen_nodes(), and init().
Operation wrapper for subtraction.
Definition at line 237 of file op3args.C.
References calcChoose(), COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), and Attribute::fullname().
Referenced by FaceOffset_3::balance_mass(), Rocmop::get_usr_disp(), init(), Rocprop::propagate(), and Rocmop::smooth().
Operation wrapper for subtraction with y as a scalar pointer.
Definition at line 331 of file op3args.C.
References BLAS_VOID, COM_assertion_msg, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, Attribute::data_type(), x, y, and z.
Referenced by init(), and Window_manifold_2::perturb_mesh().
|
static |
Wrapper for swap.
Definition at line 271 of file op2args.C.
References Window::attributes(), BLAS_VEC2D, COM_ALL, COM_assertion_msg, COM_ATTS, COM_CHAR, COM_CONN, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_INT, COM_INTEGER, COM_MESH, COM_PMESH, Attribute::data_type(), i, Attribute::id(), Window::name(), Attribute::window(), x, and y.
Referenced by init().
|
inlinestaticprotected |