aboutsummaryrefslogtreecommitdiffstats
path: root/bin/test_cluster.c
blob: 3bcdc9fc5ed85cc81b47e017ec9216176e6ffa2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <assert.h>
#include "litmus.h"

int main(void)
{
	int i;
	int cluster_sizes[] = {1, 2, 6, 24};
	for(i = 0; i < sizeof(cluster_sizes)/sizeof(cluster_sizes[0]); ++i)
	{
		int size = cluster_sizes[i];
		int num_clusters = 24/size;
		int c;
		printf("Cluster Size: %d\n", size);
		for(c = 0; c < num_clusters; ++c)
		{
			printf("\tcluster %d -> 1st pcpu %d\n", c, cluster_to_first_cpu(c, size));
		}
	}

	return 0;
}