swps3
|
Profile generation and alignment on Cell/BE SPE. More...
#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 | |
Profile generation and alignment on Cell/BE SPE.
Definition in file DynProgr_SPE_functions.cc.
|
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 559 of file DynProgr_SPE_functions.cc.
References blockStart, ls1, MATRIX_DIM, s1, and T.
Referenced by TcreateProfile().
|
inlinestatic |
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, loadOpt, ls1, ls2, s2, spu_max(), spu_min(), storeOpt, T, and UNLIKELY.
Definition at line 42 of file DynProgr_SPE_functions.cc.
Definition at line 41 of file DynProgr_SPE_functions.cc.
Referenced by TcreateProfile(), and TdynProgLocal().
|
inlinestatic |
Emulates a packed maximum operation.
Definition at line 68 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock().
|
inlinestatic |
Emulates a packed minimum operation.
Definition at line 74 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock().
|
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 583 of file DynProgr_SPE_functions.cc.
References ALIGN16, blockSize, blockStart, doCreateProfile(), ls1, min(), simi, and T.
|
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 595 of file DynProgr_SPE_functions.cc.
References ALIGN16, blockSize, blockStart, delS, loadOpt, ls1, ls2, MATRIX_DIM, MAX_TRANSFER, min(), mn, mx, profile, rD, 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 doCreateProfile(), handleCommand(), TcreateProfile(), and TdynProgLocal().
vvf_t createProfile[] |
A structure for accessing different flavors of the profile creation routine.
Definition at line 677 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(), and TdynProgLocal().
dvf_t dynProgLocal[] |
A structure for accessing different flavors of the local alignment routine.
Definition at line 666 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 dynProgrLocalBlock(), handleCommand(), swps3_alignmentByteSSE(), swps3_alignmentByteSSE_lin(), swps3_alignmentShort2SSE(), swps3_alignmentShortSSE(), swps3_alignmentShortSSE_lin(), and TdynProgLocal().
int ls1 |
query sequence length
Definition at line 58 of file DynProgr_SPE_functions.cc.
Referenced by doCreateProfile(), dynProgrLocalBlock(), handleCommand(), swps3_alignScalar(), TcreateProfile(), and TdynProgLocal().
int ls2 |
database sequence length
Definition at line 58 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock(), handleCommand(), swps3_alignScalar(), and TdynProgLocal().
int maxDbLen |
maximal database sequence length
Definition at line 60 of file DynProgr_SPE_functions.cc.
Referenced by handleCommand(), and SPEInit().
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(), swps3_createProfileShortSSE(), swps3_dynProgrAltivec(), and TdynProgLocal().
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(), swps3_alignmentShortSSE(), and TdynProgLocal().
ppu_addr_t remote_profile |
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(), swps3_alignmentFloatSPE(), swps3_alignmentShortSPE(), TcreateProfile(), and TdynProgLocal().
void * storeOpt |
temporary storage for score column
Definition at line 62 of file DynProgr_SPE_functions.cc.
Referenced by dynProgrLocalBlock(), handleCommand(), swps3_alignmentByteSSE(), swps3_alignmentByteSSE_lin(), swps3_alignmentShort2SSE(), swps3_alignmentShortSSE(), and swps3_alignmentShortSSE_lin().