Library/ManagedCuda/CudaJitOptions.cs
/// <summary>
/// Add a single option to the collection.
/// </summary>
/// <param name="opt">Option to add</param>
Add a single option to the collection.
Add a single option to the collection .
public void Add(CudaJitOption opt)
		{
			if (_count >= MAX_ELEM - 2)
				throw new Exception("Maximum number of options elements reached!");
			_cudaOptions.Add(opt);
			if (opt is CudaJOErrorLogBuffer) 
			{
				CUJITOption[] o = opt.Options;
				IntPtr[] v = opt.Values;
				opt.Index = _count;
				_options[_count] = o[0];
				_values[_count] = v[0];
				_count++;
				_options[_count] = o[1];
				_values[_count] = v[1];
			}
			else if (opt is CudaJOInfoLogBuffer) 
			{
				CUJITOption[] o = opt.Options;
				IntPtr[] v = opt.Values;
				opt.Index = _count;
				_options[_count] = o[0];
				_values[_count] = v[0];
				_count++;
				_options[_count] = o[1];
				_values[_count] = v[1];
			}
			else 
			{
				CUJITOption[] o = opt.Options;
				IntPtr[] v = opt.Values;
				opt.Index = _count;
				_options[_count] = o[0];
				_values[_count] = v[0];
			}
			_count++;
		}
public void Add ( CudaJitOption opt ) { if ( _count >= MAX_ELEM - 2 ) throw new Exception ( " " ) ; _cudaOptions . Add ( opt ) ; if ( opt is CudaJOErrorLogBuffer ) { CUJITOption [ ] o = opt . Options ; IntPtr [ ] v = opt . Values ; opt . Index = _count ; _options [ _count ] = o [ 0 ] ; _values [ _count ] = v [ 0 ] ; _count ++ ; _options [ _count ] = o [ 1 ] ; _values [ _count ] = v [ 1 ] ; } else if ( opt is CudaJOInfoLogBuffer ) { CUJITOption [ ] o = opt . Options ; IntPtr [ ] v = opt . Values ; opt . Index = _count ; _options [ _count ] = o [ 0 ] ; _values [ _count ] = v [ 0 ] ; _count ++ ; _options [ _count ] = o [ 1 ] ; _values [ _count ] = v [ 1 ] ; } else { CUJITOption [ ] o = opt . Options ; IntPtr [ ] v = opt . Values ; opt . Index = _count ; _options [ _count ] = o [ 0 ] ; _values [ _count ] = v [ 0 ] ; } _count ++ ; }
Add a single option to the collection.
Add a single option to the collection .
//add two elements //add two elements //add one elements
opt
CudaJitOption
Option to add
Option to add