Changeset 1427


Ignore:
Timestamp:
Sep 9, 2011, 2:17:04 PM (8 years ago)
Author:
vla24
Message:

SymbolTable?: committing some files that I forgot to commit..

Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/symtab/Makefile

    r1229 r1427  
    33CFLAGS= $(SSE) -O3
    44SRCFILE=ls_symbol_table.cxx hash_symbol_table.cpp symtab.cxx
     5INCLUDES_IDISA = -I../../../../trunk/libgen/idisa_lib/
    56
    67PAPI_DIR=/usr/local/papi-4.0.0
     
    2122        ar -rs libsymtab.a *.o  # $(AFLAGS) $(PAPI)
    2223
     24lib_idisa:obj_idisa
     25        ar -rs libsymtab.a *.o  # $(AFLAGS) $(PAPI)
     26
    2327obj:    $(SRCFILE)
    24         $(CC) -c $(SRCFILE)  # $(AFLAGS) $(PAPI)
     28        $(CC) -c $(SRCFILE) # $(AFLAGS) $(PAPI)
     29
     30obj_idisa:$(SRCFILE)
     31        $(CC) $(INCLUDES_IDISA) -c $(SRCFILE) -DUSE_IDISA # $(AFLAGS) $(PAPI)
     32
    2533
    2634clean:
  • trunk/lib/symtab/ls_symbol_table.cxx

    r1229 r1427  
    44#include <string>
    55#include <iostream>
     6#include "library_conversion.h"
     7
    68using namespace std;
    79
     
    886888
    887889                        result_gid = simd_or(result_gid, simd_and(cmp_eq_mask_128, crt_gid_mask_128));
    888                         done_mask_16 |= simd<8>::movemask(cmp_eq_mask_128);
     890                        done_mask_16 |= simdLibConvert<8>::movemask(cmp_eq_mask_128);
    889891
    890892#ifdef SYMBOL_TABLE_DEBUG
     
    973975#endif
    974976                        result_gid = simd_or(result_gid, simd_and(cmp_eq_mask_128, crt_gid_mask_128));
    975                         done_mask_16 |= simd<8>::movemask(cmp_eq_mask_128);
     977                        done_mask_16 |= simdLibConvert<8>::movemask(cmp_eq_mask_128);
    976978                                               
    977979                        if(exit_cond_mask_16 == done_mask_16) {
     
    12481250        SIMD_type lo, hi;
    12491251
    1250         lo = simd<fw<1>::value>::mergel(simd<1>::constant<0>(), value);
    1251         hi = simd<fw<1>::value>::mergeh(simd<1>::constant<0>(), value);
     1252        lo = simdLibConvert<fw<1>::value>::mergel(simd<1>::constant<0>(), value);
     1253        hi = simdLibConvert<fw<1>::value>::mergeh(simd<1>::constant<0>(), value);
    12521254
    12531255        SIMD_type v[4];
    12541256
    1255         v[0] = simd<fw<2>::value>::mergel(simd<2>::constant<0>(), lo);
    1256         v[1] = simd<fw<2>::value>::mergeh(simd<2>::constant<0>(), lo);
    1257         v[2] = simd<fw<2>::value>::mergel(simd<2>::constant<0>(), hi);
    1258         v[3] = simd<fw<2>::value>::mergeh(simd<2>::constant<0>(), hi);
     1257        v[0] = simdLibConvert<fw<2>::value>::mergel(simd<2>::constant<0>(), lo);
     1258        v[1] = simdLibConvert<fw<2>::value>::mergeh(simd<2>::constant<0>(), lo);
     1259        v[2] = simdLibConvert<fw<2>::value>::mergel(simd<2>::constant<0>(), hi);
     1260        v[3] = simdLibConvert<fw<2>::value>::mergeh(simd<2>::constant<0>(), hi);
    12591261
    12601262        uint32_t push_count;
     
    12691271        SIMD_type v[2];
    12701272
    1271         v[0] = simd<fw<2>::value>::mergel(simd<2>::constant<0>(), value);
    1272         v[1] = simd<fw<2>::value>::mergeh(simd<2>::constant<0>(), value);
     1273        v[0] = simdLibConvert<fw<2>::value>::mergel(simd<2>::constant<0>(), value);
     1274        v[1] = simdLibConvert<fw<2>::value>::mergeh(simd<2>::constant<0>(), value);
    12731275
    12741276        uint32_t push_count;
     
    12911293template<>
    12921294inline void LSSymbolTable::push_gid<5>(const SIMD_type value, const uint32_t count) {
    1293         SIMD_type t1 = simd<64>::pack(simd<1>::constant<0>(), value);
     1295        SIMD_type t1 = simdLibConvert<64>::pack(simd<1>::constant<0>(), value);
    12941296        packed_gids_->push_back(5, (uint32_t *) (&t1), count);
    12951297}
     
    12971299template<>
    12981300inline void LSSymbolTable::push_gid<6>(const SIMD_type value, const uint32_t count) {
    1299         SIMD_type t1 = simd<64>::pack(simd<1>::constant<0>(), value);
     1301        SIMD_type t1 = simdLibConvert<64>::pack(simd<1>::constant<0>(), value);
    13001302        packed_gids_->push_back(6, (uint32_t *) (&t1), count);
    13011303}
     
    13031305template<>
    13041306inline void LSSymbolTable::push_gid<7>(const SIMD_type value, const uint32_t count) {
    1305         SIMD_type t1 = simd<64>::pack(simd<1>::constant<0>(), value);
     1307        SIMD_type t1 = simdLibConvert<64>::pack(simd<1>::constant<0>(), value);
    13061308        packed_gids_->push_back(7, (uint32_t *) (&t1), count);
    13071309}
     
    13091311template<>
    13101312inline void LSSymbolTable::push_gid<8>(const SIMD_type value, const uint32_t count) {
    1311         SIMD_type t1 = simd<64>::pack(simd<1>::constant<0>(), value);
     1313        SIMD_type t1 = simdLibConvert<64>::pack(simd<1>::constant<0>(), value);
    13121314        packed_gids_->push_back(8, (uint32_t *) (&t1), count);
    13131315}
     
    13241326        uint32_t lgth;
    13251327        for (size_t lgth = 1; lgth < this->packed_gids_->rows(); lgth++) {
    1326                 printf("%29s%d = ", "L", lgth);
     1328                printf("%29s%zu = ", "L", lgth);
    13271329                for (size_t i = 0; i < packed_gids_->size(lgth); i++) {
    13281330                        printf("%d ", packed_gids_->get(lgth, i));
     
    13391341        uint32_t lgth;
    13401342        for (size_t lgth = 1; lgth < this->symbol_index_->rows(); lgth++) {
    1341                 printf("%29s%d = ", "L", lgth);
     1343                printf("%29s%zu = ", "L", lgth);
    13421344                for (size_t i = 0; i < this->symbol_index_->size(lgth); i++) {
    13431345                        printf("%d ", symbol_index_->get(lgth, i));
     
    13951397        for(i=0;i<total_bytes;i+=sizeof(SIMD_type)) {
    13961398                SIMD_type value = sisd_load_aligned((SIMD_type *)&this->symbol_values_->get(L,i));
    1397                 print_simd_register("Symbol", value);
     1399                simdLibConvert<1>::print_simd_register("Symbol", value);
    13981400        }
    13991401        printf("\n");
  • trunk/lib/symtab/ls_symbol_table_compare.h

    r1229 r1427  
    1111#define LS_SYMBOL_TABLE_COMPARE_H_
    1212
     13#ifdef USE_IDISA
     14#include <idisa.hpp>
     15#else
    1316#define TEMPLATED_SIMD_LIB
    1417#include "../lib_simd.h"
     18#endif
     19
    1520#include <string.h>
    1621
  • trunk/lib/symtab/ls_symbol_table_util.h

    r1229 r1427  
    99#define LS_SYMBOL_TABLE_UTIL_H_
    1010
    11 #define TEMPLATED_SIMD_LIB
    12 #include "../lib_simd.h"
     11#include "library_conversion.h"
    1312
    1413// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
     
    242241inline SIMD_type key_mask_splat<8>(const unsigned char * p) {
    243242  uint8_t temp = convert<8>(p);
    244   return simd<8>::splat(sisd_load_unaligned((SIMD_type *) &temp));
     243  return simdLibConvert<8>::splat(sisd_load_unaligned((SIMD_type *) &temp));
    245244}
    246245
     
    248247inline SIMD_type key_mask_splat<16>(const unsigned char * p) {
    249248  uint16_t temp = convert<16>(p);
    250   return simd<16>::splat(sisd_load_unaligned((SIMD_type *) &temp));
     249  return simdLibConvert<16>::splat(sisd_load_unaligned((SIMD_type *) &temp));
    251250}
    252251
     
    254253inline SIMD_type key_mask_splat<32>(const unsigned char * p) {
    255254  uint32_t temp = convert<32>(p);
    256   return simd<32>::splat(sisd_load_unaligned((SIMD_type *) &temp));
     255  return simdLibConvert<32>::splat(sisd_load_unaligned((SIMD_type *) &temp));
    257256}
    258257
     
    260259inline SIMD_type key_mask_splat<64>(const unsigned char * p) {
    261260  uint64_t temp = convert<64>(p);
    262   return simd<64>::splat(sisd_load_unaligned((SIMD_type *) &temp));
     261  return simdLibConvert<64>::splat(sisd_load_unaligned((SIMD_type *) &temp));
    263262}
    264263
  • trunk/lib/symtab/pbgs_utilities.h

    r1391 r1427  
    1717//#define USE_MASK_COMPARE    //Comparison using masking technique.
    1818                              //This technique only applies for USE_LOG_SORT
     19
     20#ifdef USE_IDISA
     21#include <idisa.hpp>
     22#else
     23#define TEMPLATED_SIMD_LIB
    1924#include "../lib_simd.h"
     25#endif
     26
    2027#include "ls_symbol_table_compare.h"
    21 
    22 #define TEMPLATED_SIMD_LIB
    2328#define DEBUG_EQUAL_COMPARE 0
    2429
Note: See TracChangeset for help on using the changeset viewer.