Skip to content

Commit

Permalink
Version update.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Sep 21, 2017
1 parent ab2eaef commit 66c7914
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 64 deletions.
14 changes: 6 additions & 8 deletions roaring.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on Thu 7 Sep 2017 15:45:07 EDT. Do not edit! */
/* auto-generated on Wed Sep 20 20:29:00 EDT 2017. Do not edit! */
#include "roaring.h"
/* begin file src/array_util.c */
#include <assert.h>
Expand All @@ -11,8 +11,7 @@
extern inline int32_t binarySearch(const uint16_t *array, int32_t lenarray,
uint16_t ikey);

#ifdef IS_X64

#ifdef USESSE4
// used by intersect_vector16
ALIGNED(0x1000)
static const uint8_t shuffle_mask16[] = {
Expand Down Expand Up @@ -639,7 +638,7 @@ int32_t difference_vector16(const uint16_t *__restrict__ A, size_t s_a,
return count;
}

#endif // IS_X64
#endif // USESSE4



Expand Down Expand Up @@ -1129,7 +1128,7 @@ int32_t xor_uint16(const uint16_t *array_1, int32_t card_1,
return pos_out;
}

#if defined(IS_X64)
#ifdef USESSE4

/***
* start of the SIMD 16-bit union code
Expand Down Expand Up @@ -1776,7 +1775,7 @@ uint32_t xor_vector16(const uint16_t *__restrict__ array1, uint32_t length1,
* End of SIMD 16-bit XOR code
*/

#endif // IS_X64
#endif // USESSE4

size_t union_uint32(const uint32_t *set_1, size_t size_1, const uint32_t *set_2,
size_t size_2, uint32_t *buffer) {
Expand Down Expand Up @@ -1879,8 +1878,7 @@ size_t union_uint32_card(const uint32_t *set_1, size_t size_1,
#include <string.h>


#if defined(IS_X64) || defined(USEAVX)

#ifdef IS_X64
static uint8_t lengthTable[256] = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4,
2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
Expand Down
120 changes: 69 additions & 51 deletions roaring.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* auto-generated on Thu 7 Sep 2017 15:45:07 EDT. Do not edit! */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring_version.h */
/* auto-generated on Wed Sep 20 20:29:00 EDT 2017. Do not edit! */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring_version.h */
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
#ifndef ROARING_INCLUDE_ROARING_VERSION
#define ROARING_INCLUDE_ROARING_VERSION
#define ROARING_VERSION = 0.2.33,
#define ROARING_VERSION = 0.2.34,
enum {
ROARING_VERSION_MAJOR = 0,
ROARING_VERSION_MINOR = 2,
ROARING_VERSION_REVISION = 33
ROARING_VERSION_REVISION = 34
};
#endif // ROARING_INCLUDE_ROARING_VERSION
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring_version.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/portability.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring_version.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/portability.h */
/*
* portability.h
*
Expand Down Expand Up @@ -58,14 +58,31 @@ enum {
#ifndef DISABLE_X64 // some users may want to compile as if they did not have
// an x64 processor

///////////////////////
/// We support X64 hardware in the following manner:
///
/// if IS_X64 is defined then we have at least SSE and SSE2
/// (All Intel processors sold in the recent past have at least SSE and SSE2 support,
/// going back to the Pentium 4.)
///
/// if USESSE4 is defined then we assume at least SSE4.2, SSE4.1,
/// SSSE3, SSE3... + IS_X64
/// if USEAVX is defined, then we assume AVX2, AVX + USESSE4
///
/// So if you have hardware that supports AVX but not AVX2, then "USEAVX"
/// won't be enabled.
/// If you have hardware that supports SSE4.1, but not SSE4.2, then USESSE4
/// won't be defined.
//////////////////////

// unless DISABLEAVX was defined, if we have __AVX2__, we enable AVX
#if (!defined(USEAVX)) && (!defined(DISABLEAVX)) && (defined(__AVX2__))
#define USEAVX
#endif

// if USEAVX was somehow defined and we lack __AVX2__, we disable it
#if defined(USEAVX) && ((!defined(__AVX2__)))
#undef USEAVX
// if we have __SSE4_2__, we enable SSE4
#if (defined(__POPCNT__)) && (defined(__SSE4_2__))
#define USESSE4
#endif

#if defined(USEAVX) || defined(__x86_64__) || defined(_M_X64)
Expand All @@ -85,6 +102,7 @@ enum {
#endif

#ifdef USEAVX
#define USESSE4 // if we have AVX, then we have SSE4
#define USE_BMI // we assume that AVX2 and BMI go hand and hand
#define USEAVX2FORDECODING // optimization
// vector operations should work on not just AVX
Expand Down Expand Up @@ -197,7 +215,7 @@ static inline void aligned_free(void *memblock) {
#define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100)

static inline int hamming(uint64_t x) {
#if defined(IS_X64) && defined(__POPCNT__)
#ifdef USESSE4
return _mm_popcnt_u64(x);
#else
// won't work under visual studio, but hopeful we have _mm_popcnt_u64 in
Expand All @@ -215,8 +233,8 @@ static inline int hamming(uint64_t x) {
#endif

#endif /* INCLUDE_PORTABILITY_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/portability.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/perfparameters.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/portability.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/perfparameters.h */
#ifndef PERFPARAMETERS_H_
#define PERFPARAMETERS_H_

Expand Down Expand Up @@ -254,8 +272,8 @@ enum { ARRAY_DEFAULT_INIT_SIZE = 0 };
#endif

#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/perfparameters.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/array_util.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/perfparameters.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/array_util.h */
#ifndef ARRAY_UTIL_H
#define ARRAY_UTIL_H

Expand Down Expand Up @@ -456,8 +474,8 @@ size_t union_uint32_card(const uint32_t *set_1, size_t size_1,
const uint32_t *set_2, size_t size_2);

#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/array_util.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring_types.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/array_util.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring_types.h */
/*
Typedefs used by various components
*/
Expand Down Expand Up @@ -506,8 +524,8 @@ typedef struct roaring_statistics_s {
} roaring_statistics_t;

#endif /* ROARING_TYPES_H */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring_types.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/utilasm.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring_types.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/utilasm.h */
/*
* utilasm.h
*
Expand Down Expand Up @@ -576,8 +594,8 @@ typedef struct roaring_statistics_s {

#endif // USE_BMI
#endif /* INCLUDE_UTILASM_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/utilasm.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/bitset_util.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/utilasm.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/bitset_util.h */
#ifndef BITSET_UTIL_H
#define BITSET_UTIL_H

Expand Down Expand Up @@ -1136,8 +1154,8 @@ AVXPOPCNTFNC(andnot, _mm256_andnot_si256)
#endif // USEAVX

#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/bitset_util.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/array.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/bitset_util.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/array.h */
/*
* array.h
*
Expand Down Expand Up @@ -1488,8 +1506,8 @@ inline int array_container_rank(const array_container_t *arr, uint16_t x) {
}

#endif /* INCLUDE_CONTAINERS_ARRAY_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/array.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/bitset.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/array.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/bitset.h */
/*
* bitset.h
*
Expand Down Expand Up @@ -1934,8 +1952,8 @@ uint16_t bitset_container_maximum(const bitset_container_t *container);
/* Returns the number of values equal or smaller than x */
int bitset_container_rank(const bitset_container_t *container, uint16_t x);
#endif /* INCLUDE_CONTAINERS_BITSET_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/bitset.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/run.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/bitset.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/run.h */
/*
* run.h
*
Expand Down Expand Up @@ -2384,8 +2402,8 @@ inline uint16_t run_container_maximum(const run_container_t *run) {
/* Returns the number of values equal or smaller than x */
int run_container_rank(const run_container_t *arr, uint16_t x);
#endif /* INCLUDE_CONTAINERS_RUN_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/run.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/convert.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/run.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/convert.h */
/*
* convert.h
*
Expand Down Expand Up @@ -2434,8 +2452,8 @@ void *convert_run_to_efficient_container(run_container_t *c,
void *convert_run_to_efficient_container_and_free(run_container_t *c,
uint8_t *typecode_after);
#endif /* INCLUDE_CONTAINERS_CONVERT_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/convert.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_equal.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/convert.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_equal.h */
/*
* mixed_equal.h
*
Expand Down Expand Up @@ -2463,8 +2481,8 @@ bool run_container_equals_bitset(const run_container_t* container1,
const bitset_container_t* container2);

#endif /* CONTAINERS_MIXED_EQUAL_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_equal.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_subset.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_equal.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_subset.h */
/*
* mixed_subset.h
*
Expand Down Expand Up @@ -2505,8 +2523,8 @@ bool bitset_container_is_subset_run(const bitset_container_t* container1,
const run_container_t* container2);

#endif /* CONTAINERS_MIXED_SUBSET_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_subset.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_andnot.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_subset.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_andnot.h */
/*
* mixed_andnot.h
*/
Expand Down Expand Up @@ -2664,8 +2682,8 @@ bool bitset_bitset_container_iandnot(bitset_container_t *src_1,
const bitset_container_t *src_2,
void **dst);
#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_andnot.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_intersection.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_andnot.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_intersection.h */
/*
* mixed_intersection.h
*
Expand Down Expand Up @@ -2754,8 +2772,8 @@ bool bitset_bitset_container_intersection_inplace(
bitset_container_t *src_1, const bitset_container_t *src_2, void **dst);

#endif /* INCLUDE_CONTAINERS_MIXED_INTERSECTION_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_intersection.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_negation.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_intersection.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_negation.h */
/*
* mixed_negation.h
*
Expand Down Expand Up @@ -2876,8 +2894,8 @@ int run_container_negation_range_inplace(run_container_t *src,
const int range_end, void **dst);

#endif /* INCLUDE_CONTAINERS_MIXED_NEGATION_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_negation.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_union.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_negation.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_union.h */
/*
* mixed_intersection.h
*
Expand Down Expand Up @@ -2958,8 +2976,8 @@ void run_bitset_container_lazy_union(const run_container_t *src_1,
bitset_container_t *dst);

#endif /* INCLUDE_CONTAINERS_MIXED_UNION_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_union.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_xor.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_union.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_xor.h */
/*
* mixed_xor.h
*
Expand Down Expand Up @@ -3110,8 +3128,8 @@ bool array_array_container_ixor(array_container_t *src_1,
int run_run_container_ixor(run_container_t *src_1, const run_container_t *src_2,
void **dst);
#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/mixed_xor.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/containers.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/mixed_xor.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/containers.h */
#ifndef CONTAINERS_CONTAINERS_H
#define CONTAINERS_CONTAINERS_H

Expand Down Expand Up @@ -5268,8 +5286,8 @@ static inline int container_rank(const void *container, uint8_t typecode,
}

#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/containers/containers.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring_array.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/containers/containers.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring_array.h */
#ifndef INCLUDE_ROARING_ARRAY_H
#define INCLUDE_ROARING_ARRAY_H
#ifdef __cplusplus
Expand Down Expand Up @@ -5554,8 +5572,8 @@ void ra_copy_range(roaring_array_t *ra, uint32_t begin, uint32_t end,
#endif

#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring_array.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/misc/configreport.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring_array.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/misc/configreport.h */
/*
* configreport.h
*
Expand Down Expand Up @@ -5734,8 +5752,8 @@ static inline void tellmeall() {
#endif

#endif /* INCLUDE_MISC_CONFIGREPORT_H_ */
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/misc/configreport.h */
/* begin file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/misc/configreport.h */
/* begin file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring.h */
/*
An implementation of Roaring Bitmaps in C.
*/
Expand Down Expand Up @@ -6323,4 +6341,4 @@ void roaring_free_uint32_iterator(roaring_uint32_iterator_t *it);
#endif

#endif
/* end file /Users/lemire/CVS/github/CRoaring/include/roaring/roaring.h */
/* end file /home/dlemire/CVS/github/CRoaring/include/roaring/roaring.h */
10 changes: 5 additions & 5 deletions roaring.hh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* auto-generated on Thu 7 Sep 2017 15:45:07 EDT. Do not edit! */
/* auto-generated on Wed Sep 20 20:29:00 EDT 2017. Do not edit! */
#include "roaring.h"
/* begin file /Users/lemire/CVS/github/CRoaring/cpp/roaring.hh */
/* begin file /home/dlemire/CVS/github/CRoaring/cpp/roaring.hh */
/*
A C++ header for Roaring Bitmaps.
*/
Expand Down Expand Up @@ -649,8 +649,8 @@ inline RoaringSetBitForwardIterator &Roaring::end() const {
}

#endif /* INCLUDE_ROARING_HH_ */
/* end file /Users/lemire/CVS/github/CRoaring/cpp/roaring.hh */
/* begin file /Users/lemire/CVS/github/CRoaring/cpp/roaring64map.hh */
/* end file /home/dlemire/CVS/github/CRoaring/cpp/roaring.hh */
/* begin file /home/dlemire/CVS/github/CRoaring/cpp/roaring64map.hh */
/*
A C++ header for 64-bit Roaring Bitmaps, implemented by way of a map of many
32-bit Roaring Bitmaps.
Expand Down Expand Up @@ -1566,4 +1566,4 @@ inline Roaring64MapSetBitForwardIterator Roaring64Map::end() const {
}

#endif /* INCLUDE_ROARING_64_MAP_HH_ */
/* end file /Users/lemire/CVS/github/CRoaring/cpp/roaring64map.hh */
/* end file /home/dlemire/CVS/github/CRoaring/cpp/roaring64map.hh */

0 comments on commit 66c7914

Please sign in to comment.