TAU_GET_EVENT_VALS(3) TAU Instrumentation API TAU_GET_EVENT_VALS(3)NAME
TAU_GET_EVENT_VALS - Gets user event data for given user events.
SYNOPSIS
C/C++:
TAU_GET_EVENT_VALS(const char **inUserEvents, int numUserEvents, int **numEvents, double **max, double **min, double **mean,
double **sumSqe);
DESCRIPTION
Retrieves user defined event data for the specified user defined events. The list of events are specified by the first parameter
(eventList) and the user specifies the number of events in the second parameter (numUserEvents). TAU returns the number of times the event
was invoked in the numUserEvents. The max, min, mean values are returned in the following parameters. TAU computes the sum of squares of
the given event and returns this value in the next argument (sumSqe).
EXAMPLE
C/C++ :
const char **eventList;
int numEvents;
TAU_GET_EVENT_NAMES(eventList, numEvents);
cout << "numEvents: " << numEvents << endl;
if (numEvents > 0) {
int *numSamples;
double *max;
double *min;
double *mean;
double *sumSqr;
TAU_GET_EVENT_VALS(eventList, numEvents, numSamples,
max, min, mean, sumSqr);
for (int i=0; i<numEvents; i++) {
cout << "-------------------
";
cout << "User Event: " << eventList[i] << endl;
cout << "Number of Samples: " << numSamples[i] << endl;
cout << "Maximum Value: " << max[i] << endl;
cout << "Minimum Value: " << min[i] << endl;
cout << "Mean Value: " << mean[i] << endl;
cout << "Sum Squared: " << sumSqr[i] << endl;
}
}
}
SEE ALSO TAU_REGISTER_EVENT(3), TAU_REGISTER_CONTEXT_EVENT(3), TAU_GET_EVENT_NAMES(3)
08/31/2005 TAU_GET_EVENT_VALS(3)
Check Out this Related Man Page
TAU_MAPPING_CREATE(3) TAU Mapping API TAU_MAPPING_CREATE(3)NAME
TAU_MAPPING_CREATE - Creates a mapping
SYNOPSIS
C/C++:
TAU_MAPPING_CREATE(char *name, char *type, char *groupname, unsigned long key, int tid);
DESCRIPTION
TAU_MAPPING_CREATE creates a mapping and associates it with the key that is specified. Later, this key may be used to retrieve the
FunctionInfo object associated with this key for timing purposes. The thread identifier is specified in the tid parameter.
EXAMPLE
C/C++ :
class MyClass {
public:
MyClass() {
TAU_MAPPING_LINK(runtimer, TAU_USER);
}
~MyClass() {}
void Run(void) {
TAU_MAPPING_PROFILE(runtimer); // For one object
TAU_PROFILE("MyClass::Run()", " void (void)", TAU_USER1);
cout <<"Sleeping for 2 secs..."<<endl;
sleep(2);
}
private:
TAU_MAPPING_OBJECT(runtimer) // EMBEDDED ASSOCIATION
};
int main(int argc, char **argv) {
TAU_PROFILE_INIT(argc, argv);
TAU_PROFILE("main()", "int (int, char **)", TAU_DEFAULT);
MyClass x, y, z;
TAU_MAPPING_CREATE("MyClass::Run() for object a", " " , TAU_USER,
"TAU_USER", 0);
MyClass a;
TAU_PROFILE_SET_NODE(0);
cout <<"Inside main"<<endl;
a.Run();
x.Run();
y.Run();
}
SEE ALSO TAU_MAPPING_LINK(3), TAU_MAPPING_OBJECT(3), TAU_MAPPING_PROFILE(3)
08/31/2005 TAU_MAPPING_CREATE(3)
Ok, here's the situation....I have this code...
#include <iostream.h>
#include <stdlib.h>
int main()
{
cout << "\nBlah, and Blah\n\n";
system("PAUSE");
return 0;
}
Now, "system("PAUSE")" gets executed before "cout" does, and I have... (2 Replies)
void main()
{
int a={1,2,3,4,5,6,7,8,9,10};
int *p=a;
int *q=&a;
cout<<q-p+1<<endl;
}
The output is 10, how?
if we give cout<<q it will print the address, value won't print....
if we give cout<<p it will print the address, value won't print....
p has the base addr; q... (1 Reply)
Hey my friend was asking me if i knew a way to cout how many different words in a file. I told him no not off hand, but i was thinking about it, and i started to wonder also. I imagine this is probably pretty simple im just missing something, I keep confusing my self with how you would compair and... (16 Replies)
Hi,
char *s="yamaha";
cout<<s<<endl;
int *p;
int i=10;
p=&i;
cout<<p<<endl;
1) For the 1st "cout" we will get "yamaha" as output. That is we are getting "content of the address" for cout<<s.
2) But for integer "cout<<p" we are getting the "address only".
Please clarify how we are... (2 Replies)
Hi,
Should be too simple...
I wrote a sample c++ program like
#include <iostream.h>
int main()
{$
int ab=455;
cout << ab << endl;
return 1;
}
I am getting error like
$ gcc u1.cpp
Undefined first referenced
... (9 Replies)
Hi, I have recently started using C++. I use g++ on Unix. I could not get a simple C++ program working.
The program is;
#include <iostream>
using namespace std;
int main()
{
double a, b;
cout << "enter your number";
cin >> a;
b = a + 1.15;
... (4 Replies)
Hi all,
I implemented a C++ program and successfully compiled and ran on my laptop. However when I copy my code to another machine (school's sun machine), it didn't run properly. I can compile and run, but cout does not print everything. I used cout in a loop where it iterates no more than 20... (5 Replies)
Hi I am running Ubuntu 9.10 and I use QtCreator for my C++ Programms.
I knwo that in wondows OS cout is located in iostream.h library.
It seems that it isn;t the same library in Qtcrator... :(
Anyway, iostream.h doesn't exist and iostream (without the .h) exists but doesn't seem to include the... (4 Replies)
Hello,
Compilation of the line "cout = outFile" throws error
"Error: std::ios_base::operator=(const std::ios_base&) is not accessible from std::ios ::operator=(const std::ios &)."
outFile is declared as "static ofstream".
Thanks,
Shafi (3 Replies)
Hi,
I have a file with more than 1 million records.. Each row has a distance number.. I want to know how many times is each number occurring from min to max number..
2
5
120
208
7
28
45
6
33
120
7
208
so onn..
output
0-0 (4 Replies)
Heyas
Me trying some C.. cout in specific, thats what i remembered:
#include <stdio.h>
// -- Just the above or with all the below ones, no change
#include <stdio_ext.h>
#include <stdlib.h>
#include <wchar.h>
//#include <iostream> // I assume its the same anyway?
//#include <iostream.h>... (2 Replies)