| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
#include <p7_config.h> |
| 24 |
|
| 25 |
#include <stdio.h> |
| 26 |
#include <math.h> |
| 27 |
|
| 28 |
|
| 29 |
#include "easel.h" |
| 30 |
#include "esl_neon.h" |
| 31 |
|
| 32 |
#include "hmmer.h" |
| 33 |
#include "impl_neon.h" |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
int |
| 67 |
p7_ViterbiScore(const ESL_DSQ *dsq, int L, const P7_OPROFILE *om, P7_OMX *ox, float *ret_sc) |
| 68 |
{ |
| 69 |
register float32x4_t mpv, dpv, ipv; |
| 70 |
register float32x4_t sv; |
| 71 |
register float32x4_t dcv; |
| 72 |
register float32x4_t xEv; |
| 73 |
register float32x4_t xBv; |
| 74 |
register float32x4_t Dmaxv; |
| 75 |
float32x4_t infv; |
| 76 |
float xN, xE, xB, xC, xJ; |
| 77 |
float Dmax; |
| 78 |
int i; |
| 79 |
int q; |
| 80 |
int Q = p7O_NQF(om->M); |
| 81 |
float32x4_t *dp = ox->dpf[0]; |
| 82 |
float32x4_t *rsc; |
| 83 |
float32x4_t *tsc; |
| 84 |
|
| 85 |
|
| 86 |
if (Q > ox->allocQ4) ESL_EXCEPTION(eslEINVAL, "DP matrix allocated too small"); |
| 87 |
ox->M = om->M; |
| 88 |
|
| 89 |
|
| 90 |
infv = vmovq_n_f32(-eslINFINITY); |
| 91 |
for (q = 0; q < Q; q++) |
| 92 |
MMXo(q) = IMXo(q) = DMXo(q) = infv; |
| 93 |
xN = 0.; |
| 94 |
xB = om->xf[p7O_N][p7O_MOVE]; |
| 95 |
xE = -eslINFINITY; |
| 96 |
xJ = -eslINFINITY; |
| 97 |
xC = -eslINFINITY; |
| 98 |
|
| 99 |
#if eslDEBUGLEVEL > 0 |
| 100 |
if (ox->debugging) p7_omx_DumpFloatRow(ox, FALSE, 0, 5, 2, xE, xN, xJ, xB, xC); |
| 101 |
#endif |
| 102 |
|
| 103 |
for (i = 1; i <= L; i++) |
| 104 |
{ |
| 105 |
rsc = om->rf[dsq[i]]; |
| 106 |
tsc = om->tf; |
| 107 |
dcv = infv; |
| 108 |
xEv = infv; |
| 109 |
Dmaxv = infv; |
| 110 |
xBv = vmovq_n_f32(xB); |
| 111 |
|
| 112 |
mpv = esl_neon_rightshift_float(MMXo(Q-1), infv); |
| 113 |
dpv = esl_neon_rightshift_float(DMXo(Q-1), infv); |
| 114 |
ipv = esl_neon_rightshift_float(IMXo(Q-1), infv); |
| 115 |
for (q = 0; q < Q; q++) |
| 116 |
{ |
| 117 |
|
| 118 |
sv = vaddq_f32(xBv, *tsc); tsc++; |
| 119 |
sv = vmaxq_f32(sv, vaddq_f32(mpv, *tsc)); tsc++; |
| 120 |
sv = vmaxq_f32(sv, vaddq_f32(ipv, *tsc)); tsc++; |
| 121 |
sv = vmaxq_f32(sv, vaddq_f32(dpv, *tsc)); tsc++; |
| 122 |
sv = vaddq_f32(sv, *rsc); rsc++; |
| 123 |
xEv = vmaxq_f32(xEv, sv); |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
mpv = MMXo(q); |
| 129 |
dpv = DMXo(q); |
| 130 |
ipv = IMXo(q); |
| 131 |
|
| 132 |
|
| 133 |
MMXo(q) = sv; |
| 134 |
DMXo(q) = dcv; |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
dcv = vaddq_f32(sv, *tsc); tsc++; |
| 140 |
Dmaxv = vmaxq_f32(dcv, Dmaxv); |
| 141 |
|
| 142 |
|
| 143 |
sv = vaddq_f32(mpv, *tsc); tsc++; |
| 144 |
sv = vmaxq_f32(sv, vaddq_f32(ipv, *tsc)); tsc++; |
| 145 |
IMXo(q) = vaddq_f32(sv, *rsc); rsc++; |
| 146 |
} |
| 147 |
|
| 148 |
|
| 149 |
esl_neon_hmax_f32(xEv, &xE); |
| 150 |
xN = xN + om->xf[p7O_N][p7O_LOOP]; |
| 151 |
xC = ESL_MAX(xC + om->xf[p7O_C][p7O_LOOP], xE + om->xf[p7O_E][p7O_MOVE]); |
| 152 |
xJ = ESL_MAX(xJ + om->xf[p7O_J][p7O_LOOP], xE + om->xf[p7O_E][p7O_LOOP]); |
| 153 |
xB = ESL_MAX(xJ + om->xf[p7O_J][p7O_MOVE], xN + om->xf[p7O_N][p7O_MOVE]); |
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
esl_neon_hmax_f32(Dmaxv, &Dmax); |
| 171 |
if (Dmax + om->ddbound_f > xB) |
| 172 |
{ |
| 173 |
|
| 174 |
|
| 175 |
dcv = esl_neon_rightshift_float(dcv, infv); |
| 176 |
tsc = om->tf + 7*Q; |
| 177 |
for (q = 0; q < Q; q++) |
| 178 |
{ |
| 179 |
DMXo(q) = vmaxq_f32(dcv, DMXo(q)); |
| 180 |
dcv = vaddq_f32(DMXo(q), *tsc); tsc++; |
| 181 |
} |
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
do { |
| 188 |
dcv = esl_neon_rightshift_float(dcv, infv); |
| 189 |
tsc = om->tf + 7*Q; |
| 190 |
for (q = 0; q < Q; q++) |
| 191 |
{ |
| 192 |
if (! esl_neon_any_gt_s16(dcv, DMXo(q))) break; |
| 193 |
DMXo(q) = vmaxq_f32(dcv, DMXo(q)); |
| 194 |
dcv = vaddq_f32(DMXo(q), *tsc); tsc++; |
| 195 |
} |
| 196 |
} while (q == Q); |
| 197 |
} |
| 198 |
else |
| 199 |
{ |
| 200 |
dcv = esl_neon_rightshift_float(dcv, infv); |
| 201 |
DMXo(0) = dcv; |
| 202 |
} |
| 203 |
|
| 204 |
#if eslDEBUGLEVEL > 0 |
| 205 |
if (ox->debugging) p7_omx_DumpFloatRow(ox, FALSE, i, 5, 2, xE, xN, xJ, xB, xC); |
| 206 |
#endif |
| 207 |
} |
| 208 |
|
| 209 |
|
| 210 |
*ret_sc = xC + om->xf[p7O_C][p7O_MOVE]; |
| 211 |
return eslOK; |
| 212 |
} |
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
#ifdef p7VITSCORE_BENCHMARK |
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
#include <p7_config.h> |
| 231 |
|
| 232 |
#include "easel.h" |
| 233 |
#include "esl_alphabet.h" |
| 234 |
#include "esl_getopts.h" |
| 235 |
#include "esl_random.h" |
| 236 |
#include "esl_randomseq.h" |
| 237 |
#include "esl_stopwatch.h" |
| 238 |
|
| 239 |
#include "hmmer.h" |
| 240 |
#include "impl_neon.h" |
| 241 |
|
| 242 |
static ESL_OPTIONS options[] = { |
| 243 |
|
| 244 |
{ "-h", eslARG_NONE, FALSE, NULL, NULL, NULL, NULL, NULL, "show brief help on version and usage", 0 }, |
| 245 |
{ "-c", eslARG_NONE, FALSE, NULL, NULL, NULL, NULL, "-x", "compare scores to generic implementation (debug)", 0 }, |
| 246 |
{ "-s", eslARG_INT, "42", NULL, NULL, NULL, NULL, NULL, "set random number seed to <n>", 0 }, |
| 247 |
{ "-x", eslARG_NONE, FALSE, NULL, NULL, NULL, NULL, "-c", "equate scores to trusted implementation (debug)", 0 }, |
| 248 |
{ "-L", eslARG_INT, "400", NULL, "n>0", NULL, NULL, NULL, "length of random target seqs", 0 }, |
| 249 |
{ "-N", eslARG_INT, "50000", NULL, "n>0", NULL, NULL, NULL, "number of random target seqs", 0 }, |
| 250 |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
| 251 |
}; |
| 252 |
static char usage[] = "[-options] <hmmfile>"; |
| 253 |
static char banner[] = "benchmark driver for NEON ViterbiScore()"; |
| 254 |
|
| 255 |
int |
| 256 |
main(int argc, char **argv) |
| 257 |
{ |
| 258 |
ESL_GETOPTS *go = p7_CreateDefaultApp(options, 1, argc, argv, banner, usage); |
| 259 |
char *hmmfile = esl_opt_GetArg(go, 1); |
| 260 |
ESL_STOPWATCH *w = esl_stopwatch_Create(); |
| 261 |
ESL_RANDOMNESS *r = esl_randomness_CreateFast(esl_opt_GetInteger(go, "-s")); |
| 262 |
ESL_ALPHABET *abc = NULL; |
| 263 |
P7_HMMFILE *hfp = NULL; |
| 264 |
P7_HMM *hmm = NULL; |
| 265 |
P7_BG *bg = NULL; |
| 266 |
P7_PROFILE *gm = NULL; |
| 267 |
P7_OPROFILE *om = NULL; |
| 268 |
P7_OMX *ox = NULL; |
| 269 |
P7_GMX *gx = NULL; |
| 270 |
int L = esl_opt_GetInteger(go, "-L"); |
| 271 |
int N = esl_opt_GetInteger(go, "-N"); |
| 272 |
ESL_DSQ *dsq = malloc(sizeof(ESL_DSQ) * (L+2)); |
| 273 |
int i; |
| 274 |
float sc1, sc2; |
| 275 |
double base_time, bench_time, Mcs; |
| 276 |
|
| 277 |
if (p7_hmmfile_Open(hmmfile, NULL, &hfp, NULL) != eslOK) p7_Fail("Failed to open HMM file %s", hmmfile); |
| 278 |
if (p7_hmmfile_Read(hfp, &abc, &hmm) != eslOK) p7_Fail("Failed to read HMM"); |
| 279 |
|
| 280 |
bg = p7_bg_Create(abc); |
| 281 |
p7_bg_SetLength(bg, L); |
| 282 |
gm = p7_profile_Create(hmm->M, abc); |
| 283 |
p7_ProfileConfig(hmm, bg, gm, L, p7_LOCAL); |
| 284 |
om = p7_oprofile_Create(gm->M, abc); |
| 285 |
p7_oprofile_Convert(gm, om); |
| 286 |
p7_oprofile_ReconfigLength(om, L); |
| 287 |
p7_oprofile_Logify(om); |
| 288 |
|
| 289 |
ox = p7_omx_Create(gm->M, 0, 0); |
| 290 |
gx = p7_gmx_Create(gm->M, L); |
| 291 |
|
| 292 |
|
| 293 |
esl_stopwatch_Start(w); |
| 294 |
for (i = 0; i < N; i++) |
| 295 |
esl_rsq_xfIID(r, bg->f, abc->K, L, dsq); |
| 296 |
esl_stopwatch_Stop(w); |
| 297 |
base_time = w->user; |
| 298 |
|
| 299 |
|
| 300 |
esl_stopwatch_Start(w); |
| 301 |
for (i = 0; i < N; i++) |
| 302 |
{ |
| 303 |
esl_rsq_xfIID(r, bg->f, abc->K, L, dsq); |
| 304 |
p7_ViterbiScore (dsq, L, om, ox, &sc1); |
| 305 |
|
| 306 |
if (esl_opt_GetBoolean(go, "-c") || esl_opt_GetBoolean(go, "-x")) |
| 307 |
{ |
| 308 |
p7_GViterbi(dsq, L, gm, gx, &sc2); |
| 309 |
printf("%.4f %.4f\n", sc1, sc2); |
| 310 |
} |
| 311 |
} |
| 312 |
esl_stopwatch_Stop(w); |
| 313 |
bench_time = w->user - base_time; |
| 314 |
Mcs = (double) N * (double) L * (double) gm->M * 1e-6 / (double) bench_time; |
| 315 |
esl_stopwatch_Display(stdout, w, "# CPU time: "); |
| 316 |
printf("# M = %d\n", gm->M); |
| 317 |
printf("# %.1f Mc/s\n", Mcs); |
| 318 |
|
| 319 |
free(dsq); |
| 320 |
p7_omx_Destroy(ox); |
| 321 |
p7_gmx_Destroy(gx); |
| 322 |
p7_oprofile_Destroy(om); |
| 323 |
p7_profile_Destroy(gm); |
| 324 |
p7_bg_Destroy(bg); |
| 325 |
p7_hmm_Destroy(hmm); |
| 326 |
p7_hmmfile_Close(hfp); |
| 327 |
esl_alphabet_Destroy(abc); |
| 328 |
esl_stopwatch_Destroy(w); |
| 329 |
esl_randomness_Destroy(r); |
| 330 |
esl_getopts_Destroy(go); |
| 331 |
return 0; |
| 332 |
} |
| 333 |
#endif |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
#ifdef p7VITSCORE_TESTDRIVE |
| 342 |
#include "esl_random.h" |
| 343 |
#include "esl_randomseq.h" |
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
static void |
| 352 |
utest_viterbi_score(ESL_RANDOMNESS *r, ESL_ALPHABET *abc, P7_BG *bg, int M, int L, int N) |
| 353 |
{ |
| 354 |
P7_HMM *hmm = NULL; |
| 355 |
P7_PROFILE *gm = NULL; |
| 356 |
P7_OPROFILE *om = NULL; |
| 357 |
ESL_DSQ *dsq = malloc(sizeof(ESL_DSQ) * (L+2)); |
| 358 |
P7_OMX *ox = p7_omx_Create(M, 0, 0); |
| 359 |
P7_GMX *gx = p7_gmx_Create(M, L); |
| 360 |
float sc1, sc2; |
| 361 |
|
| 362 |
p7_oprofile_Sample(r, abc, bg, M, L, &hmm, &gm, &om); |
| 363 |
p7_oprofile_Logify(om); |
| 364 |
while (N--) |
| 365 |
{ |
| 366 |
esl_rsq_xfIID(r, bg->f, abc->K, L, dsq); |
| 367 |
|
| 368 |
p7_ViterbiScore(dsq, L, om, ox, &sc1); |
| 369 |
p7_GViterbi (dsq, L, gm, gx, &sc2); |
| 370 |
|
| 371 |
if (fabs(sc1-sc2) > 0.001) esl_fatal("viterbi score unit test failed: scores differ"); |
| 372 |
} |
| 373 |
|
| 374 |
free(dsq); |
| 375 |
p7_hmm_Destroy(hmm); |
| 376 |
p7_omx_Destroy(ox); |
| 377 |
p7_gmx_Destroy(gx); |
| 378 |
p7_profile_Destroy(gm); |
| 379 |
p7_oprofile_Destroy(om); |
| 380 |
} |
| 381 |
#endif |
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
#ifdef p7VITSCORE_TESTDRIVE |
| 388 |
|
| 389 |
#include <p7_config.h> |
| 390 |
|
| 391 |
#include "easel.h" |
| 392 |
#include "esl_alphabet.h" |
| 393 |
#include "esl_getopts.h" |
| 394 |
|
| 395 |
#include "hmmer.h" |
| 396 |
#include "impl_neon.h" |
| 397 |
|
| 398 |
static ESL_OPTIONS options[] = { |
| 399 |
|
| 400 |
{ "-h", eslARG_NONE, FALSE, NULL, NULL, NULL, NULL, NULL, "show brief help on version and usage", 0 }, |
| 401 |
{ "-s", eslARG_INT, "42", NULL, NULL, NULL, NULL, NULL, "set random number seed to <n>", 0 }, |
| 402 |
{ "-L", eslARG_INT, "200", NULL, NULL, NULL, NULL, NULL, "size of random sequences to sample", 0 }, |
| 403 |
{ "-M", eslARG_INT, "145", NULL, NULL, NULL, NULL, NULL, "size of random models to sample", 0 }, |
| 404 |
{ "-N", eslARG_INT, "100", NULL, NULL, NULL, NULL, NULL, "number of random sequences to sample", 0 }, |
| 405 |
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
| 406 |
}; |
| 407 |
static char usage[] = "[-options]"; |
| 408 |
static char banner[] = "test driver for the NEON implementation"; |
| 409 |
|
| 410 |
int |
| 411 |
main(int argc, char **argv) |
| 412 |
{ |
| 413 |
ESL_GETOPTS *go = p7_CreateDefaultApp(options, 0, argc, argv, banner, usage); |
| 414 |
ESL_RANDOMNESS *r = esl_randomness_CreateFast(esl_opt_GetInteger(go, "-s")); |
| 415 |
ESL_ALPHABET *abc = NULL; |
| 416 |
P7_BG *bg = NULL; |
| 417 |
int M = esl_opt_GetInteger(go, "-M"); |
| 418 |
int L = esl_opt_GetInteger(go, "-L"); |
| 419 |
int N = esl_opt_GetInteger(go, "-N"); |
| 420 |
|
| 421 |
|
| 422 |
if ((abc = esl_alphabet_Create(eslDNA)) == NULL) esl_fatal("failed to create alphabet"); |
| 423 |
if ((bg = p7_bg_Create(abc)) == NULL) esl_fatal("failed to create null model"); |
| 424 |
|
| 425 |
utest_viterbi_score(r, abc, bg, M, L, N); |
| 426 |
utest_viterbi_score(r, abc, bg, 1, L, 10); |
| 427 |
utest_viterbi_score(r, abc, bg, M, 1, 10); |
| 428 |
|
| 429 |
esl_alphabet_Destroy(abc); |
| 430 |
p7_bg_Destroy(bg); |
| 431 |
|
| 432 |
|
| 433 |
if ((abc = esl_alphabet_Create(eslAMINO)) == NULL) esl_fatal("failed to create alphabet"); |
| 434 |
if ((bg = p7_bg_Create(abc)) == NULL) esl_fatal("failed to create null model"); |
| 435 |
|
| 436 |
utest_viterbi_score(r, abc, bg, M, L, N); |
| 437 |
utest_viterbi_score(r, abc, bg, 1, L, 10); |
| 438 |
utest_viterbi_score(r, abc, bg, M, 1, 10); |
| 439 |
|
| 440 |
esl_alphabet_Destroy(abc); |
| 441 |
p7_bg_Destroy(bg); |
| 442 |
|
| 443 |
esl_getopts_Destroy(go); |
| 444 |
esl_randomness_Destroy(r); |
| 445 |
return eslOK; |
| 446 |
} |
| 447 |
#endif |
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
#ifdef p7VITSCORE_EXAMPLE |
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
#include <p7_config.h> |
| 462 |
|
| 463 |
#include "easel.h" |
| 464 |
#include "esl_alphabet.h" |
| 465 |
#include "esl_sq.h" |
| 466 |
#include "esl_sqio.h" |
| 467 |
|
| 468 |
#include "hmmer.h" |
| 469 |
#include "impl_neon.h" |
| 470 |
|
| 471 |
int |
| 472 |
main(int argc, char **argv) |
| 473 |
{ |
| 474 |
char *hmmfile = argv[1]; |
| 475 |
char *seqfile = argv[2]; |
| 476 |
ESL_ALPHABET *abc = NULL; |
| 477 |
P7_HMMFILE *hfp = NULL; |
| 478 |
P7_HMM *hmm = NULL; |
| 479 |
P7_BG *bg = NULL; |
| 480 |
P7_PROFILE *gm = NULL; |
| 481 |
P7_OPROFILE *om = NULL; |
| 482 |
P7_OMX *ox = NULL; |
| 483 |
P7_GMX *gx = NULL; |
| 484 |
ESL_SQ *sq = NULL; |
| 485 |
ESL_SQFILE *sqfp = NULL; |
| 486 |
int format = eslSQFILE_UNKNOWN; |
| 487 |
float sc; |
| 488 |
int status; |
| 489 |
|
| 490 |
|
| 491 |
if (p7_hmmfile_Open(hmmfile, NULL, &hfp, NULL) != eslOK) p7_Fail("Failed to open HMM file %s", hmmfile); |
| 492 |
if (p7_hmmfile_Read(hfp, &abc, &hmm) != eslOK) p7_Fail("Failed to read HMM"); |
| 493 |
|
| 494 |
|
| 495 |
sq = esl_sq_CreateDigital(abc); |
| 496 |
status = esl_sqfile_Open(seqfile, format, NULL, &sqfp); |
| 497 |
if (status == eslENOTFOUND) p7_Fail("No such file."); |
| 498 |
else if (status == eslEFORMAT) p7_Fail("Format unrecognized."); |
| 499 |
else if (status == eslEINVAL) p7_Fail("Can't autodetect stdin or .gz."); |
| 500 |
else if (status != eslOK) p7_Fail("Open failed, code %d.", status); |
| 501 |
if (esl_sqio_Read(sqfp, sq) != eslOK) p7_Fail("Failed to read sequence"); |
| 502 |
|
| 503 |
|
| 504 |
bg = p7_bg_Create(abc); |
| 505 |
p7_bg_SetLength(bg, sq->n); |
| 506 |
gm = p7_profile_Create(hmm->M, abc); |
| 507 |
p7_ProfileConfig(hmm, bg, gm, sq->n, p7_LOCAL); |
| 508 |
om = p7_oprofile_Create(gm->M, abc); |
| 509 |
p7_oprofile_Convert(gm, om); |
| 510 |
p7_oprofile_Logify(om); |
| 511 |
|
| 512 |
|
| 513 |
ox = p7_omx_Create(gm->M, 0, sq->n); |
| 514 |
gx = p7_gmx_Create(gm->M, sq->n); |
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
p7_ViterbiScore(sq->dsq, sq->n, om, ox, &sc); printf("viterbi score (NEON): %.2f nats\n", sc); |
| 523 |
p7_GViterbi (sq->dsq, sq->n, gm, gx, &sc); printf("viterbi (generic): %.2f nats\n", sc); |
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
esl_sq_Destroy(sq); |
| 531 |
esl_sqfile_Close(sqfp); |
| 532 |
p7_omx_Destroy(ox); |
| 533 |
p7_gmx_Destroy(gx); |
| 534 |
p7_oprofile_Destroy(om); |
| 535 |
p7_profile_Destroy(gm); |
| 536 |
p7_bg_Destroy(bg); |
| 537 |
p7_hmm_Destroy(hmm); |
| 538 |
p7_hmmfile_Close(hfp); |
| 539 |
esl_alphabet_Destroy(abc); |
| 540 |
return 0; |
| 541 |
} |
| 542 |
#endif |
| 543 |
|