SW#
All Files Functions Variables Typedefs Macros
gpu_module.h
Go to the documentation of this file.
1 /*
2 swsharp - CUDA parallelized Smith Waterman with applying Hirschberg's and
3 Ukkonen's algorithm and dynamic cell pruning.
4 Copyright (C) 2013 Matija Korpar, contributor Mile Šikić
5 
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 Contact the author by mkorpar@gmail.com.
20 */
27 #ifndef __SW_SHARP_GPU_MODULEH__
28 #define __SW_SHARP_GPU_MODULEH__
29 
30 #include "alignment.h"
31 #include "chain.h"
32 #include "scorer.h"
33 #include "thread.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 //******************************************************************************
40 // SINGLE ALIGNMENT
41 
60 extern void hwEndDataGpu(int* queryEnd, int* targetEnd, int* outScore,
61  Chain* query, Chain* target, Scorer* scorer, int score, int card,
62  Thread* thread);
63 
82 extern void nwFindScoreGpu(int* queryStart, int* targetStart, Chain* query,
83  Chain* target, Scorer* scorer, int score, int card, Thread* thread);
84 
110 extern void nwLinearDataGpu(int** scores, int** affines, Chain* query,
111  int queryFrontGap, Chain* target, int targetFrontGap, Scorer* scorer,
112  int pLeft, int pRight, int card, Thread* thread);
113 
133 extern void ovEndDataGpu(int* queryEnd, int* targetEnd, int* outScore,
134  Chain* query, Chain* target, Scorer* scorer, int score, int card,
135  Thread* thread);
136 
154 extern void ovFindScoreGpu(int* queryStart, int* targetStart, Chain* query,
155  Chain* target, Scorer* scorer, int score, int card, Thread* thread);
156 
180 extern void swEndDataGpu(int* queryEnd, int* targetEnd, int* outScore,
181  int** scores, int** affines, Chain* query, Chain* target, Scorer* scorer,
182  int score, int card, Thread* thread);
183 
184 //******************************************************************************
185 
186 //******************************************************************************
187 // DATABASE ALIGNMENT
188 
197 
208 extern ChainDatabaseGpu* chainDatabaseGpuCreate(Chain** database, int databaseLen,
209  int* cards, int cardsLen);
210 
216 extern void chainDatabaseGpuDelete(ChainDatabaseGpu* chainDatabaseGpu);
217 
243 extern void scoreDatabaseGpu(int** scores, int type, Chain* query,
244  ChainDatabaseGpu* chainDatabaseGpu, Scorer* scorer, int* indexes,
245  int indexesLen, int* cards, int cardsLen, Thread* thread);
246 
277 extern void scoreDatabasesGpu(int** scores, int type, Chain** queries,
278  int queriesLen, ChainDatabaseGpu* chainDatabaseGpu, Scorer* scorer,
279  int* indexes, int indexesLen, int* cards, int cardsLen, Thread* thread);
280 
281 //******************************************************************************
282 
283 #ifdef __cplusplus
284 }
285 #endif
286 #endif // __SW_SHARP_GPU_MODULEH__
void ovFindScoreGpu(int *queryStart, int *targetStart, Chain *query, Chain *target, Scorer *scorer, int score, int card, Thread *thread)
GPU implementation of score finding function.
Provides object used for alignment scoring.
Pairwise sequnce alignment result storage header.
Multiplatform threading header.
struct Scorer Scorer
Scorer object used for alignment scoring.
Definition: scorer.h:42
void hwEndDataGpu(int *queryEnd, int *targetEnd, int *outScore, Chain *query, Chain *target, Scorer *scorer, int score, int card, Thread *thread)
GPU implementation of the semiglobal scoring function.
void chainDatabaseGpuDelete(ChainDatabaseGpu *chainDatabaseGpu)
ChainDatabaseGpu destructor.
void nwFindScoreGpu(int *queryStart, int *targetStart, Chain *query, Chain *target, Scorer *scorer, int score, int card, Thread *thread)
GPU implementation of score finding function.
Provides object for storing named sequnces.
struct ChainDatabaseGpu ChainDatabaseGpu
GPU database scoring object.
Definition: gpu_module.h:196
void ovEndDataGpu(int *queryEnd, int *targetEnd, int *outScore, Chain *query, Chain *target, Scorer *scorer, int score, int card, Thread *thread)
GPU implementation of the overlap scoring function.
ChainDatabaseGpu * chainDatabaseGpuCreate(Chain **database, int databaseLen, int *cards, int cardsLen)
ChainDatabaseGpu constructor.
void scoreDatabasesGpu(int **scores, int type, Chain **queries, int queriesLen, ChainDatabaseGpu *chainDatabaseGpu, Scorer *scorer, int *indexes, int indexesLen, int *cards, int cardsLen, Thread *thread)
GPU shotgun database aligning function.
void nwLinearDataGpu(int **scores, int **affines, Chain *query, int queryFrontGap, Chain *target, int targetFrontGap, Scorer *scorer, int pLeft, int pRight, int card, Thread *thread)
GPU implementation of Needleman-Wunsch scoring function.
void scoreDatabaseGpu(int **scores, int type, Chain *query, ChainDatabaseGpu *chainDatabaseGpu, Scorer *scorer, int *indexes, int indexesLen, int *cards, int cardsLen, Thread *thread)
GPU database aligning function.
void swEndDataGpu(int *queryEnd, int *targetEnd, int *outScore, int **scores, int **affines, Chain *query, Chain *target, Scorer *scorer, int score, int card, Thread *thread)
GPU implementation of Smith-Waterman scoring function.
struct Chain Chain
Chain object used for storing named sequnces.
Definition: chain.h:43
pthread_t Thread
Thread type.
Definition: thread.h:70