Changeset 1906


Ignore:
Timestamp:
Jan 29, 2012, 9:20:04 AM (7 years ago)
Author:
cameron
Message:

Clear out cfzl/cfbl.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • proto/RE2PBS/re2pbs_demo_template.cpp

    r1470 r1906  
    1111#define OVERLAP_BUFSIZE (sizeof(SIMD_type))
    1212
     13#include "../lib/builtins.hpp"
    1314#include "../lib/carryQ.h"
    1415#include "../lib/perflib/perfsec.h"
     
    4243
    4344        for (blk = 0; blk < blk_count; blk++) {
    44                 ScanBlock s = stream[blk];
     45                scanword_t s = stream[blk];
    4546                while(s) {
    46                         int code = (ProcessPos(cfzl(s) + block_pos));
     47                        int code = (ProcessPos(scan_forward_zeroes(s) + block_pos));
    4748                        if (code) return code;
    4849                        s = s & (s-1);  // clear rightmost bit.
  • proto/RE2PBS/src/demo.cpp

    r1471 r1906  
    1111#define OVERLAP_BUFSIZE (sizeof(SIMD_type))
    1212
     13#include "../lib/builtins.hpp"
    1314#include "../lib/carryQ.h"
    1415#include "../lib/perflib/perfsec.h"
     
    4243
    4344        for (blk = 0; blk < blk_count; blk++) {
    44                 ScanBlock s = stream[blk];
     45                scanword_t s = stream[blk];
    4546                while(s) {
    46                         int code = (ProcessPos(cfzl(s) + block_pos));
     47                        int code = (ProcessPos(scan_forward_zeroes(s) + block_pos));
    4748                        if (code) return code;
    4849                        s = s & (s-1);  // clear rightmost bit.
  • proto/parabix2/pablo_template_multithreads.cpp

    r1468 r1906  
    1111#define OVERLAP_BUFSIZE 16
    1212
     13#include "../lib/builtins.hpp"
    1314#include "../lib/carryQ.h"
    1415#include "xmldecl.h"
     
    4950
    5051        for (blk = 0; blk < blk_count; blk++) {
    51                 ScanBlock s = stream[blk];
     52                scanword_t s = stream[blk];
    5253                while(s) {
    53                         int code = (ProcessPos(cfzl(s) + block_pos));
     54                        int code = (ProcessPos(scan_forward_zeroes(s) + block_pos));
    5455                        if (code) return code;
    5556                        s = s & (s-1);  // clear rightmost bit.
     
    5960        return 0;
    6061}
    61 
    6262
    6363static inline void ReportError(const char * error_msg, int error_pos_in_block) {
  • trunk/lib/builtins.hpp

    r1905 r1906  
    2525        }
    2626
    27         // DEPRECATED - USE scan_forward_zeroes
    28         #include <intrin.h>
    29         #pragma intrinsic(_BitScanForward)
    30         IDISA_ALWAYS_INLINE unsigned long cfzl(unsigned long x) { // Precondition: x != 0
    31                 unsigned long zeroes;
    32                 _BitScanForward(&zeroes, x);
    33                 return zeroes;
    34         }
    35 
    36         // DEPRECATED - USE scan_backward_zeroes
    37         IDISA_ALWAYS_INLINE unsigned long cbzl(unsigned long x) {
    38                 unsigned long zeroes;
    39                 _BitScanReverse(&zeroes, x);
    40                 return zeroes;
    41         }
    42 
    4327#elif defined (__GNUC__)
    4428
     
    4933        IDISA_ALWAYS_INLINE long unlikely(long x) {
    5034                return __builtin_expect(x, 0);
    51         }
    52 
    53         // DEPRECATED - USE scan_forward_zeroes
    54         IDISA_ALWAYS_INLINE unsigned long cfzl(unsigned long x) {
    55                 return __builtin_ctzl(x);
    56         }
    57 
    58         // DEPRECATED - USE scan_backward_zeroes
    59         IDISA_ALWAYS_INLINE unsigned long cbzl(unsigned long x) {
    60                 return __builtin_clzl(x);
    6135        }
    6236
Note: See TracChangeset for help on using the changeset viewer.