SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
OclCpaEngine< Tc, Tt, Tp > Class Template Reference
Inheritance diagram for OclCpaEngine< Tc, Tt, Tp >:
Inheritance graph
Collaboration diagram for OclCpaEngine< Tc, Tt, Tp >:
Collaboration graph

Public Member Functions

 OclCpaEngine (unsigned int platform, unsigned int device, unsigned int samplesPerTrace, unsigned int noOfCandidates, unsigned int noOfTraces)
 Initialize given platform and device, create command queue and allocate device memory buffers.
 
void buildProgram ()
 Build the OpenCL kernels.
 
void loadPredictionsToDevice (const PowerPredictions< Tp > &pp, bool blocking=false)
 Load power predictions from local memory to device buffers.
 
void loadTracesToDevice (const PowerTraces< Tt > &pt, bool blocking=false)
 Load power traces from local memory to device buffers.
 
void compute (UnivariateContext< Tc > &context, unsigned int sliceSize)
 Launch the computation kernel, divide the work by sliceSize (long running GPU kernel is not good), return result in UnivariateContext context.
 
- Public Member Functions inherited from OclEngine< Tc >
 OclEngine (unsigned int platform, unsigned int device)
 Initializes the specified OpenCL device and creates an OpenCL command queue.
 
std::string getTypeName (float dummy)
 Returns the data type name.
 
std::string getTypeName (double dummy)
 Returns the data type name.
 
std::string getTypeName (int8_t dummy)
 Returns the data type name.
 
std::string getTypeName (uint8_t dummy)
 Returns the data type name.
 
std::string getTypeName (int16_t dummy)
 Returns the data type name.
 
std::string getTypeName (uint16_t dummy)
 Returns the data type name.
 
std::string getTypeName (int32_t dummy)
 Returns the data type name.
 
std::string getTypeName (uint32_t dummy)
 Returns the data type name.
 
std::string getTypeName (int64_t dummy)
 Returns the data type name.
 
std::string getTypeName (uint64_t dummy)
 Returns the data type name.
 

Protected Attributes

unsigned int m_samplesPerTrace
 
unsigned int m_noOfCandidates
 
unsigned int m_noOfTraces
 
bool m_compiled
 
cl_mem m_predictions_mem
 
cl_mem m_traces_mem
 
cl_mem m_predsAvg_mem
 
cl_mem m_predsMSum_mem
 
cl_mem m_tracesAvg_mem
 
cl_mem m_tracesMSum_mem
 
cl_mem m_predsTracesCSum_mem
 
cl_program m_program
 
cl_kernel m_kernel_computeTracesAvgMSum
 
cl_kernel m_kernel_computePredsAvgMSum
 
cl_kernel m_kernel_computeCSum
 
- Protected Attributes inherited from OclEngine< Tc >
unsigned int m_platform
 
unsigned int m_device
 
cl_context m_context
 
cl_command_queue m_command_queue
 
cl_platform_id * m_platforms
 
cl_device_id * m_devices
 

Static Protected Attributes

static const char * m_programCode
 

Additional Inherited Members

- Static Public Member Functions inherited from OclEngine< Tc >
static std::string queryDevices ()
 Query available platforms and devices.
 
static void trimWS (std::string &str)
 Trims white space from string.
 

The documentation for this class was generated from the following file: