CPU2006_xdr3dfcoord.c

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:23.0
disk size 426 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
int random();

//Complexity: O(n)
void xdr3dfcoord(int size, int limit) {
	int i = 0;
	while (i < size) {
	    int is_small = 0;
	    if (i + 1 < size) {
		if (random()) {
		    is_small = 1;
		}
    
	    }
	    i++;
	    
	    int run = 0;
	    while (is_small && run < limit) {
		run++;
		i++;
		is_small = 0;
		if (i < size &&
			random()) {
		    is_small = 1;
		}
	    }
	    for (int k=0; k < run; k+=3) {
	    }
	}
}

popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark