GPUOcelot
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

test::TestPTXAssembly Class Reference

The idea here is to define a test harness for a large number of PTX unit tests. More...

#include <TestPTXAssembly.h>

List of all members.

Classes

class  TestHandle
 A class for representing a single test. More...

Public Types

enum  DataType {
  I8 = 0, I16 = 1, I32 = 2, I64 = 3,
  FP32 = 4, FP64 = 5
}
 

Possible data types.

More...
typedef std::vector< DataTypeTypeVector
 A vector of data types.
typedef void(* ReferenceFunction )(void *output, void *input)
 A pointer to a reference function.
typedef char *(* GeneratorFunction )(MersenneTwister &generator)
 A pointer to an input generator function.
typedef std::vector< TestHandleTestVector
 A list of tests to perform.

Public Member Functions

 TestPTXAssembly (hydrazine::Timer::Second limit=10.0, unsigned int tolerableFailures=0)
 Constructor.
void add (const std::string &name, ReferenceFunction function, const std::string &ptx, const TypeVector &out, const TypeVector &in, GeneratorFunction gen, unsigned int threads, unsigned int ctas, int epsilon=0)
 Add a test, ptx function name should be 'test'.
bool doTest ()
 Run the current set of tests, abort on the first error.

Static Public Member Functions

static unsigned int bytes (DataType t)
 Get the size of a data type in bytes.

Public Attributes

bool print
 Print out the ptx of each test as it is added.
std::string regularExpression
 Only add tests that match this regular expression.
hydrazine::Timer::Second timeLimit
 Total amount of time to spend on tests in seconds.
bool enumerate
 Only enumerate the tests, do not run them.
bool veryVerbose
 print out status information as the test is running

Detailed Description

The idea here is to define a test harness for a large number of PTX unit tests.


Member Typedef Documentation

typedef char*(* test::TestPTXAssembly::GeneratorFunction)(MersenneTwister &generator)

A pointer to an input generator function.

typedef void(* test::TestPTXAssembly::ReferenceFunction)(void *output, void *input)

A pointer to a reference function.

A list of tests to perform.

A vector of data types.


Member Enumeration Documentation

Possible data types.

Enumerator:
I8 
I16 
I32 
I64 
FP32 
FP64 

Constructor & Destructor Documentation

test::TestPTXAssembly::TestPTXAssembly ( hydrazine::Timer::Second  limit = 10.0,
unsigned int  tolerableFailures = 0 
)

Constructor.


Member Function Documentation

void test::TestPTXAssembly::add ( const std::string &  name,
ReferenceFunction  function,
const std::string &  ptx,
const TypeVector out,
const TypeVector in,
GeneratorFunction  gen,
unsigned int  threads,
unsigned int  ctas,
int  epsilon = 0 
)

Add a test, ptx function name should be 'test'.

unsigned int test::TestPTXAssembly::bytes ( DataType  t) [static]

Get the size of a data type in bytes.

bool test::TestPTXAssembly::doTest ( )

Run the current set of tests, abort on the first error.


Member Data Documentation

Only enumerate the tests, do not run them.

Print out the ptx of each test as it is added.

Only add tests that match this regular expression.

hydrazine::Timer::Second test::TestPTXAssembly::timeLimit

Total amount of time to spend on tests in seconds.

print out status information as the test is running


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines