Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF::Set< dtype, is_ord > Class Template Reference

Set class defined by a datatype and a min/max function (if it is partially ordered i.e. is_ord=true) currently assumes min and max are given by numeric_limits (custom min/max not allowed) More...

#include <set.h>

Inheritance diagram for CTF::Set< dtype, is_ord >:
Collaboration diagram for CTF::Set< dtype, is_ord >:

Public Member Functions

 ~Set ()
 
 Set (Set const &other)
 
int pair_size () const
 gets pair size el_size plus the key size More...
 
int64_t get_key (char const *a) const
 gets key from pair More...
 
char * get_value (char *a) const
 gets pair to value from pair More...
 
char const * get_const_value (char const *a) const
 
virtual CTF_int::algstrctclone () const
 ''copy constructor'' More...
 
bool is_ordered () const
 
 Set ()
 
void set_abs_to_default ()
 
MPI_Datatype mdtype () const
 MPI datatype. More...
 
void min (char const *a, char const *b, char *c) const
 c = min(a,b) More...
 
void max (char const *a, char const *b, char *c) const
 c = max(a,b) More...
 
void min (char *c) const
 c = minimum possible value More...
 
void max (char *c) const
 c = maximum possible value More...
 
void cast_double (double d, char *c) const
 c = &d More...
 
void cast_int (int64_t i, char *c) const
 c = &i More...
 
double cast_to_double (char const *c) const
 return (double)*c More...
 
int64_t cast_to_int (char const *c) const
 return (int64_t)*c More...
 
void print (char const *a, FILE *fp=stdout) const
 prints the value More...
 
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
void coo_to_csr (int64_t nz, int nrow, char *csr_vs, int *csr_ja, int *csr_ia, char const *coo_vs, int const *coo_rs, int const *coo_cs) const
 converts coordinate sparse matrix layout to CSR layout More...
 
void csr_to_coo (int64_t nz, int nrow, char const *csr_vs, int const *csr_ja, int const *csr_ia, char *coo_vs, int *coo_rs, int *coo_cs) const
 converts CSR sparse matrix layout to coordinate (COO) layout More...
 
char * pair_alloc (int64_t n) const
 allocate space for n (int64_t,dtype) pairs, necessary for object types More...
 
char * alloc (int64_t n) const
 allocate space for n items, necessary for object types More...
 
void dealloc (char *ptr) const
 deallocate given pointer containing contiguous array of values More...
 
void pair_dealloc (char *ptr) const
 deallocate given pointer containing contiguous array of pairs More...
 
void sort (int64_t n, char *pairs) const
 sorts n sets of pairs using std::sort More...
 
void copy (char *a, char const *b) const
 copies element b to element a More...
 
void copy (char *a, char const *b, int64_t n) const
 copies n elements from array b to array a More...
 
void copy_pair (char *a, char const *b) const
 copies pair b to element a More...
 
void copy_pairs (char *a, char const *b, int64_t n) const
 copies n pair from array b to array a More...
 
void set (char *a, char const *b, int64_t n) const
 sets n elements of array a to value b More...
 
void set_pair (char *a, int64_t key, char const *b) const
 sets 1 elements of pair a to value and key More...
 
void set_pairs (char *a, char const *b, int64_t n) const
 sets n elements of array of pairs a to value b More...
 
void copy (int64_t n, char const *a, int inc_a, char *b, int inc_b) const
 copies n elements TO array b with increment inc_a FROM array a with increment inc_b More...
 
void copy (int64_t m, int64_t n, char const *a, int64_t lda_a, char *b, int64_t lda_b) const
 copies m-by-n submatrix from a with lda_a to b with lda_b More...
 
void init (int64_t n, char *arr) const
 initialize n objects to zero More...
 
virtual void init_shell (int64_t n, char *arr) const
 initialize n objects to zero More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *p, FILE *fp) const
 prints the value More...
 
template<>
void copy (int64_t nn, char const *a, int inc_a, char *b, int inc_b) const
 copies n elements TO array b with increment inc_a FROM array a with increment inc_b More...
 
template<>
void copy (int64_t nn, char const *a, int inc_a, char *b, int inc_b) const
 copies n elements TO array b with increment inc_a FROM array a with increment inc_b More...
 
template<>
void copy (int64_t nn, char const *a, int inc_a, char *b, int inc_b) const
 copies n elements TO array b with increment inc_a FROM array a with increment inc_b More...
 
template<>
void copy (int64_t nn, char const *a, int inc_a, char *b, int inc_b) const
 copies n elements TO array b with increment inc_a FROM array a with increment inc_b More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_double (double d, char *c) const
 c = &d More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
void cast_int (int64_t d, char *c) const
 c = &i More...
 
template<>
double cast_to_double (char const *c) const
 return (double)*c More...
 
template<>
double cast_to_double (char const *c) const
 return (double)*c More...
 
template<>
double cast_to_double (char const *c) const
 return (double)*c More...
 
template<>
double cast_to_double (char const *c) const
 return (double)*c More...
 
template<>
double cast_to_double (char const *c) const
 return (double)*c More...
 
template<>
int64_t cast_to_int (char const *c) const
 return (int64_t)*c More...
 
template<>
int64_t cast_to_int (char const *c) const
 return (int64_t)*c More...
 
template<>
int64_t cast_to_int (char const *c) const
 return (int64_t)*c More...
 
template<>
int64_t cast_to_int (char const *c) const
 return (int64_t)*c More...
 
template<>
int64_t cast_to_int (char const *c) const
 return (int64_t)*c More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
void print (char const *a, FILE *fp) const
 prints the value More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
template<>
bool isequal (char const *a, char const *b) const
 returns true if algstrct elements a and b are equal More...
 
- Public Member Functions inherited from CTF_int::algstrct
 algstrct ()
 default constructor More...
 
 algstrct (int el_size)
 constructor creates algstrct with all parameters More...
 
virtual ~algstrct ()=0
 destructor More...
 
virtual MPI_Op addmop () const
 MPI addition operation for reductions. More...
 
virtual char const * addid () const
 MPI datatype for pairs. More...
 
virtual char const * mulid () const
 identity element for multiplication i.e. 1 More...
 
virtual void addinv (char const *a, char *b) const
 b = -a More...
 
virtual void safeaddinv (char const *a, char *&b) const
 b = -a, with checks for NULL and alloc as necessary More...
 
virtual void add (char const *a, char const *b, char *c) const
 c = a+b More...
 
virtual void accum (char const *a, char *b) const
 b+=a More...
 
virtual bool has_mul () const
 
virtual void mul (char const *a, char const *b, char *c) const
 c = a*b More...
 
virtual void safemul (char const *a, char const *b, char *&c) const
 c = a*b, with NULL treated as mulid More...
 
virtual void scal (int n, char const *alpha, char *X, int incX) const
 X["i"]=alpha*X["i"];. More...
 
virtual void axpy (int n, char const *alpha, char const *X, int incX, char *Y, int incY) const
 Y["i"]+=alpha*X["i"];. More...
 
virtual void gemm (char tA, char tB, int m, int n, int k, char const *alpha, char const *A, char const *B, char const *beta, char *C) const
 beta*C["ij"]=alpha*A^tA["ik"]*B^tB["kj"]; More...
 
virtual void gemm_batch (char tA, char tB, int l, int m, int n, int k, char const *alpha, char const *A, char const *B, char const *beta, char *C) const
 beta*C["ijl"]=alpha*A^tA["ikl"]*B^tB["kjl"]; More...
 
virtual void offload_gemm (char tA, char tB, int m, int n, int k, char const *alpha, char const *A, char const *B, char const *beta, char *C) const
 
virtual bool is_offloadable () const
 
virtual void coomm (int m, int n, int k, char const *alpha, char const *A, int const *rows_A, int const *cols_A, int64_t nnz_A, char const *B, char const *beta, char *C, bivar_function const *func) const
 sparse version of gemm using coordinate format for A More...
 
virtual void csrmm (int m, int n, int k, char const *alpha, char const *A, int const *JA, int const *IA, int64_t nnz_A, char const *B, char const *beta, char *C, bivar_function const *func) const
 sparse version of gemm using CSR format for A More...
 
virtual void csrmultd (int m, int n, int k, char const *alpha, char const *A, int const *JA, int const *IA, int64_t nnz_A, char const *B, int const *JB, int const *IB, int64_t nnz_B, char const *beta, char *C) const
 sparse version of gemm using CSR format for A and B More...
 
virtual void csrmultcsr (int m, int n, int k, char const *alpha, char const *A, int const *JA, int const *IA, int64_t nnz_A, char const *B, int const *JB, int const *IB, int64_t nnz_B, char const *beta, char *&C_CSR) const
 
virtual char * csr_add (char *cA, char *cB) const
 adds CSR matrices A (stored in cA) and B (stored in cB) to create matric C (pointer to all_data returned), C data allocated internally More...
 
virtual char * csr_reduce (char *cA, int root, MPI_Comm cm) const
 reduces CSR matrices stored in cA on each processor in cm and returns result on processor root More...
 
double estimate_csr_red_time (int64_t msg_sz, CommData const *cdt) const
 
void acc (char *b, char const *beta, char const *a, char const *alpha) const
 compute b=beta*b + alpha*a More...
 
void accmul (char *c, char const *a, char const *b, char const *alpha) const
 compute c=c + alpha*a*b More...
 
void safecopy (char *&a, char const *b) const
 copies element b to element a, , with checks for NULL and alloc as necessary More...
 
virtual void copy (int64_t m, int64_t n, char const *a, int64_t lda_a, char const *alpha, char *b, int64_t lda_b, char const *beta) const
 copies m-by-n submatrix from a with lda_a and scaling alpha to b with lda_b and scaling by 1 More...
 

Data Fields

int pair_sz
 
bool is_custom_mdtype
 
MPI_Datatype tmdtype
 
- Data Fields inherited from CTF_int::algstrct
bool has_coo_ker
 whether there was a custom COO CSRMM kernel provided for this algebraic structure More...
 
void(* abs )(char const *a, char *b)
 b = max(a,addinv(a)) More...
 
- Data Fields inherited from CTF_int::accumulatable
int el_size
 size of each element of algstrct in bytes More...
 

Detailed Description

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
class CTF::Set< dtype, is_ord >

Set class defined by a datatype and a min/max function (if it is partially ordered i.e. is_ord=true) currently assumes min and max are given by numeric_limits (custom min/max not allowed)

Definition at line 280 of file set.h.

Constructor & Destructor Documentation

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
CTF::Set< dtype, is_ord >::~Set ( )
inline

Definition at line 285 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
CTF::Set< dtype, is_ord >::Set ( Set< dtype, is_ord > const &  other)
inline
template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
CTF::Set< dtype, is_ord >::Set ( )
inline

Definition at line 326 of file set.h.

Member Function Documentation

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
char* CTF::Set< dtype, is_ord >::alloc ( int64_t  n) const
inlinevirtual

allocate space for n items, necessary for object types

Parameters
[in]nnumber of items
Returns
array containing n items

Reimplemented from CTF_int::algstrct.

Definition at line 415 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 360 of file set.h.

template<>
void CTF::Set< float >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 535 of file set.h.

template<>
void CTF::Set< double >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 540 of file set.h.

template<>
void CTF::Set< long double >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 545 of file set.h.

template<>
void CTF::Set< int >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 550 of file set.h.

template<>
void CTF::Set< uint64_t >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 555 of file set.h.

template<>
void CTF::Set< int64_t >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 560 of file set.h.

template<>
void CTF::Set< std::complex< float >, false >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 565 of file set.h.

template<>
void CTF::Set< std::complex< double >, false >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 570 of file set.h.

template<>
void CTF::Set< std::complex< long double >, false >::cast_double ( double  d,
char *  c 
) const
inlinevirtual

c = &d

Reimplemented from CTF_int::algstrct.

Definition at line 575 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 366 of file set.h.

template<>
void CTF::Set< float >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 580 of file set.h.

template<>
void CTF::Set< double >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 585 of file set.h.

template<>
void CTF::Set< long double >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 590 of file set.h.

template<>
void CTF::Set< int >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 595 of file set.h.

template<>
void CTF::Set< uint64_t >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 600 of file set.h.

template<>
void CTF::Set< int64_t >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 605 of file set.h.

template<>
void CTF::Set< std::complex< float >, false >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 610 of file set.h.

template<>
void CTF::Set< std::complex< double >, false >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 615 of file set.h.

template<>
void CTF::Set< std::complex< long double >, false >::cast_int ( int64_t  i,
char *  c 
) const
inlinevirtual

c = &i

Reimplemented from CTF_int::algstrct.

Definition at line 620 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
double CTF::Set< dtype, is_ord >::cast_to_double ( char const *  c) const
inlinevirtual

return (double)*c

Reimplemented from CTF_int::algstrct.

Definition at line 372 of file set.h.

References IASSERT.

template<>
double CTF::Set< float >::cast_to_double ( char const *  c) const
inlinevirtual

return (double)*c

Reimplemented from CTF_int::algstrct.

Definition at line 625 of file set.h.

template<>
double CTF::Set< double >::cast_to_double ( char const *  c) const
inlinevirtual

return (double)*c

Reimplemented from CTF_int::algstrct.

Definition at line 630 of file set.h.

template<>
double CTF::Set< int >::cast_to_double ( char const *  c) const
inlinevirtual

return (double)*c

Reimplemented from CTF_int::algstrct.

Definition at line 635 of file set.h.

template<>
double CTF::Set< uint64_t >::cast_to_double ( char const *  c) const
inlinevirtual

return (double)*c

Reimplemented from CTF_int::algstrct.

Definition at line 640 of file set.h.

template<>
double CTF::Set< int64_t >::cast_to_double ( char const *  c) const
inlinevirtual

return (double)*c

Reimplemented from CTF_int::algstrct.

Definition at line 645 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
int64_t CTF::Set< dtype, is_ord >::cast_to_int ( char const *  c) const
inlinevirtual

return (int64_t)*c

Reimplemented from CTF_int::algstrct.

Definition at line 379 of file set.h.

template<>
int64_t CTF::Set< int64_t >::cast_to_int ( char const *  c) const
inlinevirtual

return (int64_t)*c

Reimplemented from CTF_int::algstrct.

Definition at line 651 of file set.h.

template<>
int64_t CTF::Set< int >::cast_to_int ( char const *  c) const
inlinevirtual

return (int64_t)*c

Reimplemented from CTF_int::algstrct.

Definition at line 656 of file set.h.

template<>
int64_t CTF::Set< unsigned int >::cast_to_int ( char const *  c) const
inlinevirtual

return (int64_t)*c

Reimplemented from CTF_int::algstrct.

Definition at line 661 of file set.h.

template<>
int64_t CTF::Set< uint64_t >::cast_to_int ( char const *  c) const
inlinevirtual

return (int64_t)*c

Reimplemented from CTF_int::algstrct.

Definition at line 666 of file set.h.

template<>
int64_t CTF::Set< bool >::cast_to_int ( char const *  c) const
inlinevirtual

return (int64_t)*c

Reimplemented from CTF_int::algstrct.

Definition at line 671 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
virtual CTF_int::algstrct* CTF::Set< dtype, is_ord >::clone ( ) const
inlinevirtual

''copy constructor''

Implements CTF_int::algstrct.

Reimplemented in CTF::Semiring< dtype, is_ord >, CTF::Monoid< dtype, is_ord >, CTF::Ring< dtype, is_ord >, and CTF::Group< dtype, is_ord >.

Definition at line 320 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::coo_to_csr ( int64_t  nz,
int  nrow,
char *  csr_vs,
int *  csr_cs,
int *  csr_rs,
char const *  coo_vs,
int const *  coo_rs,
int const *  coo_cs 
) const
inlinevirtual

converts coordinate sparse matrix layout to CSR layout

Reimplemented from CTF_int::algstrct.

Definition at line 402 of file set.h.

References CTF_int::def_coo_to_csr(), and ctf.core::dtype.

template<>
void CTF::Set< float, true >::copy ( int64_t  n,
char const *  a,
int  inc_a,
char *  b,
int  inc_b 
) const
virtual

copies n elements TO array b with increment inc_a FROM array a with increment inc_b

Reimplemented from CTF_int::algstrct.

Definition at line 114 of file set.cxx.

References CTF_BLAS::SCOPY().

template<>
void CTF::Set< double, true >::copy ( int64_t  n,
char const *  a,
int  inc_a,
char *  b,
int  inc_b 
) const
virtual

copies n elements TO array b with increment inc_a FROM array a with increment inc_b

Reimplemented from CTF_int::algstrct.

Definition at line 119 of file set.cxx.

References CTF_BLAS::DCOPY().

template<>
void CTF::Set< std::complex< float >, false >::copy ( int64_t  n,
char const *  a,
int  inc_a,
char *  b,
int  inc_b 
) const
virtual

copies n elements TO array b with increment inc_a FROM array a with increment inc_b

Reimplemented from CTF_int::algstrct.

Definition at line 124 of file set.cxx.

References CTF_BLAS::DCOPY().

template<>
void CTF::Set< std::complex< double >, false >::copy ( int64_t  n,
char const *  a,
int  inc_a,
char *  b,
int  inc_b 
) const
virtual

copies n elements TO array b with increment inc_a FROM array a with increment inc_b

Reimplemented from CTF_int::algstrct.

Definition at line 129 of file set.cxx.

References CTF_BLAS::ZCOPY().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::copy ( char *  a,
char const *  b 
) const
inlinevirtual

copies element b to element a

Reimplemented from CTF_int::algstrct.

Definition at line 433 of file set.h.

References ctf.core::dtype.

Referenced by ctf.core.tensor::astype(), and ctf.core.tensor::real().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::copy ( char *  a,
char const *  b,
int64_t  n 
) const
inlinevirtual

copies n elements from array b to array a

Reimplemented from CTF_int::algstrct.

Definition at line 437 of file set.h.

References ctf.core::copy(), and ctf.core::dtype.

Referenced by ctf.core.tensor::astype(), and ctf.core.tensor::real().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::copy ( int64_t  n,
char const *  a,
int  inc_a,
char *  b,
int  inc_b 
) const
inlinevirtual

copies n elements TO array b with increment inc_a FROM array a with increment inc_b

Reimplemented from CTF_int::algstrct.

Definition at line 469 of file set.h.

References ctf.core::dtype.

Referenced by ctf.core.tensor::astype(), and ctf.core.tensor::real().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::copy ( int64_t  m,
int64_t  n,
char const *  a,
int64_t  lda_a,
char *  b,
int64_t  lda_b 
) const
inlinevirtual

copies m-by-n submatrix from a with lda_a to b with lda_b

Reimplemented from CTF_int::algstrct.

Definition at line 477 of file set.h.

References ctf.core::dtype.

Referenced by ctf.core.tensor::astype(), and ctf.core.tensor::real().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::copy_pair ( char *  a,
char const *  b 
) const
inlinevirtual

copies pair b to element a

Reimplemented from CTF_int::algstrct.

Definition at line 441 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::copy_pairs ( char *  a,
char const *  b,
int64_t  n 
) const
inlinevirtual

copies n pair from array b to array a

Reimplemented from CTF_int::algstrct.

Definition at line 445 of file set.h.

References ctf.core::copy().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::csr_to_coo ( int64_t  nz,
int  nrow,
char const *  csr_vs,
int const *  csr_ja,
int const *  csr_ia,
char *  coo_vs,
int *  coo_rs,
int *  coo_cs 
) const
inlinevirtual

converts CSR sparse matrix layout to coordinate (COO) layout

Reimplemented from CTF_int::algstrct.

Definition at line 406 of file set.h.

References CTF_int::def_csr_to_coo(), and ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::dealloc ( char *  ptr) const
inlinevirtual

deallocate given pointer containing contiguous array of values

Parameters
[in]ptrarray to deallocate

Reimplemented from CTF_int::algstrct.

Definition at line 420 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
char const* CTF::Set< dtype, is_ord >::get_const_value ( char const *  a) const
inlinevirtual

Reimplemented from CTF_int::algstrct.

Definition at line 314 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
int64_t CTF::Set< dtype, is_ord >::get_key ( char const *  a) const
inlinevirtual

gets key from pair

Reimplemented from CTF_int::algstrct.

Definition at line 306 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
char* CTF::Set< dtype, is_ord >::get_value ( char *  a) const
inlinevirtual

gets pair to value from pair

Reimplemented from CTF_int::algstrct.

Definition at line 310 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::init ( int64_t  n,
char *  arr 
) const
inlinevirtual

initialize n objects to zero

Parameters
[in]nnumber of items
[in]arrarray containing n items, to be set to zero

Reimplemented from CTF_int::algstrct.

Definition at line 493 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
virtual void CTF::Set< dtype, is_ord >::init_shell ( int64_t  n,
char *  arr 
) const
inlinevirtual

initialize n objects to zero

Parameters
[in]nnumber of items
[in]arrarray containing n items, to be set to zero

Reimplemented from CTF_int::accumulatable.

Definition at line 501 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
bool CTF::Set< dtype, is_ord >::is_ordered ( ) const
inlinevirtual

Implements CTF_int::algstrct.

Definition at line 324 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
bool CTF::Set< dtype, is_ord >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 393 of file set.h.

template<>
bool CTF::Set< float >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 711 of file set.h.

template<>
bool CTF::Set< double >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 718 of file set.h.

template<>
bool CTF::Set< int >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 725 of file set.h.

template<>
bool CTF::Set< uint64_t >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 732 of file set.h.

template<>
bool CTF::Set< int64_t >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 739 of file set.h.

template<>
bool CTF::Set< long double >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 746 of file set.h.

template<>
bool CTF::Set< std::complex< float >, false >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 753 of file set.h.

template<>
bool CTF::Set< std::complex< double >, false >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 760 of file set.h.

template<>
bool CTF::Set< std::complex< long double >, false >::isequal ( char const *  a,
char const *  b 
) const
inlinevirtual

returns true if algstrct elements a and b are equal

Reimplemented from CTF_int::algstrct.

Definition at line 767 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::max ( char const *  a,
char const *  b,
char *  c 
) const
inlinevirtual

c = max(a,b)

Reimplemented from CTF_int::algstrct.

Definition at line 346 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::max ( char *  c) const
inlinevirtual

c = maximum possible value

Reimplemented from CTF_int::algstrct.

Definition at line 356 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
MPI_Datatype CTF::Set< dtype, is_ord >::mdtype ( ) const
inlinevirtual

MPI datatype.

Reimplemented from CTF_int::algstrct.

Definition at line 336 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::min ( char const *  a,
char const *  b,
char *  c 
) const
inlinevirtual

c = min(a,b)

Reimplemented from CTF_int::algstrct.

Definition at line 340 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::min ( char *  c) const
inlinevirtual

c = minimum possible value

Reimplemented from CTF_int::algstrct.

Definition at line 352 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
char* CTF::Set< dtype, is_ord >::pair_alloc ( int64_t  n) const
inlinevirtual

allocate space for n (int64_t,dtype) pairs, necessary for object types

Parameters
[in]nnumber of pairs
Returns
array containing n pair items

Reimplemented from CTF_int::algstrct.

Definition at line 410 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::pair_dealloc ( char *  ptr) const
inlinevirtual

deallocate given pointer containing contiguous array of pairs

Parameters
[in]ptrarray to deallocate

Reimplemented from CTF_int::algstrct.

Definition at line 424 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
int CTF::Set< dtype, is_ord >::pair_size ( ) const
inlinevirtual

gets pair size el_size plus the key size

Reimplemented from CTF_int::algstrct.

Definition at line 301 of file set.h.

template<>
void CTF::Set< Tensor<>,false >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 14 of file block_sparse.cxx.

References CTF::Set< dtype, is_ord >::print().

template<>
void CTF::Set< mpath >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 17 of file btwn_central.cxx.

References ctf.core::w.

template<>
void CTF::Set< path >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 19 of file apsp.cxx.

References ctf.core::w.

template<>
void CTF::Set< dpair >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 21 of file sparse_mp3.cxx.

References ctf.core::a, and ctf.core::b.

template<>
void CTF::Set< cpath >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 21 of file btwn_central.cxx.

References ctf.core::w.

template<>
void CTF::Set< particle >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 73 of file moldynamics.h.

template<>
void CTF::Set< force >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 77 of file moldynamics.h.

References force::fx, and force::fy.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::print ( char const *  a,
FILE *  fp = stdout 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 386 of file set.h.

Referenced by CTF::Set< dtype, is_ord >::print().

template<>
void CTF::Set< float >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 676 of file set.h.

template<>
void CTF::Set< double >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 681 of file set.h.

template<>
void CTF::Set< int64_t >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 686 of file set.h.

template<>
void CTF::Set< int >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 691 of file set.h.

template<>
void CTF::Set< std::complex< float >, false >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 696 of file set.h.

References ctf.core::imag(), and ctf.core::real().

template<>
void CTF::Set< std::complex< double >, false >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 701 of file set.h.

References ctf.core::imag(), and ctf.core::real().

template<>
void CTF::Set< std::complex< long double >, false >::print ( char const *  a,
FILE *  fp 
) const
inlinevirtual

prints the value

Reimplemented from CTF_int::algstrct.

Definition at line 706 of file set.h.

References ctf.core::imag(), and ctf.core::real().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::set ( char *  a,
char const *  b,
int64_t  n 
) const
inlinevirtual

sets n elements of array a to value b

Reimplemented from CTF_int::algstrct.

Definition at line 457 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::set_abs_to_default ( )
inline

Definition at line 332 of file set.h.

References ctf.core::abs().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::set_pair ( char *  a,
int64_t  key,
char const *  vb 
) const
inlinevirtual

sets 1 elements of pair a to value and key

Reimplemented from CTF_int::algstrct.

Definition at line 461 of file set.h.

References ctf.core::dtype.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::set_pairs ( char *  a,
char const *  b,
int64_t  n 
) const
inlinevirtual

sets n elements of array of pairs a to value b

Reimplemented from CTF_int::algstrct.

Definition at line 465 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
void CTF::Set< dtype, is_ord >::sort ( int64_t  n,
char *  pairs 
) const
inlinevirtual

sorts n sets of pairs using std::sort

Reimplemented from CTF_int::algstrct.

Definition at line 429 of file set.h.

Field Documentation

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
bool CTF::Set< dtype, is_ord >::is_custom_mdtype

Definition at line 283 of file set.h.

Referenced by CTF::Set< dtype, is_ord >::Set().

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
int CTF::Set< dtype, is_ord >::pair_sz

Definition at line 282 of file set.h.

template<typename dtype = double, bool is_ord = CTF_int::get_default_is_ord<dtype>()>
MPI_Datatype CTF::Set< dtype, is_ord >::tmdtype

Definition at line 284 of file set.h.

Referenced by CTF::Set< dtype, is_ord >::Set().


The documentation for this class was generated from the following file: