Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Result sum_naive(){
- size_t i;
- struct Result res;
- int16_t val;
- gettimeofday(&res.time_start, NULL);
- res.sum = 0;
- for(i = 0; i < SIZE; i++){
- val = data[i] * VOL;
- output[i] = val;
- res.sum += val;
- }
- gettimeofday(&res.time_end, NULL);
- return res;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement