Library/ManagedCuda/CudaArray1D.cs
/// <summary>
/// Copy data from host to array memory
/// </summary>
/// <param name="offsetInBytes">Offset in bytes of destination array</param>
/// <param name="source">source array</param>
Copy data from host to array memory
Copy data from host to array memory
public void CopyFromHostToArray1D(VectorTypes.float3[] source, SizeT offsetInBytes)
        {
            CUResult res;
            res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyHtoA_v2(_cuArray, offsetInBytes, source, (source.LongLength * Marshal.SizeOf(typeof(VectorTypes.float3))));
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyHtoA", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
        }
public void CopyFromHostToArray1D ( VectorTypes . float3 [ ] source , SizeT offsetInBytes ) { CUResult res ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpyHtoA_v2 ( _cuArray , offsetInBytes , source , ( source . LongLength * Marshal . SizeOf ( typeof ( VectorTypes . float3 ) ) ) ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Copy data from host to array memory
Copy data from host to array memory
source
VectorTypes.float3[]
None
offsetInBytes
SizeT
Offset in bytes of destination array
Offset in bytes of destination array