Exemplo n.º 1
0
        internal MemorySpec(CudaDevice device)
        {
            Device = device;
            Caps = new MemoryCaps(device);

            RegistersPerSM = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxRegistersPerBlock, device);
            SharedMemoryPerSM = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxSharedMemoryPerBlock, device);
            ConstantMemory = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.TotalConstantMemory, device);
            GlobalMemory = nvcuda.cuDeviceTotalMem(device);
        }
Exemplo n.º 2
0
        internal MemorySpec(CudaDevice device)
        {
            Device = device;
            Caps   = new MemoryCaps(device);

            RegistersPerSM    = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxRegistersPerBlock, device);
            SharedMemoryPerSM = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxSharedMemoryPerBlock, device);
            ConstantMemory    = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.TotalConstantMemory, device);
            GlobalMemory      = nvcuda.cuDeviceTotalMem(device);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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);
        }