fix cuda multijoin (Carlos)
This commit is contained in:
parent
797c063785
commit
a01b319032
@ -234,7 +234,7 @@ __global__ void gIndexMultiJoin(int *R, int *S, int g_locations[], int sLen, int
|
|||||||
{
|
{
|
||||||
extern __shared__ int shared[];
|
extern __shared__ int shared[];
|
||||||
int s_cur = blockIdx.x * blockDim.x + threadIdx.x;
|
int s_cur = blockIdx.x * blockDim.x + threadIdx.x;
|
||||||
int posr, poss, x, y, temp, ini;
|
int posr, poss, x, y, ini;
|
||||||
|
|
||||||
if(threadIdx.x < wj)
|
if(threadIdx.x < wj)
|
||||||
shared[threadIdx.x] = muljoin[threadIdx.x];
|
shared[threadIdx.x] = muljoin[threadIdx.x];
|
||||||
@ -258,15 +258,17 @@ __global__ void gIndexMultiJoin(int *R, int *S, int g_locations[], int sLen, int
|
|||||||
poss = s_cur * of2;
|
poss = s_cur * of2;
|
||||||
else
|
else
|
||||||
poss = sloc[s_cur] * of2;
|
poss = sloc[s_cur] * of2;
|
||||||
ini = r_cur - count;
|
ini = r_cur - count;
|
||||||
for(x = 0; x < wj; x += 2)
|
for(y = ini; y < r_cur; y++)
|
||||||
{
|
{
|
||||||
posr = shared[x];
|
posr = mloc[y] * of1;
|
||||||
temp = p2[poss + shared[x+1]];
|
for(x = 0; x < wj; x += 2)
|
||||||
for(y = ini; y < r_cur; y++)
|
|
||||||
{
|
{
|
||||||
if(p1[mloc[y] * of1 + posr] != temp)
|
if(p1[posr + shared[x]] != p2[poss + shared[x+1]])
|
||||||
|
{
|
||||||
count--;
|
count--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(count > 0)
|
if(count > 0)
|
||||||
|
Reference in New Issue
Block a user