Lines Matching refs:sets
793 robj **sets = zmalloc(sizeof(robj*)*setnum); in sinterGenericCommand() local
806 zfree(sets); in sinterGenericCommand()
819 zfree(sets); in sinterGenericCommand()
822 sets[j] = setobj; in sinterGenericCommand()
826 qsort(sets,setnum,sizeof(robj*),qsortCompareSetsByCardinality); in sinterGenericCommand()
844 si = setTypeInitIterator(sets[0]); in sinterGenericCommand()
847 if (sets[j] == sets[0]) continue; in sinterGenericCommand()
850 if (sets[j]->encoding == OBJ_ENCODING_INTSET && in sinterGenericCommand()
851 !intsetFind((intset*)sets[j]->ptr,intobj)) in sinterGenericCommand()
857 } else if (sets[j]->encoding == OBJ_ENCODING_HT) { in sinterGenericCommand()
859 if (!setTypeIsMember(sets[j],eleobj)) { in sinterGenericCommand()
870 sets[j]->encoding == OBJ_ENCODING_INTSET && in sinterGenericCommand()
871 !intsetFind((intset*)sets[j]->ptr,(long)eleobj->ptr)) in sinterGenericCommand()
876 } else if (!setTypeIsMember(sets[j],eleobj)) { in sinterGenericCommand()
924 zfree(sets); in sinterGenericCommand()
941 robj **sets = zmalloc(sizeof(robj*)*setnum); in sunionDiffGenericCommand() local
952 sets[j] = NULL; in sunionDiffGenericCommand()
956 zfree(sets); in sunionDiffGenericCommand()
959 sets[j] = setobj; in sunionDiffGenericCommand()
971 if (op == SET_OP_DIFF && sets[0]) { in sunionDiffGenericCommand()
975 if (sets[j] == NULL) continue; in sunionDiffGenericCommand()
977 algo_one_work += setTypeSize(sets[0]); in sunionDiffGenericCommand()
978 algo_two_work += setTypeSize(sets[j]); in sunionDiffGenericCommand()
990 qsort(sets+1,setnum-1,sizeof(robj*), in sunionDiffGenericCommand()
1004 if (!sets[j]) continue; /* non existing keys are like empty sets */ in sunionDiffGenericCommand()
1006 si = setTypeInitIterator(sets[j]); in sunionDiffGenericCommand()
1013 } else if (op == SET_OP_DIFF && sets[0] && diff_algo == 1) { in sunionDiffGenericCommand()
1022 si = setTypeInitIterator(sets[0]); in sunionDiffGenericCommand()
1025 if (!sets[j]) continue; /* no key is an empty set. */ in sunionDiffGenericCommand()
1026 if (sets[j] == sets[0]) break; /* same set! */ in sunionDiffGenericCommand()
1027 if (setTypeIsMember(sets[j],ele)) break; in sunionDiffGenericCommand()
1037 } else if (op == SET_OP_DIFF && sets[0] && diff_algo == 2) { in sunionDiffGenericCommand()
1046 if (!sets[j]) continue; /* non existing keys are like empty sets */ in sunionDiffGenericCommand()
1048 si = setTypeInitIterator(sets[j]); in sunionDiffGenericCommand()
1095 zfree(sets); in sunionDiffGenericCommand()