Skip to content
Snippets Groups Projects
Commit f86d73ce authored by Nayoung Kim's avatar Nayoung Kim
Browse files

project

parent fbf11a34
No related branches found
No related tags found
No related merge requests found
#include "fx_s17_14.h"
#include <stdio.h>
int main()
{
double a = 21.468, b = 17.297;
int mul1, mul2, mul3, mul4;
mul1 = fxMul_float(fromDouble(a), fromDouble(b));
mul2 = fxMul_precision(fromDouble(a), fromDouble(b));
mul3 = fxMul_fair(fromDouble(a), fromDouble(b));
mul4 = fxMul_performance(fromDouble(a), fromDouble(b));
fprintf(stdout, "================================================================================================= \n");
fprintf(stdout, "value : %.15f fxMul_float : %.15f diff : %.15f \n", 21.468 * 17.297, toDouble(mul1), (21.468 * 17.297) - toDouble(mul1));
fprintf(stdout, "value : %.15f fxMul_precision : %.15f diff : %.15f \n", 21.468 * 17.297, toDouble(mul2), (21.468 * 17.297) - toDouble(mul2));
fprintf(stdout, "value : %.15f fxMul_fair : %.15f diff : %.15f \n", 21.468 * 17.297, toDouble(mul3), (21.468 * 17.297) - toDouble(mul3));
fprintf(stdout, "value : %.15f fxMul_performance : %.15f diff : %.15f \n", 21.468 * 17.297, toDouble(mul4), (21.468 * 17.297) - toDouble(mul4));
fprintf(stdout, "================================================================================================= \n");
return 0;
}
#pragma once
// Fixed with signed long long
#define FX_S28_35 ((1<<16) | (28<<8) | (35))
#define FX_S29_34 ((1<<16) | (29<<8) | (34))
#define FX_S30_33 ((1<<16) | (30<<8) | (33))
#define FX_S31_32 ((1<<16) | (31<<8) | (32))
#define FX_S32_31 ((1<<16) | (32<<8) | (31))
#define FX_S33_30 ((1<<16) | (33<<8) | (30))
#define FX_S34_29 ((1<<16) | (34<<8) | (29))
#define FX_S35_28 ((1<<16) | (35<<8) | (28))
// Fixed with unsigned long long
#define FX_U29_35 ((0<<16) | (29<<8) | (35))
#define FX_U30_34 ((0<<16) | (30<<8) | (34))
#define FX_U31_33 ((0<<16) | (31<<8) | (33))
#define FX_U32_32 ((0<<16) | (32<<8) | (32))
#define FX_U33_31 ((0<<16) | (33<<8) | (31))
#define FX_U34_30 ((0<<16) | (34<<8) | (30))
#define FX_U35_29 ((0<<16) | (35<<8) | (29))
#define FX_U36_28 ((0<<16) | (36<<8) | (28))
// Fixed with signed int
#define FX_S12_19 ((1<<16) | (12<<8) | (19))
#define FX_S13_18 ((1<<16) | (13<<8) | (18))
#define FX_S14_17 ((1<<16) | (14<<8) | (17))
#define FX_S15_16 ((1<<16) | (15<<8) | (16))
#define FX_S16_15 ((1<<16) | (16<<8) | (15))
#define FX_S17_14 ((1<<16) | (17<<8) | (14))
#define FX_S18_13 ((1<<16) | (18<<8) | (13))
#define FX_S19_12 ((1<<16) | (19<<8) | (12))
// Fixed with unsigned int
#define FX_S13_19 ((0<<16) | (13<<8) | (19))
#define FX_S14_18 ((0<<16) | (14<<8) | (18))
#define FX_S15_17 ((0<<16) | (15<<8) | (17))
#define FX_S16_16 ((0<<16) | (16<<8) | (16))
#define FX_S17_15 ((0<<16) | (17<<8) | (15))
#define FX_S18_14 ((0<<16) | (18<<8) | (14))
#define FX_S19_13 ((0<<16) | (19<<8) | (13))
#define FX_S20_12 ((0<<16) | (20<<8) | (12))
// Fixed with signed short
#define FX_S04_11 ((1<<16) | (4<<8) | (11))
#define FX_S05_10 ((1<<16) | (5<<8) | (10))
#define FX_S06_09 ((1<<16) | (6<<8) | (9))
#define FX_S07_08 ((1<<16) | (7<<8) | (8))
#define FX_S08_07 ((1<<16) | (8<<8) | (7))
#define FX_S09_06 ((1<<16) | (9<<8) | (6))
#define FX_S10_05 ((1<<16) | (10<<8) | (5))
#define FX_S11_04 ((1<<16) | (11<<8) | (4))
// Fixed with unsigned short
#define FX_S05_11 ((0<<16) | (5<<8) | (11))
#define FX_S06_10 ((0<<16) | (6<<8) | (10))
#define FX_S07_09 ((0<<16) | (7<<8) | (9))
#define FX_S08_08 ((0<<16) | (8<<8) | (8))
#define FX_S09_07 ((0<<16) | (9<<8) | (7))
#define FX_S10_06 ((0<<16) | (10<<8) | (6))
#define FX_S11_05 ((0<<16) | (11<<8) | (5))
#define FX_S12_04 ((0<<16) | (12<<8) | (4))
// Fixed with signed char
#define FX_S00_07 ((1<<16) | (0<<8) | (7))
#define FX_S01_06 ((1<<16) | (1<<8) | (6))
#define FX_S02_05 ((1<<16) | (2<<8) | (5))
#define FX_S03_04 ((1<<16) | (3<<8) | (4))
#define FX_S04_03 ((1<<16) | (4<<8) | (3))
#define FX_S05_02 ((1<<16) | (5<<8) | (2))
#define FX_S06_01 ((1<<16) | (6<<8) | (1))
// #define FX_S07_00 ((1<<16) | (7<<8) | (0)) // It is same as unsigned char
// Fixed with unsigned char
#define FX_S00_08 ((0<<16) | (0<<8) | (8))
#define FX_S01_07 ((0<<16) | (1<<8) | (7))
#define FX_S02_06 ((0<<16) | (2<<8) | (6))
#define FX_S03_05 ((0<<16) | (3<<8) | (5))
#define FX_S04_04 ((0<<16) | (4<<8) | (4))
#define FX_S05_03 ((0<<16) | (5<<8) | (3))
#define FX_S06_02 ((0<<16) | (6<<8) | (2))
#define FX_S07_01 ((0<<16) | (7<<8) | (1))
// Operation Preference
#define FX_OP_FLOAT 1
#define FX_OP_PRECISION 2
#define FX_OP_FAIR 3
#define FX_OP_PERFORMANCE 4
#include "fx_head.h"
#include "fx_s17_14.h"
#define fxADD(a,b) ((a)+(b))
#define fxSUB(a,b) ((a)-(b))
#define FX_Q_NUM_H (FX_Q_NUM/2)
#define FX_Q_NUM_HA (FX_Q_NUM_H-FX_Q_NUM_H/2)
#define FX_Q_NUM_HB (FX_Q_NUM_H/2)
/*
extern fixed fxAdd_float(), fxAdd_precision(), fxAdd_fair(), fxAdd_performance();
extern fixed fxSub_float(), fxSub_precision(), fxSub_fair(), fxSub_performance();
extern fixed fxMul_float(), fxMul_precision(), fxMul_fair(), fxMul_performance();
extern fixed fxDiv_float(), fxDiv_precision(), fxDiv_fair(), fxDiv_performance();
*/
// float function
fixed fxAdd_float(fixed a, fixed b)
{
return fromDouble(toDouble(a) + toDouble(b));
}
fixed fxSub_float(fixed a, fixed b)
{
return fromDouble(toDouble(a) - toDouble(b));
}
fixed fxMul_float(fixed a, fixed b)
{
return fromDouble(toDouble(a) * toDouble(b));
}
fixed fxDiv_float(fixed a, fixed b)
{
return fromDouble(toDouble(a) / toDouble(b));
}
// precision function
fixed fxAdd_precision(fixed a, fixed b)
{
return fromFloat(toFloat(a) + toFloat(b));
}
fixed fxSub_precision(fixed a, fixed b)
{
return fromFloat(toFloat(a) - toFloat(b));
}
fixed fxMul_precision(fixed a, fixed b)
{
long long la = a, lb = b;
return (la * lb) >> FX_Q_NUM;
}
fixed fxDiv_precision(fixed a, fixed b)
{
long long la = a, lb = b;
return (la << FX_Q_NUM) / lb;
}
// fair function
fixed fxAdd_fair(fixed a, fixed b)
{
return fxADD(a,b);
}
fixed fxSub_fair(fixed a, fixed b)
{
return fxSUB(a,b);
}
fixed fxMul_fair(fixed a, fixed b)
{
long long la = a, lb = b;
return ((la >> FX_Q_NUM_HA) * (lb >> FX_Q_NUM_HB)) >> FX_Q_NUM_H;
}
fixed fxDiv_fair(fixed a, fixed b)
{
long long la = a, lb = b;
return ((la << FX_Q_NUM_H) / lb) << FX_Q_NUM_H;
}
// performance function
fixed fxAdd_performance(fixed a, fixed b)
{
return fxADD(a,b);
}
fixed fxSub_performance(fixed a, fixed b)
{
return fxSUB(a,b);
}
fixed fxMul_performance(fixed a, fixed b)
{
long long la = a, lb = b;
return (la>>FX_Q_NUM_H)*(lb>>FX_Q_NUM_H);
}
fixed fxDiv_performance(fixed a, fixed b)
{
long long la = a, lb = b;
return ((la << FX_Q_NUM_H) / (lb >> FX_Q_NUM_H));
}
#include "fx_head.h"
#include <math.h>
#define FX_POINT FX_S17_14
#define FX_Q_NUM (FX_POINT & 0xFF) // 14
// If you want calculate with high precision set 64
#define FX_SYSTEM_INTEGER 64 // 32 or 64
#define FX_SYSTEM_FLOAT 64 // 32 or 64
#define FX_DATA_TYPE signed int
typedef int fx_s17_14;
typedef fx_s17_14 fixed;
#define fromDouble(d) ((fixed)((d)*DOUBLE_Q_VALUE))
#define toDouble(d) ((double)(d)*DOUBLE_1_Q_VALUE)
#define fromFloat(d) ((fixed)((d)*FLOAT_Q_VALUE))
#define toFloat(d) ((float)(d)*FLOAT_1_Q_VALUE)
// CONSTANTS
#define FLOAT_Q_VALUE (float)(1<<FX_Q_NUM)
#define DOUBLE_Q_VALUE (double)(1<<FX_Q_NUM)
#define FLOAT_1_Q_VALUE (float)(1.0f/FLOAT_Q_VALUE)
#define DOUBLE_1_Q_VALUE (double)(1.0f/DOUBLE_Q_VALUE)
#define FX_PI fromDOUBLE(M_PI)
// One of FX_OP_FLOAT, FX_OP_PRECISION, FX_OP_FAIR, FX_OP_PERFORMANCE
#define FX_OP_PREFERENCE FX_OP_FLOAT
extern fixed fxAdd_float(), fxAdd_precision(), fxAdd_fair(), fxAdd_performance();
extern fixed fxSub_float(), fxSub_precision(), fxSub_fair(), fxSub_performance();
extern fixed fxMul_float(), fxMul_precision(), fxMul_fair(), fxMul_performance();
extern fixed fxDiv_float(), fxDiv_precision(), fxDiv_fair(), fxDiv_performance();
#include "fx_s17_14.h"
#include <stdio.h>
int main()
{
double i;
int div1, div2, div3, div4;
for ( i = -362; i < -0.000001; i+=0.0001)
{
div1 = fxDiv_float(fromDouble(i), fromDouble(i));
div2 = fxDiv_precision(fromDouble(i), fromDouble(i));
div3 = fxDiv_fair(fromDouble(i), fromDouble(i));
div4 = fxDiv_performance(fromDouble(i), fromDouble(i));
fprintf(stdout, "%f / %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(div1));
fprintf(stdout, "%f / %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(div2));
fprintf(stdout, "%f / %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(div3));
fprintf(stdout, "%f / %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(div4));
fprintf(stdout, "=============================== \n");
}
return 0;
}
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
77.06 0.50 0.50 main
9.25 0.56 0.06 3620000 16.60 16.60 fxDiv_float
6.16 0.60 0.04 3620000 11.07 11.07 fxDiv_fair
4.62 0.63 0.03 3620000 8.30 8.30 fxDiv_performance
3.08 0.65 0.02 3620000 5.53 5.53 fxDiv_precision
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 1.54% of 0.65 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.50 0.15 main [1]
0.06 0.00 3620000/3620000 fxDiv_float [2]
0.04 0.00 3620000/3620000 fxDiv_fair [3]
0.03 0.00 3620000/3620000 fxDiv_performance [4]
0.02 0.00 3620000/3620000 fxDiv_precision [5]
-----------------------------------------------
0.06 0.00 3620000/3620000 main [1]
[2] 9.2 0.06 0.00 3620000 fxDiv_float [2]
-----------------------------------------------
0.04 0.00 3620000/3620000 main [1]
[3] 6.2 0.04 0.00 3620000 fxDiv_fair [3]
-----------------------------------------------
0.03 0.00 3620000/3620000 main [1]
[4] 4.6 0.03 0.00 3620000 fxDiv_performance [4]
-----------------------------------------------
0.02 0.00 3620000/3620000 main [1]
[5] 3.1 0.02 0.00 3620000 fxDiv_precision [5]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Index by function name
[3] fxDiv_fair [4] fxDiv_performance [1] main
[2] fxDiv_float [5] fxDiv_precision
#include "fx_s17_14.h"
#include <stdio.h>
int main()
{
double i;
int mul1, mul2, mul3, mul4;
for ( i = -362; i < 362; i+=0.001)
{
mul1 = fxMul_float(fromDouble(i), fromDouble(i));
mul2 = fxMul_precision(fromDouble(i), fromDouble(i));
mul3 = fxMul_fair(fromDouble(i), fromDouble(i));
mul4 = fxMul_performance(fromDouble(i), fromDouble(i));
fprintf(stdout, "%f * %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(mul1));
fprintf(stdout, "%f * %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(mul2));
fprintf(stdout, "%f * %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(mul3));
fprintf(stdout, "%f * %f = %.15f \n", fromDouble(i), fromDouble(i), toDouble(mul4));
fprintf(stdout, "=============================== \n");
}
return 0;
}
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
87.66 0.07 0.07 main
12.52 0.08 0.01 724001 13.84 13.84 fxMul_float
0.00 0.08 0.00 724001 0.00 0.00 fxMul_fair
0.00 0.08 0.00 724001 0.00 0.00 fxMul_performance
0.00 0.08 0.00 724001 0.00 0.00 fxMul_precision
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 12.48% of 0.08 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.07 0.01 main [1]
0.01 0.00 724001/724001 fxMul_float [2]
0.00 0.00 724001/724001 fxMul_precision [5]
0.00 0.00 724001/724001 fxMul_fair [3]
0.00 0.00 724001/724001 fxMul_performance [4]
-----------------------------------------------
0.01 0.00 724001/724001 main [1]
[2] 12.5 0.01 0.00 724001 fxMul_float [2]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[3] 0.0 0.00 0.00 724001 fxMul_fair [3]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[4] 0.0 0.00 0.00 724001 fxMul_performance [4]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[5] 0.0 0.00 0.00 724001 fxMul_precision [5]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Index by function name
[3] fxMul_fair [4] fxMul_performance [1] main
[2] fxMul_float [5] fxMul_precision
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
72.32 0.78 0.78 main
12.98 0.92 0.14 __divdi3
9.73 1.03 0.11 3620000 29.04 29.04 fxDiv_float
1.85 1.05 0.02 3620000 5.53 5.53 fxDiv_precision
1.85 1.07 0.02 __x86.get_pc_thunk.bx
0.93 1.08 0.01 3620000 2.77 2.77 fxDiv_fair
0.46 1.08 0.01 fxMul_float
0.00 1.08 0.00 3620000 0.00 0.00 fxDiv_performance
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 0.92% of 1.08 seconds
index % time self children called name
<spontaneous>
[1] 84.7 0.78 0.14 main [1]
0.11 0.00 3620000/3620000 fxDiv_float [3]
0.02 0.00 3620000/3620000 fxDiv_precision [4]
0.01 0.00 3620000/3620000 fxDiv_fair [6]
0.00 0.00 3620000/3620000 fxDiv_performance [8]
-----------------------------------------------
<spontaneous>
[2] 13.0 0.14 0.00 __divdi3 [2]
-----------------------------------------------
0.11 0.00 3620000/3620000 main [1]
[3] 9.7 0.11 0.00 3620000 fxDiv_float [3]
-----------------------------------------------
0.02 0.00 3620000/3620000 main [1]
[4] 1.9 0.02 0.00 3620000 fxDiv_precision [4]
-----------------------------------------------
<spontaneous>
[5] 1.9 0.02 0.00 __x86.get_pc_thunk.bx [5]
-----------------------------------------------
0.01 0.00 3620000/3620000 main [1]
[6] 0.9 0.01 0.00 3620000 fxDiv_fair [6]
-----------------------------------------------
<spontaneous>
[7] 0.5 0.01 0.00 fxMul_float [7]
-----------------------------------------------
0.00 0.00 3620000/3620000 main [1]
[8] 0.0 0.00 0.00 3620000 fxDiv_performance [8]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Index by function name
[2] __divdi3 [3] fxDiv_float [7] fxMul_float
[5] __x86.get_pc_thunk.bx [8] fxDiv_performance [1] main
[6] fxDiv_fair [4] fxDiv_precision
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
74.05 0.34 0.34 main
10.89 0.39 0.05 3620000 13.84 13.84 fxDiv_float
6.53 0.42 0.03 3620000 8.30 8.30 fxDiv_performance
6.53 0.45 0.03 3620000 8.30 8.30 fxDiv_fair
2.18 0.46 0.01 3620000 2.77 2.77 fxDiv_precision
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 2.17% of 0.46 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.34 0.12 main [1]
0.05 0.00 3620000/3620000 fxDiv_float [2]
0.03 0.00 3620000/3620000 fxDiv_performance [3]
0.03 0.00 3620000/3620000 fxDiv_fair [4]
0.01 0.00 3620000/3620000 fxDiv_precision [5]
-----------------------------------------------
0.05 0.00 3620000/3620000 main [1]
[2] 10.9 0.05 0.00 3620000 fxDiv_float [2]
-----------------------------------------------
0.03 0.00 3620000/3620000 main [1]
[3] 6.5 0.03 0.00 3620000 fxDiv_performance [3]
-----------------------------------------------
0.03 0.00 3620000/3620000 main [1]
[4] 6.5 0.03 0.00 3620000 fxDiv_fair [4]
-----------------------------------------------
0.01 0.00 3620000/3620000 main [1]
[5] 2.2 0.01 0.00 3620000 fxDiv_precision [5]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Index by function name
[4] fxDiv_fair [3] fxDiv_performance [1] main
[2] fxDiv_float [5] fxDiv_precision
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
87.61 0.21 0.21 main
8.34 0.23 0.02 724001 27.66 27.66 fxMul_float
4.17 0.24 0.01 724001 13.83 13.83 fxMul_performance
0.00 0.24 0.00 724001 0.00 0.00 fxMul_fair
0.00 0.24 0.00 724001 0.00 0.00 fxMul_precision
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 4.16% of 0.24 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.21 0.03 main [1]
0.02 0.00 724001/724001 fxMul_float [2]
0.01 0.00 724001/724001 fxMul_performance [3]
0.00 0.00 724001/724001 fxMul_precision [5]
0.00 0.00 724001/724001 fxMul_fair [4]
-----------------------------------------------
0.02 0.00 724001/724001 main [1]
[2] 8.3 0.02 0.00 724001 fxMul_float [2]
-----------------------------------------------
0.01 0.00 724001/724001 main [1]
[3] 4.2 0.01 0.00 724001 fxMul_performance [3]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[4] 0.0 0.00 0.00 724001 fxMul_fair [4]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[5] 0.0 0.00 0.00 724001 fxMul_precision [5]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Index by function name
[4] fxMul_fair [3] fxMul_performance [1] main
[2] fxMul_float [5] fxMul_precision
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ns/call ns/call name
90.17 0.09 0.09 main
10.02 0.10 0.01 724001 13.84 13.84 fxMul_float
0.00 0.10 0.00 724001 0.00 0.00 fxMul_fair
0.00 0.10 0.00 724001 0.00 0.00 fxMul_performance
0.00 0.10 0.00 724001 0.00 0.00 fxMul_precision
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Call graph (explanation follows)
granularity: each sample hit covers 2 byte(s) for 9.98% of 0.10 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.09 0.01 main [1]
0.01 0.00 724001/724001 fxMul_float [2]
0.00 0.00 724001/724001 fxMul_precision [5]
0.00 0.00 724001/724001 fxMul_fair [3]
0.00 0.00 724001/724001 fxMul_performance [4]
-----------------------------------------------
0.01 0.00 724001/724001 main [1]
[2] 10.0 0.01 0.00 724001 fxMul_float [2]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[3] 0.0 0.00 0.00 724001 fxMul_fair [3]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[4] 0.0 0.00 0.00 724001 fxMul_performance [4]
-----------------------------------------------
0.00 0.00 724001/724001 main [1]
[5] 0.0 0.00 0.00 724001 fxMul_precision [5]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function is in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Index by function name
[3] fxMul_fair [4] fxMul_performance [1] main
[2] fxMul_float [5] fxMul_precision
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment