#include <stdio.h>
#include <malloc.h>
#include <libspe2.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <errno.h>
#include "DynProgr_SPE.h"
#include <string.h>
#include <stdbool.h>
#include <ctype.h>
#include <limits.h>
#include <time.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include "debug.h"
#include "swps3.h"
#include "matrix.h"
#include "DynProgr_scalar.h"
#include "DynProgr_PPU.h"
#include "DynProgr_PPU_profile.inc"
Go to the source code of this file.
Defines | |
#define | MAX(a, b) (a>b?a:b) |
#define | MIN(a, b) (a<b?a:b) |
#define | T float |
#define | T int16_t |
#define | T int8_t |
Functions | |
static int | SPEAlign (const char *db, int dbLen, double *result) |
static int | SPECreateProfile (const char *query, int queryLen, const void *matrix, double min, double max) |
Creates a profile in the SPE's memory. | |
static int | SPEGetProfile (const SPEProfile *profile) |
static int | SPEInit (int dataType, int maxDbLen, Options *options) |
Initializes a SPE. | |
static int | SPEPutProfile (void *profile, int *blockSize) |
static int | submitSPECommand (SPECommand *command) |
Sends a SPECommand to the SPE. | |
EXPORT double | swps3_alignmentByteSPE (const SBMatrix matrix, const char *query, int queryLen, const char *db, int dbLen, Options *options) |
EXPORT double | swps3_alignmentFloatSPE (const SBMatrix matrix, const char *query, int queryLen, const char *db, int dbLen, Options *options) |
EXPORT double | swps3_alignmentProfileSPE (const char *db, int dbLen) |
Profile must have been loaded before! | |
EXPORT double | swps3_alignmentShortSPE (const SBMatrix matrix, const char *query, int queryLen, const char *db, int dbLen, Options *options) |
EXPORT SPEProfile * | swps3_createProfileBytePPU (const char *query, int queryLen, const SBMatrix matrix, int maxDbLen) |
EXPORT SPEProfile * | swps3_createProfileFloatPPU (const char *query, int queryLen, const SBMatrix matrix, int maxDbLen) |
EXPORT SPEProfile * | swps3_createProfileShortPPU (const char *query, int queryLen, const SBMatrix matrix, int maxDbLen) |
EXPORT void | swps3_freeProfilePPU (SPEProfile *profile) |
EXPORT void | swps3_loadProfileByte (SPEProfile *profile, int maxDbLen, Options *options) |
EXPORT void | swps3_loadProfileFloat (SPEProfile *profile, int maxDbLen, Options *options) |
EXPORT void | swps3_loadProfileShort (SPEProfile *profile, int maxDbLen, Options *options) |
Variables | |
static spe_context_ptr_t | spe_context = NULL |
spe_program_handle_t | spe_dynprogr_handle |
Definition in file DynProgr_PPU.c.
#define MAX | ( | a, | |||
b | ) | (a>b?a:b) |
Definition at line 57 of file DynProgr_PPU.c.
#define MIN | ( | a, | |||
b | ) | (a<b?a:b) |
Definition at line 58 of file DynProgr_PPU.c.
#define T float |
Definition at line 372 of file DynProgr_PPU.c.
#define T int16_t |
Definition at line 372 of file DynProgr_PPU.c.
#define T int8_t |
Definition at line 372 of file DynProgr_PPU.c.
Referenced by allocateProfile(), doCreateProfile(), dynProgrLocal(), dynProgrLocal2(), dynProgrLocalBlock(), swps3_createProfileAltivec(), swps3_dynProgrAltivec(), TcreateProfile(), and TdynProgLocal().
static int SPEAlign | ( | const char * | db, | |
int | dbLen, | |||
double * | result | |||
) | [static] |
Definition at line 196 of file DynProgr_PPU.c.
static int SPECreateProfile | ( | const char * | query, | |
int | queryLen, | |||
const void * | matrix, | |||
double | min, | |||
double | max | |||
) | [static] |
Creates a profile in the SPE's memory.
query | The query sequence. | |
queryLen | The length of the query sequence. | |
matrix | The scoring matrix with entries of the same type as specified in the SPEInit command. | |
min | The highest value in the scoring matrix. | |
max | The lowest value in the scoring matrix. |
Definition at line 154 of file DynProgr_PPU.c.
static int SPEGetProfile | ( | const SPEProfile * | profile | ) | [static] |
Definition at line 169 of file DynProgr_PPU.c.
static int SPEInit | ( | int | dataType, | |
int | maxDbLen, | |||
Options * | options | |||
) | [static] |
Initializes a SPE.
dataType | The data type for the computation. Must be one of SPE_ALIGNMENT_TYPE_DOUBLE, SPE_ALIGNMENT_TYPE_FLOAT, SPE_ALIGNMENT_TYPE_INT, SPE_ALIGNMENT_TYPE_SHORT, SPE_ALIGNMENT_TYPE_BYTE. | |
maxDbLen | Maximal possible length of the database sequence. | |
options | Program options. |
Definition at line 129 of file DynProgr_PPU.c.
static int SPEPutProfile | ( | void * | profile, | |
int * | blockSize | |||
) | [static] |
Definition at line 179 of file DynProgr_PPU.c.
static int submitSPECommand | ( | SPECommand * | command | ) | [static] |
Sends a SPECommand to the SPE.
command | A SPEcommand. |
Definition at line 102 of file DynProgr_PPU.c.
EXPORT double swps3_alignmentFloatSPE | ( | const SBMatrix | matrix, | |
const char * | query, | |||
int | queryLen, | |||
const char * | db, | |||
int | dbLen, | |||
Options * | options | |||
) |
Definition at line 276 of file DynProgr_PPU.c.
EXPORT double swps3_alignmentProfileSPE | ( | const char * | db, | |
int | dbLen | |||
) |
Profile must have been loaded before!
Definition at line 311 of file DynProgr_PPU.c.
Referenced by main().
EXPORT SPEProfile* swps3_createProfileBytePPU | ( | const char * | query, | |
int | queryLen, | |||
const SBMatrix | matrix, | |||
int | maxDbLen | |||
) |
EXPORT SPEProfile* swps3_createProfileFloatPPU | ( | const char * | query, | |
int | queryLen, | |||
const SBMatrix | matrix, | |||
int | maxDbLen | |||
) |
EXPORT SPEProfile* swps3_createProfileShortPPU | ( | const char * | query, | |
int | queryLen, | |||
const SBMatrix | matrix, | |||
int | maxDbLen | |||
) |
EXPORT void swps3_freeProfilePPU | ( | SPEProfile * | profile | ) |
EXPORT void swps3_loadProfileByte | ( | SPEProfile * | profile, | |
int | maxDbLen, | |||
Options * | options | |||
) |
EXPORT void swps3_loadProfileFloat | ( | SPEProfile * | profile, | |
int | maxDbLen, | |||
Options * | options | |||
) |
Definition at line 344 of file DynProgr_PPU.c.
EXPORT void swps3_loadProfileShort | ( | SPEProfile * | profile, | |
int | maxDbLen, | |||
Options * | options | |||
) |
spe_context_ptr_t spe_context = NULL [static] |
Definition at line 94 of file DynProgr_PPU.c.
spe_program_handle_t spe_dynprogr_handle |