42 void init(
const std::string &name);
46 void finalize(
const std::string &name);
101 const MPI_Comm *comm=NULL,
const Attribute *mults=NULL);
106 const MPI_Comm *comm=NULL,
const Attribute *mults=NULL);
119 const MPI_Comm *comm=NULL,
const Attribute*mults=NULL);
124 const MPI_Comm *comm,
const Attribute *mults=NULL);
194 template <
class FuncType,
int ytype>
197 FuncType opp,
bool swap=
false);
200 template <
class data_type,
int ztype>
203 const MPI_Comm *comm=NULL,
const Attribute *mults=NULL);
206 template <
class FuncType,
int ytype>
211 template <
class data_type,
int atype>
217 template <
class FuncType>
223 template <
class Op>
static
227 template <
class T_src,
class T_trg>
struct assn;
236 template <
class T>
struct maxv;
239 template <
class T>
struct minv;
242 template <
class T>
struct sumv;
245 template <
class T>
struct nega;
261 template <
int attr_type>
265 template <
class data_type,
int attr_type,
bool is_staggered>
266 inline static data_type &
267 getref( data_type *base,
const int r,
const int c,
const int nc);
269 template <
class data_type,
int attr_type,
bool is_staggered>
270 inline static const data_type &
271 getref(
const data_type *base,
const int r,
const int c,
const int nc);
273 template <
class OP
int,
class OPdbl,
int OPMPI>
276 const MPI_Comm *comm,
int,
double);
278 template <
class OP
int,
class OPdbl,
int OPMPI>
281 const MPI_Comm* comm,
int,
double);
285 std::sprintf( buf,
"%d", i);
290 template <
int attr_type>
304 template <
class data_type,
int attr_type,
bool is_staggered>
317 template <
class data_type,
int attr_type,
bool is_staggered>
318 inline const data_type &
320 const int c,
const int nc) {
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.
static void reduce_MPI(const Attribute *x, Attribute *z, const MPI_Comm *comm, int, double)
static void sub(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for subtraction.
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>
static void nrm2_scalar(const Attribute *x, void *y, const Attribute *mults=NULL)
Wrapper for 2-norm with y as a scalar pointer.
static void calc(Attribute *z, const Attribute *x, const void *yin, FuncType opp, bool swap=false)
Performs the operation: z = x op y.
An Attribute object is a data member of a window.
void int int REAL REAL * y
static void nrm2_MPI(const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL, const Attribute *mults=NULL)
Wrapper for 2-norm with MPI.
static void rand(const Attribute *a, Attribute *z)
Generate a random number between 0 and $a$ for each entry in z.
This file contains the prototypes for Roccom API.
static void max_scalar_MPI(const Attribute *x, void *y, const MPI_Comm *comm=NULL)
Operation wrapper for max (y is a scalar pointer).
static void init(const std::string &name)
Creates window for Rocblas and registers functions.
static void limit1(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for limit1.
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.
static void axpy(const Attribute *a, const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for z = a * x + y.
static void min_MPI(const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL)
Wrapper for min.
static void max_MPI(const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL)
Wrapper for max.
static void acos(const Attribute *x, Attribute *y)
Wrapper for acos (y=acos(x)).
static void add(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for addition.
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.
static void finalize(const std::string &name)
Delete window for Rocblas.
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.
void int int int REAL REAL REAL * z
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).
void Rocblas_unload_module(const char *name)
static void min_scalar_MPI(const Attribute *x, void *y, const MPI_Comm *comm=NULL)
Operation wrapper for min (y is a scalar pointer).
static void sum_scalar_MPI(const Attribute *x, void *y, const MPI_Comm *comm=NULL)
Operation wrapper for sum (y is a scalar pointer).
static void div(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for division.
static void sum_MPI(const Attribute *x, Attribute *y, const MPI_Comm *comm=NULL)
Wrapper for sum.
static void calcChoose(const Attribute *x, const Attribute *y, Attribute *z, FuncType opp)
Chooses which calc function to call based on type of y.
static void reduce_scalar_MPI(const Attribute *x, void *y, const MPI_Comm *comm, int, double)
int stride() const
Obtain the stride of the attribute in base datatype.
static void neg(const Attribute *x, Attribute *y)
Wrapper for neg (y=-x).
static std::string to_str(int i)
static void copy_helper(const Attribute *x, Attribute *z)
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.
static void gen2arg(Attribute *z, void *yin, FuncType opp)
Performs the operation opp(x, y)
static void copy_scalar(const void *x, Attribute *y)
Operation wrapper for copy (x is a scalar pointer).
static int get_stride(const Attribute *attr)
static void rand_scalar(const void *a, Attribute *z)
Generate a random number between 0 and $a$ for each entry in z.
static void swap(Attribute *x, Attribute *y)
Wrapper for swap.
static void copy(const Attribute *x, Attribute *y)
Wrapper for copy.
static void axpy_gen(const void *a, const Attribute *x, const Attribute *y, Attribute *z)
Performs the operation: z = a*x + y.
static void nrm2(const Attribute *x, Attribute *y, const Attribute *mults=NULL)
Wrapper for 2-norm.
static void sqrt(const Attribute *x, Attribute *y)
Wrapper for sqrt (y=sqrt(x)).
static void dot(const Attribute *x, const Attribute *y, Attribute *z, const Attribute *mults=NULL)
Wrapper for dot product.
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.
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.
void Rocblas_load_module(const char *name)
Calls Rocblas initialization function.
static data_type & getref(data_type *base, const int r, const int c, const int nc)
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.
int size_of_items() const
Obtain the number of items in the attribute.
static void mul(const Attribute *x, const Attribute *y, Attribute *z)
Operation wrapper for multiplication.
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.