/**
 * This is a generic tuned configuration file with Java modules for RPG.
 *
 * It is designed to be included by specialized configurations.
 *
 */

// Include language-independent definitions
#include "../shared.conf"

// The list of modules implemented in C++
core::modules = list (

    // Architectural modules
    "branch",
    "loop-small", "loop-large",
    "sequential-small", "sequential-large",

    // Thread safe executable modules

    "waiter",
    "fft",
    "lu",
    "monte-carlo",
    "sor",
    "sparse",
	"serial",
	"aes",
	"rsa",
	"signverify",
	"mpegaudio",
	"xml-transform",
	"xml-validation",

    // Thread unsafe executable modules
     
    // The execution of the following modules is serialized by an instance mutex


    // The execution of the following modules is serialized by a class mutex,
    // that is, across all instances of the same module in the application !
    
    "compress",
)

// Relative probabilities of generating individual architectural modules.

loop-small::probability = random-range(min=50, max=75)
loop-large::probability = random-range(min=25, max=50)
branch::probability     = random-range(min=50, max=100)
sequential-small::probability = random-range(min=5, max=10)
sequential-large::probability = random-range(min=5, max=10)

// Number of slots for each architectural module.
// Architectural modules are recognized by having slots into which other modules are plugged.
// Executable modules have no slots and therefore become primitive components at the architectural level.

branch::slots           = random-range (min=2, max=5)

loop-small::slots		= 1
loop-large::slots		= 1

sequential-small::slots = random-range (min=2, max=5)
sequential-large::slots = random-range (min=20, max=50)


//--------------------------------------------------------------------------
// Architectural module configurations.

// Loop

loop-small::classname   = "loop"
//loop-small::loopcount   = parameter (classname = "random-range", min = 1, max = 10)
loop-small::loopcount   = parameter (classname = "random-geometric", ex = 5)

loop-large::classname   = "loop"
//loop-large::loopcount   = parameter (classname = "random-range", min = 100, max = 1000)
loop-large::loopcount   = parameter (classname = "random-geometric", ex = 20)

// Sequential

sequential-small::classname = "sequential"

sequential-large::classname = "sequential"

// Branch
branch::classname	= "branch"


//--------------------------------------------------------------------------
// Workload module configurations.

#define MODULE_PROB_RARE		10
#define MODULE_PROB_STANDARD	30
#define MODULE_PROB_FREQUENT	100

// compress

MOD_WORK(compress, compress, MODULE_PROB_STANDARD)

// scimark.fft

MOD_WORK(fft, fft, MODULE_PROB_STANDARD)

// scimark.lu

MOD_WORK(lu, lu, MODULE_PROB_STANDARD)

// scimark.monte_carlo

MOD_WORK(monte-carlo, montecarlo, MODULE_PROB_STANDARD)

// scimark.sor

MOD_WORK(sor, sor, MODULE_PROB_STANDARD)

// scimark.sparse

MOD_WORK(sparse, sparse, MODULE_PROB_STANDARD)

// serial

MOD_WORK(serial, serial, MODULE_PROB_STANDARD)

// aes

MOD_WORK(aes, aes, MODULE_PROB_STANDARD)

// rsa

MOD_WORK(rsa, rsa, MODULE_PROB_STANDARD)

// signverify

MOD_WORK(signverify, signverify, MODULE_PROB_STANDARD)

// mpegaudio

MOD_WORK(mpegaudio, mpegaudio, MODULE_PROB_STANDARD)

// xml-transform

MOD_WORK(xml-transform, xmltransform, MODULE_PROB_STANDARD)

// xml-validation

MOD_WORK(xml-validation, xmlvalidation, MODULE_PROB_STANDARD)

// Waiter

MOD_WORK(waiter, waiter, MODULE_PROB_RARE)
waiter::timeval    			= parameter (classname = "random-range", min=50000, max=800000)
