Utilities.skeleton.C.0.0.simple

From BenchIT-Wiki

Jump to: navigation, search

Contents

short description

A simple skeleton for a kernel written in C. This skeleton can be used to build own kernels. It is usable out of the box and has been documented very well with source code comments.

requirements

A C compiler and a POSIX compliant system.

parameters

kernel specific parameters

BENCHIT_KERNEL_PROBLEMSIZE_MIN

BENCHIT_KERNEL_PROBLEMSIZE_MAX

BENCHIT_KERNEL_PROBLEMSIZE_INCREMENT

additional parameters

You can overwrite every environment variable in this parameters file. Some important ones have been listed and commented out. For explanation of these variables please look at LOCALDEFS

expected results

detailed description

The measurement-routine is encapsulated in the file simple.c:

double simple( myinttype * pi_prob_size )
{
  double dresult = 1.0;
  myinttype ii = 0, pre = 0, prepre = 0;
  

  switch ( * pi_prob_size )
  {
    case 0:
            break;
    case 1:
            break;
    default:
            pre = *pi_prob_size - 1;
            prepre = pre - 1;
            dresult = (double) (simple(&pre) + simple(&prepre));
  }

  return dresult;
}

This is a fairly simple implementation of the fibonacci-algorithm and its only use is to show the operation method of a BenchIT-kernel.

see also

Personal tools