Skip to content

Commit

Permalink
Sending the correct offset to the file.
Browse files Browse the repository at this point in the history
#14: Refactor GpuFilteredRDD and FilteredChunkItrator 

Task-Url: http://github.com/meisam/spark/issues/issue/14
  • Loading branch information
meisam committed Oct 30, 2014
1 parent 375baea commit dbee6e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/rdd/GpuPartition.scala
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,8 @@ class GpuPartition[T <: Product : ClassTag]

private def deviceToHostCopy[V: ClassTag](src: cl_mem, dest: Pointer, elementCount: Long, offset: Long = 0): Unit = {
val length = elementCount * baseSize[V]
clEnqueueReadBuffer(context.getOpenCLQueue, src, CL_TRUE, offset, length, dest, 0, null,
val offsetInBytes = offset * baseSize[V]
clEnqueueReadBuffer(context.getOpenCLQueue, src, CL_TRUE, offsetInBytes, length, dest, 0, null,
null)
}

Expand Down

0 comments on commit dbee6e8

Please sign in to comment.