Library/ManagedCuda/CudaRand/CudaRandDevice.cs
/// <summary>
/// Get an array of direction vectors that can be used for quasirandom number generation.
/// <para/>
/// The array contains vectors for many dimensions. Each dimension
/// has 32 vectors. Each individual vector is an unsigned int.
/// <para/>
/// Legal values for set are:
/// - <see cref="DirectionVectorSet.JoeKuo6_32"/> (20,000 dimensions)
/// - <see cref="DirectionVectorSet.ScrambledJoeKuo6_32"/> (20,000 dimensions)
/// </summary>
/// <param name="set"></param>
/// <returns></returns>
Get an array of direction vectors that can be used for quasirandom number generation.

The array contains vectors for many dimensions. Each dimension
has 32 vectors. Each individual vector is an unsigned int.

Legal values for set are:
(20,000 dimensions)
(20,000 dimensions)
Get an array of direction vectors that can be used for quasirandom number generation . The array contains vectors for many dimensions . Each dimension has 32 vectors . Each individual vector is an unsigned int . Legal values for set are : ( 20 000 dimensions ) ( 20 000 dimensions )
public static DirectionVectors32[] GetDirectionVectors32(DirectionVectorSet set)
		{
			IntPtr ptr;
			CurandStatus status = CudaRandNativeMethods.curandGetDirectionVectors32(out ptr, set);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandGetDirectionVectors32", status));
			if (status != CurandStatus.Success) throw new CudaRandException(status);
			DirectionVectors32[] vec = new DirectionVectors32[MaxDimensions];
			for (int i = 0; i < MaxDimensions; i++)
			{
				vec[i] = (DirectionVectors32)Marshal.PtrToStructure(new IntPtr(ptr.ToInt64() + i * 32 * Marshal.SizeOf(typeof(uint))), typeof(DirectionVectors32));
			}
			return vec;
		}
public static DirectionVectors32 [ ] GetDirectionVectors32 ( DirectionVectorSet set ) { IntPtr ptr ; CurandStatus status = CudaRandNativeMethods . curandGetDirectionVectors32 ( out ptr , set ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , status ) ) ; if ( status != CurandStatus . Success ) throw new CudaRandException ( status ) ; DirectionVectors32 [ ] vec = new DirectionVectors32 [ MaxDimensions ] ; for ( int i = 0 ; i < MaxDimensions ; i ++ ) { vec [ i ] = ( DirectionVectors32 ) Marshal . PtrToStructure ( new IntPtr ( ptr . ToInt64 ( ) + i * 32 * Marshal . SizeOf ( typeof ( uint ) ) ) , typeof ( DirectionVectors32 ) ) ; } return vec ; }
Get an array of direction vectors that can be used for quasirandom number generation.
Get an array of direction vectors that can be used for quasirandom number generation .
None
set
DirectionVectorSet
None