| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>CSRPointer (SystemDS 2.0.0-SNAPSHOT API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CSRPointer (SystemDS 2.0.0-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":10,"i4":9,"i5":9,"i6":10,"i7":10,"i8":9,"i9":9,"i10":10,"i11":10,"i12":9,"i13":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CSRPointer.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CudaMemoryAllocator.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" target="_top">Frames</a></li> |
| <li><a href="CSRPointer.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.sysds.runtime.instructions.gpu.context</div> |
| <h2 title="Class CSRPointer" class="title">Class CSRPointer</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.sysds.runtime.instructions.gpu.context.CSRPointer</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">CSRPointer</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Compressed Sparse Row (CSR) format for CUDA |
| Generalized matrix multiply is implemented for CSR format in the cuSparse library among other operations |
| |
| Since we assume that the matrix is stored with zero-based indexing (i.e. CUSPARSE_INDEX_BASE_ZERO), |
| the matrix |
| 1.0 4.0 0.0 0.0 0.0 |
| 0.0 2.0 3.0 0.0 0.0 |
| 5.0 0.0 0.0 7.0 8.0 |
| 0.0 0.0 9.0 0.0 6.0 |
| |
| is stored as |
| val = 1.0 4.0 2.0 3.0 5.0 7.0 8.0 9.0 6.0 |
| rowPtr = 0.0 2.0 4.0 7.0 9.0 |
| colInd = 0.0 1.0 1.0 2.0 0.0 3.0 4.0 2.0 4.0</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>jcuda.Pointer</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#colInd">colInd</a></span></code> |
| <div class="block">integer array of nnz values' column indices</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>jcuda.jcusparse.cusparseMatDescr</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#descr">descr</a></span></code> |
| <div class="block">descriptor of matrix, only CUSPARSE_MATRIX_TYPE_GENERAL supported</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static jcuda.jcusparse.cusparseMatDescr</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#matrixDescriptor">matrixDescriptor</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#nnz">nnz</a></span></code> |
| <div class="block">Number of non zeroes</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>jcuda.Pointer</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#rowPtr">rowPtr</a></span></code> |
| <div class="block">integer array of start of all rows and end of last row + 1</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>jcuda.Pointer</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#val">val</a></span></code> |
| <div class="block">double array of non zero values</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#allocateEmpty-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-long-long-">allocateEmpty</a></span>(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| long nnz2, |
| long rows)</code> |
| <div class="block">Factory method to allocate an empty CSR Sparse matrix on the GPU</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#allocateForDgeam-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-jcuda.jcusparse.cusparseHandle-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-int-">allocateForDgeam</a></span>(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| jcuda.jcusparse.cusparseHandle handle, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> A, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> B, |
| int m, |
| int n)</code> |
| <div class="block">Estimates the number of non zero elements from the results of a sparse cusparseDgeam operation |
| C = a op(A) + b op(B)</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#allocateForMatrixMultiply-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-jcuda.jcusparse.cusparseHandle-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-int-int-int-">allocateForMatrixMultiply</a></span>(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| jcuda.jcusparse.cusparseHandle handle, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> A, |
| int transA, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> B, |
| int transB, |
| int m, |
| int n, |
| int k)</code> |
| <div class="block">Estimates the number of non-zero elements from the result of a sparse matrix multiplication C = A * B |
| and returns the <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>CSRPointer</code></a> to C with the appropriate GPU memory.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#clone-int-">clone</a></span>(int rows)</code> </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#copyPtrToHost-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-long-int:A-int:A-">copyPtrToHost</a></span>(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> src, |
| int rows, |
| long nnz, |
| int[] rowPtr, |
| int[] colInd)</code> |
| <div class="block">Static method to copy a CSR sparse matrix from Device to host</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#copyToDevice-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-long-int:A-int:A-double:A-">copyToDevice</a></span>(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> dest, |
| int rows, |
| long nnz, |
| int[] rowPtr, |
| int[] colInd, |
| double[] values)</code> |
| <div class="block">Static method to copy a CSR sparse matrix from Host to Device</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#deallocate--">deallocate</a></span>()</code> |
| <div class="block">Calls cudaFree lazily on the allocated <code>Pointer</code> instances</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#deallocate-boolean-">deallocate</a></span>(boolean eager)</code> |
| <div class="block">Calls cudaFree lazily or eagerly on the allocated <code>Pointer</code> instances</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#estimateSize-long-long-">estimateSize</a></span>(long nnz2, |
| long rows)</code> |
| <div class="block">Estimate the size of a CSR matrix in GPU memory |
| Size of pointers is not needed and is not added in</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static jcuda.jcusparse.cusparseMatDescr</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#getDefaultCuSparseMatrixDescriptor--">getDefaultCuSparseMatrixDescriptor</a></span>()</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#isUltraSparse-int-int-">isUltraSparse</a></span>(int rows, |
| int cols)</code> |
| <div class="block">Check for ultra sparsity</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>jcuda.Pointer</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#toColumnMajorDenseMatrix-jcuda.jcusparse.cusparseHandle-jcuda.jcublas.cublasHandle-int-int-java.lang.String-">toColumnMajorDenseMatrix</a></span>(jcuda.jcusparse.cusparseHandle cusparseHandle, |
| jcuda.jcublas.cublasHandle cublasHandle, |
| int rows, |
| int cols, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> instName)</code> |
| <div class="block">Copies this CSR matrix on the GPU to a dense column-major matrix |
| on the GPU.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#toIntExact-long-">toIntExact</a></span>(long l)</code> </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html#toString--">toString</a></span>()</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="matrixDescriptor"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>matrixDescriptor</h4> |
| <pre>public static jcuda.jcusparse.cusparseMatDescr matrixDescriptor</pre> |
| </li> |
| </ul> |
| <a name="nnz"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>nnz</h4> |
| <pre>public long nnz</pre> |
| <div class="block">Number of non zeroes</div> |
| </li> |
| </ul> |
| <a name="val"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>val</h4> |
| <pre>public jcuda.Pointer val</pre> |
| <div class="block">double array of non zero values</div> |
| </li> |
| </ul> |
| <a name="rowPtr"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>rowPtr</h4> |
| <pre>public jcuda.Pointer rowPtr</pre> |
| <div class="block">integer array of start of all rows and end of last row + 1</div> |
| </li> |
| </ul> |
| <a name="colInd"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>colInd</h4> |
| <pre>public jcuda.Pointer colInd</pre> |
| <div class="block">integer array of nnz values' column indices</div> |
| </li> |
| </ul> |
| <a name="descr"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>descr</h4> |
| <pre>public jcuda.jcusparse.cusparseMatDescr descr</pre> |
| <div class="block">descriptor of matrix, only CUSPARSE_MATRIX_TYPE_GENERAL supported</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="toIntExact-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toIntExact</h4> |
| <pre>public static int toIntExact(long l)</pre> |
| </li> |
| </ul> |
| <a name="getDefaultCuSparseMatrixDescriptor--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDefaultCuSparseMatrixDescriptor</h4> |
| <pre>public static jcuda.jcusparse.cusparseMatDescr getDefaultCuSparseMatrixDescriptor()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Singleton default matrix descriptor object |
| (set with CUSPARSE_MATRIX_TYPE_GENERAL, CUSPARSE_INDEX_BASE_ZERO)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="estimateSize-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>estimateSize</h4> |
| <pre>public static long estimateSize(long nnz2, |
| long rows)</pre> |
| <div class="block">Estimate the size of a CSR matrix in GPU memory |
| Size of pointers is not needed and is not added in</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nnz2</code> - number of non zeroes</dd> |
| <dd><code>rows</code> - number of rows</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>size estimate</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyToDevice-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-long-int:A-int:A-double:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyToDevice</h4> |
| <pre>public static void copyToDevice(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> dest, |
| int rows, |
| long nnz, |
| int[] rowPtr, |
| int[] colInd, |
| double[] values)</pre> |
| <div class="block">Static method to copy a CSR sparse matrix from Host to Device</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>gCtx</code> - GPUContext</dd> |
| <dd><code>dest</code> - [input] destination location (on GPU)</dd> |
| <dd><code>rows</code> - number of rows</dd> |
| <dd><code>nnz</code> - number of non-zeroes</dd> |
| <dd><code>rowPtr</code> - integer array of row pointers</dd> |
| <dd><code>colInd</code> - integer array of column indices</dd> |
| <dd><code>values</code> - double array of non zero values</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="copyPtrToHost-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-long-int:A-int:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>copyPtrToHost</h4> |
| <pre>public static void copyPtrToHost(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> src, |
| int rows, |
| long nnz, |
| int[] rowPtr, |
| int[] colInd)</pre> |
| <div class="block">Static method to copy a CSR sparse matrix from Device to host</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>src</code> - [input] source location (on GPU)</dd> |
| <dd><code>rows</code> - [input] number of rows</dd> |
| <dd><code>nnz</code> - [input] number of non-zeroes</dd> |
| <dd><code>rowPtr</code> - [output] pre-allocated integer array of row pointers of size (rows+1)</dd> |
| <dd><code>colInd</code> - [output] pre-allocated integer array of column indices of size nnz</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocateForDgeam-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-jcuda.jcusparse.cusparseHandle-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocateForDgeam</h4> |
| <pre>public static <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> allocateForDgeam(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| jcuda.jcusparse.cusparseHandle handle, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> A, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> B, |
| int m, |
| int n)</pre> |
| <div class="block">Estimates the number of non zero elements from the results of a sparse cusparseDgeam operation |
| C = a op(A) + b op(B)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>gCtx</code> - a valid <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>GPUContext</code></a></dd> |
| <dd><code>handle</code> - a valid <code>cusparseHandle</code></dd> |
| <dd><code>A</code> - Sparse Matrix A on GPU</dd> |
| <dd><code>B</code> - Sparse Matrix B on GPU</dd> |
| <dd><code>m</code> - Rows in A</dd> |
| <dd><code>n</code> - Columns in Bs</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>CSR (compressed sparse row) pointer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocateForMatrixMultiply-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-jcuda.jcusparse.cusparseHandle-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-org.apache.sysds.runtime.instructions.gpu.context.CSRPointer-int-int-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocateForMatrixMultiply</h4> |
| <pre>public static <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> allocateForMatrixMultiply(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| jcuda.jcusparse.cusparseHandle handle, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> A, |
| int transA, |
| <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> B, |
| int transB, |
| int m, |
| int n, |
| int k)</pre> |
| <div class="block">Estimates the number of non-zero elements from the result of a sparse matrix multiplication C = A * B |
| and returns the <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>CSRPointer</code></a> to C with the appropriate GPU memory.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>gCtx</code> - a valid <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>GPUContext</code></a></dd> |
| <dd><code>handle</code> - a valid <code>cusparseHandle</code></dd> |
| <dd><code>A</code> - Sparse Matrix A on GPU</dd> |
| <dd><code>transA</code> - 'T' if A is to be transposed, 'N' otherwise</dd> |
| <dd><code>B</code> - Sparse Matrix B on GPU</dd> |
| <dd><code>transB</code> - 'T' if B is to be transposed, 'N' otherwise</dd> |
| <dd><code>m</code> - Rows in A</dd> |
| <dd><code>n</code> - Columns in B</dd> |
| <dd><code>k</code> - Columns in A / Rows in B</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>CSRPointer</code></a> instance that encapsulates the CSR matrix on GPU</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="allocateEmpty-org.apache.sysds.runtime.instructions.gpu.context.GPUContext-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allocateEmpty</h4> |
| <pre>public static <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> allocateEmpty(<a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">GPUContext</a> gCtx, |
| long nnz2, |
| long rows)</pre> |
| <div class="block">Factory method to allocate an empty CSR Sparse matrix on the GPU</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>gCtx</code> - a valid <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/GPUContext.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>GPUContext</code></a></dd> |
| <dd><code>nnz2</code> - number of non-zeroes</dd> |
| <dd><code>rows</code> - number of rows</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><code>CSRPointer</code></a> instance that encapsulates the CSR matrix on GPU</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clone-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>clone</h4> |
| <pre>public <a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" title="class in org.apache.sysds.runtime.instructions.gpu.context">CSRPointer</a> clone(int rows)</pre> |
| </li> |
| </ul> |
| <a name="isUltraSparse-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isUltraSparse</h4> |
| <pre>public boolean isUltraSparse(int rows, |
| int cols)</pre> |
| <div class="block">Check for ultra sparsity</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rows</code> - number of rows</dd> |
| <dd><code>cols</code> - number of columns</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if ultra sparse</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toColumnMajorDenseMatrix-jcuda.jcusparse.cusparseHandle-jcuda.jcublas.cublasHandle-int-int-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toColumnMajorDenseMatrix</h4> |
| <pre>public jcuda.Pointer toColumnMajorDenseMatrix(jcuda.jcusparse.cusparseHandle cusparseHandle, |
| jcuda.jcublas.cublasHandle cublasHandle, |
| int rows, |
| int cols, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> instName)</pre> |
| <div class="block">Copies this CSR matrix on the GPU to a dense column-major matrix |
| on the GPU. This is a temporary matrix for operations such as |
| cusparseDcsrmv. |
| Since the allocated matrix is temporary, bookkeeping is not updated. |
| The caller is responsible for calling "free" on the returned Pointer object</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cusparseHandle</code> - a valid <code>cusparseHandle</code></dd> |
| <dd><code>cublasHandle</code> - a valid <code>cublasHandle</code></dd> |
| <dd><code>rows</code> - number of rows in this CSR matrix</dd> |
| <dd><code>cols</code> - number of columns in this CSR matrix</dd> |
| <dd><code>instName</code> - name of the invoking instruction to record<a href="../../../../../../../org/apache/sysds/utils/Statistics.html" title="class in org.apache.sysds.utils"><code>Statistics</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A <code>Pointer</code> to the allocated dense matrix (in column-major format)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="deallocate--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deallocate</h4> |
| <pre>public void deallocate()</pre> |
| <div class="block">Calls cudaFree lazily on the allocated <code>Pointer</code> instances</div> |
| </li> |
| </ul> |
| <a name="deallocate-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deallocate</h4> |
| <pre>public void deallocate(boolean eager)</pre> |
| <div class="block">Calls cudaFree lazily or eagerly on the allocated <code>Pointer</code> instances</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>eager</code> - whether to do eager or lazy cudaFrees</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CSRPointer.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../../../org/apache/sysds/runtime/instructions/gpu/context/CudaMemoryAllocator.html" title="class in org.apache.sysds.runtime.instructions.gpu.context"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/sysds/runtime/instructions/gpu/context/CSRPointer.html" target="_top">Frames</a></li> |
| <li><a href="CSRPointer.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |