                     ref_length,
                     nvbio::plain_view( score_dvec ) );
             }
+            fprintf(stderr,"    %15s : ", "local");
+            {
+                batch_score_profile_all(
+                    aln::make_gotoh_aligner<aln::SEMI_GLOBAL,aln::TextBlockingTag>( scoring ),
+                    d_read_data.size(),
+                    d_read_data.read_index(),
+                    d_read_data.read_stream(),
+                    d_read_data.max_read_len(),
+                    nvbio::plain_view( d_ref_storage ),
+                    ref_length,
+                    nvbio::plain_view( score_dvec ) );
+            }
         }
+
+        #if defined(SSWLIB)
+        if (TEST_MASK & SSW)
+        {
+            fprintf(stderr,"  testing SSW scoring speed...\n");
+            fprintf(stderr,"    %15s : ", "local");
+
+            const int8 mat[4*4] = {2, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2};
+
+            const uint32 n_read_symbols = h_read_data->read_index()[ h_read_data->size() ];
+            std::vector<int8> unpacked_reads( n_read_symbols );
+
+            typedef io::ReadData::const_read_stream_type read_stream_type;
+
+            const read_stream_type packed_reads( h_read_data->read_stream() );
+
+            #pragma omp parallel for
+            for (int i = 0; i < n_read_symbols; ++i)
+                unpacked_reads[i] = packed_reads[i];
+
+            Timer timer;
+            timer.start();
+
+            #pragma omp parallel for
+            for (int i = 0; i < h_read_data->size(); ++i)
+            {
+                const uint32 read_off = h_read_data->read_index()[i];
+                const uint32 read_len = h_read_data->read_index()[i+1] - read_off;
+
+                s_profile* prof = ssw_init( &unpacked_reads[read_off], read_len, mat, 4, 2 );
+
+                s_align* align = ssw_align(
+                    prof, 
+					&unpacked_ref[0], 
+					ref_length, 
+					2, 
+					2,
+					0u,	
+					0u,
+					0,
+					15 );
+
+                align_destroy( align );
+
+                init_destroy( prof );
+            }
+
+            timer.stop();
+            const float time = timer.seconds();
+
+            fprintf(stderr,"  %5.1f", 1.0e-9f * float(h_read_data->size()*uint64(h_read_data->max_read_len())*uint64(ref_length))/time );
+            fprintf(stderr, " GCUPS\n");
+        }
+        #endif
     }
     fprintf(stderr,"sw-benchmark... done\n");
     return 0;

#include <vector>
#include <algorithm>

using namespace nvbio;

enum { CACHE_SIZE = 64 };


    thrust::device_vector<int16> score_dvec( batch_size, 0 );

  #if defined(SSWLIB)
    std::vector<int8> unpacked_ref( ref_length );
    {
        ref_stream_type h_ref_stream( nvbio::plain_view( h_ref_storage ) );
        for (uint32 i = 0; i < ref_length; ++i)
            unpacked_ref[i] = h_ref_stream[i];
    }

    // Now set the number of threads
    omp_set_num_threads( omp_get_num_procs() );
  #endif

    while (1)
    {
        io::ReadData* h_read_data = read_data_file->next( batch_size );
