#include "DynProgr_SPE_functions.h"
#include "DynProgr_SPE.h"
#include "matrix.h"
#include <cstdlib>
#include <malloc.h>
#include <float.h>
#include <cstdio>
#include <string.h>
#include <spu_intrinsics.h>
#include <sys/types.h>
Go to the source code of this file.
Classes | |
struct | IsInteger< T > |
struct | IsInteger< int16_t > |
struct | IsInteger< int32_t > |
struct | IsInteger< int8_t > |
struct | MaxValue< T > |
struct | MaxValue< double > |
struct | MaxValue< float > |
struct | MinValue< T > |
struct | MinValue< double > |
struct | MinValue< float > |
Functions | |
template<class T, class V> | |
static void | doCreateProfile (int blockStart, int currentBlockSize, const T *simi, V *currentBlock) |
Computes a profile and writes it to the specified memory location. | |
template<class T, class V> | |
static T | dynProgrLocalBlock (int currentBlockSize, T zero, T goal, T *maxS, T *delS, const V *profile, V *loadOpt, V *storeOpt, V *rD) |
Performs an local alignment using the given profile segment and database sequence. | |
template<typename T> | |
static T | max (T a, T b) |
template<typename T> | |
static T | min (T a, T b) |
template<class V> | |
static V | spu_max (V a, V b) |
Emulates a packed maximum operation. | |
template<class V> | |
static V | spu_min (V a, V b) |
Emulates a packed minimum operation. | |
template<class T, class V> | |
static void | TcreateProfile (void) |
Template for creating a profile using global variables as parameters. | |
template<class T, class V> | |
static double | TdynProgLocal (void) |
Template for computing a local alignment score using global variables as parameters. | |
Variables | |
int | blockSize |
length of current profile segment | |
int | blockStart |
start position of current profile block | |
vvf_t | createProfile [] |
A structure for accessing different flavors of the profile creation routine. | |
void * | delS |
storage for intermediate column deletion scores | |
dvf_t | dynProgLocal [] |
A structure for accessing different flavors of the local alignment routine. | |
double | fixedDel |
gap initiation penalty | |
double | incDel |
gap extension penalty | |
void * | loadOpt |
temporary storage for score column | |
int | ls1 |
query sequence length | |
int | ls2 |
database sequence length | |
int | maxDbLen |
maximal database sequence length | |
void * | maxS |
storage for intermediate score row | |
double | mn |
minimum score | |
double | mx |
maximum score | |
void * | profile |
current profile segment | |
void * | rD |
temporary storage for row delection scores | |
ppu_addr_t | remote_profile |
64-bit pointer to profile location in main memory | |
char * | s1 |
query sequence | |
char * | s2 |
database sequence | |
void * | simi |
similarity matrix | |
void * | storeOpt |
temporary storage for score column |
Definition in file DynProgr_SPE_functions.cc.
static void doCreateProfile | ( | int | blockStart, | |
int | currentBlockSize, | |||
const T * | simi, | |||
V * | currentBlock | |||
) | [inline, static] |
Computes a profile and writes it to the specified memory location.
blockStart | Current position in the query sequence. | |
currentBlockSize | Length of current profile segment. | |
simi | The similarity matrix. | |
currentBlock | Memory location to write the profile to. |
Definition at line 558 of file DynProgr_SPE_functions.cc.
References ls1, MATRIX_DIM, s1, and T.
Referenced by TcreateProfile().
static T dynProgrLocalBlock | ( | int | currentBlockSize, | |
T | zero, | |||
T | goal, | |||
T * | maxS, | |||
T * | delS, | |||
const V * | profile, | |||
V * | loadOpt, | |||
V * | storeOpt, | |||
V * | rD | |||
) | [inline, static] |
Performs an local alignment using the given profile segment and database sequence.
currentBlockSize | Length of the current profile segment in terms of query sequence characters. | |
zero | Defines a value for the zero score. | |
goal | Defines a maximum value for the score. | |
maxS | Intermediate row with maximum scores. | |
delS | Intermediate row with column deletion scores. | |
profile | A segment of the profile created previously from the query sequence. | |
loadOpt | Temporary storage for a column. | |
storeOpt | Temporary storage for a column. | |
rD | Temporary storage for a column of row deletion scores. |
Definition at line 97 of file DynProgr_SPE_functions.cc.
References fixedDel, incDel, LIKELY, ls1, ls2, s2, spu_max(), spu_min(), T, and UNLIKELY.
static T max | ( | T | a, | |
T | b | |||
) | [inline, static] |
Definition at line 42 of file DynProgr_SPE_functions.cc.
static T min | ( | T | a, | |
T | b | |||
) | [inline, static] |
Definition at line 41 of file DynProgr_SPE_functions.cc.
static V spu_max | ( | V | a, | |
V | b | |||
) | [inline, static] |
Emulates a packed maximum operation.
Definition at line 68 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock().
static V spu_min | ( | V | a, | |
V | b | |||
) | [inline, static] |
Emulates a packed minimum operation.
Definition at line 74 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock().
static void TcreateProfile | ( | void | ) | [inline, static] |
Template for creating a profile using global variables as parameters.
T | The data type for the alignment scores. | |
V | The corresponding packed vector data type. |
Definition at line 582 of file DynProgr_SPE_functions.cc.
References ALIGN16, blockSize, blockStart, doCreateProfile(), ls1, min, simi, and T.
static double TdynProgLocal | ( | void | ) | [inline, static] |
Template for computing a local alignment score using global variables as parameters.
T | The data type for the alignment scores. | |
V | The corresponding packed vector data type. |
Definition at line 594 of file DynProgr_SPE_functions.cc.
References ALIGN16, blockSize, blockStart, ls1, ls2, MATRIX_DIM, MAX_TRANSFER, min, mn, mx, remote_profile, simi, and T.
int blockSize |
length of current profile segment
Definition at line 59 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), TcreateProfile(), and TdynProgLocal().
int blockStart |
start position of current profile block
Definition at line 59 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), TcreateProfile(), and TdynProgLocal().
Initial value:
{ TcreateProfile<int8_t, vector int8_t>, TcreateProfile<int16_t, vector int16_t>, TcreateProfile<int32_t, vector int32_t>, TcreateProfile<float, vector float>, TcreateProfile<double, vector double> }
Definition at line 676 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand().
void * delS |
storage for intermediate column deletion scores
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand().
Initial value:
{ TdynProgLocal<int8_t, vector int8_t>, TdynProgLocal<int16_t, vector int16_t>, TdynProgLocal<int32_t, vector int32_t>, TdynProgLocal<float, vector float>, TdynProgLocal<double, vector double> }
Definition at line 665 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand().
double fixedDel |
gap initiation penalty
Definition at line 61 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock(), and handleCommand().
double incDel |
gap extension penalty
Definition at line 61 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock(), and handleCommand().
void * loadOpt |
temporary storage for score column
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), swps3_alignmentByteSSE(), swps3_alignmentShort2SSE(), and swps3_alignmentShortSSE().
int ls1 |
query sequence length
Definition at line 58 of file DynProgr_SPE_functions.cc.
Referenced by doCreateProfile(), dynProgrLocalBlock(), handleCommand(), TcreateProfile(), and TdynProgLocal().
int ls2 |
database sequence length
Definition at line 58 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock(), handleCommand(), and TdynProgLocal().
int maxDbLen |
maximal database sequence length
Definition at line 60 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand().
void * maxS |
storage for intermediate score row
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand().
double mn |
minimum score
Definition at line 61 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), and TdynProgLocal().
double mx |
maximum score
Definition at line 61 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), and TdynProgLocal().
void * profile |
current profile segment
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by allocateProfile(), handleCommand(), swps3_createProfileAltivec(), swps3_createProfileByteSSE(), and swps3_createProfileShortSSE().
void * rD |
temporary storage for row delection scores
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), swps3_alignmentByteSSE(), swps3_alignmentShort2SSE(), and swps3_alignmentShortSSE().
64-bit pointer to profile location in main memory
Definition at line 63 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), and TdynProgLocal().
char* s1 |
query sequence
Definition at line 57 of file DynProgr_SPE_functions.cc.
Referenced by doCreateProfile(), and handleCommand().
char * s2 |
database sequence
Definition at line 57 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock(), and handleCommand().
void* simi |
similarity matrix
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), TcreateProfile(), and TdynProgLocal().
void * storeOpt |
temporary storage for score column
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), swps3_alignmentByteSSE(), swps3_alignmentShort2SSE(), and swps3_alignmentShortSSE().