TAU_MAPPING_OBJECT(3) TAU Mapping API TAU_MAPPING_OBJECT(3)NAME
TAU_MAPPING_OBJECT - Declares a mapping object
SYNOPSIS
C/C++:
TAU_MAPPING_OBJECT(FunctionInfo FuncIdVar);
DESCRIPTION
To create storage for an identifier associated with a higher level statement that is mapped using TAU_MAPPING, we use the
TAU_MAPPING_OBJECT macro. For example, in the TAU_MAPPING example, the array expressions are created into objects of a class
ExpressionKernel, and each statement is an object that is an instance of this class. To embed the identity of the statement we store the
mapping object in a data field in this class. This is shown below:
EXAMPLE
C/C++ :
template<class LHS,class Op,class RHS,class EvalTag>
class ExpressionKernel : public Pooma::Iterate_t {
public:
typedef ExpressionKernel<LHS,Op,RHS,EvalTag> This_t;
//
// Construct from an Expr.
// Build the kernel that will evaluate the expression on the
// given domain.
// Acquire locks on the data referred to by the expression.
//
ExpressionKernel(const LHS&,const Op&,const RHS&,
Pooma::Scheduler_t&);
virtual ~ExpressionKernel();
// Do the loop.
virtual void run();
private:
// The expression we will evaluate.
LHS lhs_m;
Op op_m;
RHS rhs_m;
TAU_MAPPING_OBJECT(TauMapFI)
};
SEE ALSO TAU_MAPPING_CREATE(3), TAU_MAPPING_LINK(3), TAU_MAPPING_PROFILE(3)
08/31/2005 TAU_MAPPING_OBJECT(3)
Check Out this Related Man Page
TAU_MAPPING_LINK(3) TAU Mapping API TAU_MAPPING_LINK(3)NAME
TAU_MAPPING_LINK - Creates a mapping link
SYNOPSIS
C/C++:
TAU_MAPPING_LINK(FunctionInfo FuncIdVar, unsigned long Key);
DESCRIPTION
TAU_MAPPING_LINKcreates a link between the object defined in TAU_MAPPING_OBJECT (that identifies a statement) and the actual higher-level
statement that is mapped with TAU_MAPPING. The Key argument represents a profile group to which the statement belongs, as specified in the
TAU_MAPPING macro argument. For the example of array statements, this link should be created in the constructor of the class that
represents the expression. TAU_MAPPING_LINK should be executed before any measurement takes place. It assigns the identifier of the
statement to the object to which FuncIdVar refers. For example
EXAMPLE
C/C++ :
class MyClass {
public:
MyClass() { }
~MyClass() { }
void Run(void) {
TAU_MAPPING_OBJECT(runtimer)
TAU_MAPPING_LINK(runtimer, (unsigned long) this);
TAU_MAPPING_PROFILE(runtimer); // For one object
TAU_PROFILE("MyClass::Run()", " void (void)", TAU_USER1);
/* ... */
}
};
int main(int argc, char **argv) {
TAU_PROFILE_INIT(argc, argv);
TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT);
MyClass x, y, z;
MyClass a;
TAU_MAPPING_CREATE("MyClass::Run() for object a", " " ,
(TauGroup_t) &a, "TAU_USER", 0);
TAU_MAPPING_CREATE("MyClass::Run() for object x", " " ,
(TauGroup_t) &x, "TAU_USER", 0);
TAU_PROFILE_SET_NODE(0);
cout <<"Inside main"<<endl;
a.Run();
x.Run();
y.Run();
SEE ALSO TAU_MAPPING_CREATE(3), TAU_MAPPING_OBJECT(3), TAU_MAPPING_PROFILE(3)
08/31/2005 TAU_MAPPING_LINK(3)
1. The problem statement, all variables and given/known data:
I have a retake assignment to complete for my computer networks and OS class. This isn't really my area, had I known last year I could have swapped it for a different module I would have done so. I'm determined to get through it... (6 Replies)
for shell operators like <, >, <<, and >> do the LHS always have to be a process or device and the RHS a file or device?
Is it possible for the RHS to be a process? (1 Reply)
Good afternoon,
I am tearing hair out over this. It should be so simple. I have an if statement to evaluate whether or not replication is working. I am testing variables from mysql to see if they are both "Yes". I have put some echo statements in to see how far the code proceeds. It always... (6 Replies)
I have the two class definition as follows.
class A { public: int a; };
class B : virtual public A{ };
The size of class A is shown as 4, and size of class B is shown as 16. Why is this effect ?. (2 Replies)
I am trying to write a simple function to select values from a database and assign them to variables. It can have any number of arguments sent into it, and I want to assign the value retrieved to a different variable name for each argument sent in. So my code looks something like this:
... (6 Replies)