tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CounterBench.cpp File Reference
#include <stm/config.h>
#include <stdint.h>
#include <iostream>
#include <api/api.hpp>
#include "bmconfig.hpp"
Include dependency graph for CounterBench.cpp:

Functions

void bench_init ()
 
void bench_test (uintptr_t, uint32_t *)
 
bool bench_verify ()
 
void bench_reparse ()
 

Variables

int counter
 

Function Documentation

void bench_init ( )

Step 3: Declare an instance of the data type, and provide init, test, and verify functions

void bench_reparse ( )

Step 4: Include the code that has the main() function, and the code for creating threads and calling the three above-named functions. Don't forget to provide an arg reparser.

void bench_test ( uintptr_t  ,
uint32_t *   
)
bool bench_verify ( )

Variable Documentation

int counter

Copyright (C) 2011 University of Rochester Department of Computer Science and Lehigh University Department of Computer Science and Engineering

License: Modified BSD Please see the file LICENSE.RSTM for licensing information We provide the option to build the entire benchmark in a single source. The bmconfig.hpp include defines all of the important functions that are implemented in this file, and bmharness.cpp defines the execution infrastructure. Step 1: Include the configuration code for the harness, and the API code. Step 2: Declare the data type that will be stress tested via this benchmark. Also provide any functions that will be needed to manipulate the data type. Take care to avoid unnecessary indirection.

NB: For the simple counter, we don't need to have an abstract data type