Skip to content

Commit

Permalink
Fix style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooyoung Hwang committed Mar 5, 2021
1 parent 8e14865 commit 7bbb348
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected ColumnVector buildAndPutOnDevice(int builderIndex) {

public void copyColumnar(ColumnVector cv, int colNum, boolean nullable, int rows) {
referenceHolders[colNum].addReferences(
HostColumnarToGpu.arrowColumnarCopy(cv, builder(colNum), nullable, rows)
HostColumnarToGpu.arrowColumnarCopy(cv, builder(colNum), nullable, rows)
);
}

Expand All @@ -212,12 +212,12 @@ public ai.rapids.cudf.ArrowColumnBuilder builder(int i) {

@Override
public void close() {
for (ai.rapids.cudf.ArrowColumnBuilder b : builders) {
for (ai.rapids.cudf.ArrowColumnBuilder b: builders) {
if (b != null) {
b.close();
}
}
for (ArrowBufReferenceHolder holder : referenceHolders) {
for (ArrowBufReferenceHolder holder: referenceHolders) {
holder.releaseReferences();
}
}
Expand Down Expand Up @@ -319,7 +319,7 @@ public void releaseReferences() {
if (references.isEmpty()) {
return;
}
for (ReferenceManager ref : references) {
for (ReferenceManager ref: references) {
ref.release();
}
references.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ object HostColumnarToGpu extends Logging {
case _ =>
throw new IllegalStateException(s"Illegal column vector type: ${cv.getClass}")
}

val referenceManagers = new mutable.ListBuffer[ReferenceManager]

def getBufferAndAddReference(getter: => (ByteBuffer, ReferenceManager)): ByteBuffer = {
val (buf, ref) = getter
referenceManagers += ref
Expand Down

0 comments on commit 7bbb348

Please sign in to comment.