Beispiel #1
0
        internal DeviceCaps(CudaDevice device)
        {
            Device      = device;
            ComputeCaps = nvcuda.cuDeviceComputeCapability(device);
            FloatCaps   = ((int)ComputeCaps >= 13) ? FloatCaps.NativeDoubles : FloatCaps.EmulateDoubles;
            GridCaps    = new GridCaps(device);
            MemoryCaps  = new MemoryCaps(device);

            ComputeMode               = (ComputeMode)nvcuda.cuDeviceGetAttribute(CUdevice_attribute.ComputeMode, device);
            IsKernelTimeoutEnabled    = nvcuda.cuDeviceGetFlag(CUdevice_attribute.KernelExecTimeout, device);
            IsIntegrated              = nvcuda.cuDeviceGetFlag(CUdevice_attribute.Integrated, device);
            SupportsHostMemoryMapping = nvcuda.cuDeviceGetFlag(CUdevice_attribute.CanMapHostMemory, device);
            SupportsGpuOverlap        = nvcuda.cuDeviceGetFlag(CUdevice_attribute.GPUOverlap, device);
            SupportsConcurrentKernels = nvcuda.cuDeviceGetFlag(CUdevice_attribute.ConcurrentKernels, device);
            IsEccEnabled              = nvcuda.cuDeviceGetFlag(CUdevice_attribute.EccEnabled, device);
        }
Beispiel #2
0
        internal DeviceCaps(CudaDevice device)
        {
            Device = device;
            ComputeCaps = nvcuda.cuDeviceComputeCapability(device);
            FloatCaps = ((int)ComputeCaps >= 13) ? FloatCaps.NativeDoubles : FloatCaps.EmulateDoubles;
            GridCaps = new GridCaps(device);
            MemoryCaps = new MemoryCaps(device);

            ComputeMode = (ComputeMode)nvcuda.cuDeviceGetAttribute(CUdevice_attribute.ComputeMode, device);
            IsKernelTimeoutEnabled = nvcuda.cuDeviceGetFlag(CUdevice_attribute.KernelExecTimeout, device);
            IsIntegrated = nvcuda.cuDeviceGetFlag(CUdevice_attribute.Integrated, device);
            SupportsHostMemoryMapping = nvcuda.cuDeviceGetFlag(CUdevice_attribute.CanMapHostMemory, device);
            SupportsGpuOverlap = nvcuda.cuDeviceGetFlag(CUdevice_attribute.GPUOverlap, device);
            SupportsConcurrentKernels = nvcuda.cuDeviceGetFlag(CUdevice_attribute.ConcurrentKernels, device);
            IsEccEnabled = nvcuda.cuDeviceGetFlag(CUdevice_attribute.EccEnabled, device);
        }