c - Based on the function's CPE, how is the lower bound calculated? -


i have come across way of computing lower bound on cpe (determined critical path) data type float. however, not sure numbers have come , need clarification before attempt compute similar bounds.

this have come accross: (4+3)/3 = 2.33

i assume divided 3 because of cpe value, confused (4+3) comes from.

this function has cpe of 3.00 integer , floating-point data.

void inner4(vec_ptr u, vec_ptr v, data t *dest) {     long i;      long length = vec_length(u);     data_t *udata = get_vec_start(u);     data_t *udata = get_vec_start(v);     data_t sum = (data_t) 0;     (i = 0; < length; i++){         sum = sum + udata[i] * vdata[i]'     }     *dest = sum; } 

enter image description here

...i assume divided 3 because of cpe value, confused (4+3) comes from.

it appears (4+3)/3 = 2.33, representing lower bound cpe, (or cpi) float simplification of ratio (perhaps after factoring), derived shown in examples in link provided in comments. i.e. summing count of instructions per type, each 1 multiplied corresponding clock cycles, divided total instruction count.

example 2 in link, type float, different processor instruction mix , clock cycle count unit reference in post provides illustration. although there not enough information given in post know how values derived, formula given in link shows how ratios constructed.

following same form given in example 2: , given following (contrived) instruction mix , cycle counts, albeit simplified example (i.e. 2 instruction types) shows how ratio could have been derived:

instruction type    instruction count   clock cycle count    floating point      6000                2 control transfer    3000                3 

the ratio be:

(6000*2 + 3000*3)/9000   after factoring:      (4 + 3)/3 - ratio sum of 2 instruction types, each multiplied             corresponding cycle count, divided total             instructions in specific program, factored             lowest terms. 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -