| … | … | @@ -684,6 +684,10 @@ intintHash_Factory *intintHash_CreateFactory(int hashTypes, int *emptyValue, |
| 684 | 684 | intintIdentityPerfectCLHash_CreateFactory(factory, |
| 685 | 685 | hashIndex); |
| 686 | 686 | break; |
| 687 | case IDENTITY_PERFECT_OPENMP_HASH_ID: |
| 688 | intintIdentityPerfectOpenMPHash_CreateFactory(factory, |
| 689 | hashIndex); |
| 690 | break; |
| 687 | 691 | case IDENTITY_SENTINEL_PERFECT_HASH_ID: |
| 688 | 692 | intintIdentitySentinelPerfectHash_CreateFactory(factory, |
| 689 | 693 | hashIndex); |
| … | … | @@ -692,6 +696,10 @@ intintHash_Factory *intintHash_CreateFactory(int hashTypes, int *emptyValue, |
| 692 | 696 | intintIdentitySentinelPerfectCLHash_CreateFactory |
| 693 | 697 | (factory, hashIndex); |
| 694 | 698 | break; |
| 699 | case IDENTITY_SENTINEL_PERFECT_OPENMP_HASH_ID: |
| 700 | intintIdentitySentinelPerfectOpenMPHash_CreateFactory |
| 701 | (factory, hashIndex); |
| 702 | break; |
| 695 | 703 | case LCG_LINEAR_OPEN_COMPACT_HASH_ID: |
| 696 | 704 | intintLCGLinearOpenCompactHash_CreateFactory(factory, |
| 697 | 705 | hashIndex); |
| … | … | @@ -700,6 +708,10 @@ intintHash_Factory *intintHash_CreateFactory(int hashTypes, int *emptyValue, |
| 700 | 708 | intintLCGLinearOpenCompactCLHash_CreateFactory(factory, |
| 701 | 709 | hashIndex); |
| 702 | 710 | break; |
| 711 | case LCG_LINEAR_OPEN_COMPACT_OPENMP_HASH_ID: |
| 712 | intintLCGLinearOpenCompactOpenMPHash_CreateFactory |
| 713 | (factory, hashIndex); |
| 714 | break; |
| 703 | 715 | case LCG_QUADRATIC_OPEN_COMPACT_HASH_ID: |
| 704 | 716 | intintLCGQuadraticOpenCompactHash_CreateFactory(factory, |
| 705 | 717 | hashIndex); |
| … | … | @@ -708,14 +720,18 @@ intintHash_Factory *intintHash_CreateFactory(int hashTypes, int *emptyValue, |
| 708 | 720 | intintLCGQuadraticOpenCompactCLHash_CreateFactory |
| 709 | 721 | (factory, hashIndex); |
| 710 | 722 | break; |
| 723 | case LCG_QUADRATIC_OPEN_COMPACT_OPENMP_HASH_ID: |
| 724 | intintLCGQuadraticOpenCompactOpenMPHash_CreateFactory |
| 725 | (factory, hashIndex); |
| 726 | break; |
| 711 | 727 | } |
| 712 | 728 | } |
| 713 | 729 | return factory; |
| 714 | 730 | } |
| 715 | 731 | int intintHash_DestroyFactory(intintHash_Factory * factory) { |
| 716 | | int hashType; |
| 717 | | for (int hashIndex = 0; hashIndex < HASH_NUM_HASHES; |
| 718 | | hashType = 1 << hashIndex) { |
| 732 | int hashType = 1; |
| 733 | for (int hashIndex = 0; hashIndex < HASH_NUM_HASHES; hashIndex++) { |
| 734 | hashType = 1 << hashIndex; |
| 719 | 735 | switch (hashType & factory->hashTypesAvailable) { |
| 720 | 736 | case IDENTITY_PERFECT_HASH_ID: |
| 721 | 737 | intintIdentityPerfectHash_DestroyFactory(factory, |
| … | … | @@ -725,6 +741,10 @@ int intintHash_DestroyFactory(intintHash_Factory * factory) { |
| 725 | 741 | intintIdentityPerfectCLHash_DestroyFactory(factory, |
| 726 | 742 | hashIndex); |
| 727 | 743 | break; |
| 744 | case IDENTITY_PERFECT_OPENMP_HASH_ID: |
| 745 | intintIdentityPerfectOpenMPHash_DestroyFactory(factory, |
| 746 | hashIndex); |
| 747 | break; |
| 728 | 748 | case IDENTITY_SENTINEL_PERFECT_HASH_ID: |
| 729 | 749 | intintIdentitySentinelPerfectHash_DestroyFactory |
| 730 | 750 | (factory, hashIndex); |
| … | … | @@ -733,6 +753,10 @@ int intintHash_DestroyFactory(intintHash_Factory * factory) { |
| 733 | 753 | intintIdentitySentinelPerfectCLHash_DestroyFactory |
| 734 | 754 | (factory, hashIndex); |
| 735 | 755 | break; |
| 756 | case IDENTITY_SENTINEL_PERFECT_OPENMP_HASH_ID: |
| 757 | intintIdentitySentinelPerfectOpenMPHash_DestroyFactory |
| 758 | (factory, hashIndex); |
| 759 | break; |
| 736 | 760 | case LCG_LINEAR_OPEN_COMPACT_HASH_ID: |
| 737 | 761 | intintLCGLinearOpenCompactHash_DestroyFactory(factory, |
| 738 | 762 | hashIndex); |
| … | … | @@ -741,6 +765,10 @@ int intintHash_DestroyFactory(intintHash_Factory * factory) { |
| 741 | 765 | intintLCGLinearOpenCompactCLHash_DestroyFactory(factory, |
| 742 | 766 | hashIndex); |
| 743 | 767 | break; |
| 768 | case LCG_LINEAR_OPEN_COMPACT_OPENMP_HASH_ID: |
| 769 | intintLCGLinearOpenCompactOpenMPHash_DestroyFactory |
| 770 | (factory, hashIndex); |
| 771 | break; |
| 744 | 772 | case LCG_QUADRATIC_OPEN_COMPACT_HASH_ID: |
| 745 | 773 | intintLCGQuadraticOpenCompactHash_DestroyFactory |
| 746 | 774 | (factory, hashIndex); |
| … | … | @@ -749,6 +777,10 @@ int intintHash_DestroyFactory(intintHash_Factory * factory) { |
| 749 | 777 | intintLCGQuadraticOpenCompactCLHash_DestroyFactory |
| 750 | 778 | (factory, hashIndex); |
| 751 | 779 | break; |
| 780 | case LCG_QUADRATIC_OPEN_COMPACT_OPENMP_HASH_ID: |
| 781 | intintLCGQuadraticOpenCompactOpenMPHash_DestroyFactory |
| 782 | (factory, hashIndex); |
| 783 | break; |
| 752 | 784 | } |
| 753 | 785 | hashIndex++; |
| 754 | 786 | } |
| … | … | @@ -769,6 +801,7 @@ intintHash_Table *intintHash_CreateTable(intintHash_Factory * factory, |
| 769 | 801 | if (hashTypes == 0) { |
| 770 | 802 | hashTypes = factory->hashTypesAvailable; |
| 771 | 803 | if ((hashTypes & HASH_ALL_CL_HASHES) |
| 804 | && (hashTypes & HASH_ALL_OPENMP_HASHES) |
| 772 | 805 | && (hashTypes & HASH_ALL_C_HASHES)) { |
| 773 | 806 | hashTypes &= HASH_ALL_C_HASHES; |
| 774 | 807 | } |
| … | … | @@ -779,8 +812,10 @@ intintHash_Table *intintHash_CreateTable(intintHash_Factory * factory, |
| 779 | 812 | exit(1); |
| 780 | 813 | } |
| 781 | 814 | hashTypes &= factory->hashTypesAvailable; |
| 782 | | if ((hashTypes & HASH_ALL_CL_HASHES) && (hashTypes & HASH_ALL_C_HASHES)) { |
| 783 | | printf("Please decide between OpenCL or C hash.\n"); |
| 815 | if ((hashTypes & HASH_ALL_CL_HASHES) |
| 816 | && (hashTypes & HASH_ALL_OPENMP_HASHES) |
| 817 | && (hashTypes & HASH_ALL_C_HASHES)) { |
| 818 | printf("Please decide between OpenCL, OpenMP or C hash.\n"); |
| 784 | 819 | exit(1); |
| 785 | 820 | } |
| 786 | 821 | if ((hashTypes & HASH_PERFECT_HASHES) == hashTypes && keyRange == 0) { |