OpenASIP
2.0
|
#include <iostream>
#include <fstream>
#include <set>
#include <assert.h>
#include <boost/format.hpp>
#include "OperationPool.hh"
#include "Operation.hh"
#include "Conversion.hh"
#include "OperationIndex.hh"
#include "Operand.hh"
#include "Machine.hh"
#include "StringTools.hh"
#include "HWOperation.hh"
Go to the source code of this file.
Functions | |
std::string | operandTypeCString (const Operand &operand) |
void | generateHeader (std::ostream &stream, const TTAMachine::Machine &machine) |
int | main (int argc, char *argv[]) |
void generateHeader | ( | std::ostream & | stream, |
const TTAMachine::Machine & | machine | ||
) |
Writes the macros that can be written to the tceoclext.h header file to stdout.
Following macros are produced for all operations found in the given machine (for example, in case of ADDSUB):
#define cl_TCE_ADDSUB #define clADDSUBTCE _TCE_ADDSUB
Thus, it's possible to figure out whether ADDSUB is implemented in the machine using the first define and actually call the ADDSUB with the latter.
Definition at line 86 of file ExtensionGen.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and StringTools::stringToUpper().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 114 of file ExtensionGen.cc.
References Exception::errorMessage(), generateHeader(), TTAMachine::Machine::loadFromADF(), and machine.
std::string operandTypeCString | ( | const Operand & | operand | ) |
Generates OpenCL C extension functions and definitions for the (custom) operations in the given ADF.
Definition at line 53 of file ExtensionGen.cc.
References Operand::DOUBLE_WORD, Operand::FLOAT_WORD, Operand::SINT_WORD, Operand::type(), and Operand::UINT_WORD.