Hi everybody,
I want to profile my program on TMS320C6713 and I found some
instructions in "spru198g.pdf" , page 41-42.
1) In section 2.3.1.1 , they talk about the command :
load6x g example.out
How can I input
this command ?
Do I have to change some configuration in
my project ?
2) In section 2.3.1.2 , the talk about "clock()"
but when I used it , the number of clocks is always 0.
-----------------Here is my code--
#include <stdio.h>
#include
<time.h>
/* need time.h in order to call clock()*/
void computing()
{
time_t t0, t1;
clock_t c0
, c1;
long count;
double a, b, c;
t0 = time(NULL);
c0 = clock();
for
(count = 1l; count < 10000000l; count++)
{
a
= sqrt(count);
b = 1.0/a;
c = b - a;
}
t1 = time(NULL);
c1 = clock();
printf("\n%d clocks per second\n" , (int)CLOCKS_PER_SEC);
printf("\n The number of clocks : %d\n" , (int)c1 -
(int)c0);
printf("\n Time to
perform : %f\n" , (float)((int)c1 -
(int)c0 / CLOCKS_PER_SEC));
}
void main()
{
computing();
}
----------------- Here is the output---------------------------------
200000000 clocks per second
The number of clocks : 0
Time to perform : 0.000000
------
Did
I call "clock()" in a wrong way ?
Thank you,
Quan