internal SimdSpec(CudaDevice device) { Device = device; SMs = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MultiProcessorCount, device); SimdWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.WarpSize, device); }
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); }
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); }
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); }
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); }
internal GridCaps(CudaDevice device) { Device = device; MaxThreadsInBlock = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxThreadsPerBlock, device); var maxBlockX = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxBlockDimX, device); var maxBlockY = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxBlockDimY, device); var maxBlockZ = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxBlockDimZ, device); MaxBlockDim = new dim3(maxBlockX, maxBlockY, maxBlockZ); var maxGridX = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxGridDimX, device); var maxGridY = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxGridDimY, device); var maxGridZ = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxGridDimZ, device); MaxGridDim = new dim3(maxGridX, maxGridY, maxGridZ); }
internal MemoryCaps(CudaDevice device) { Device = device; MaxPitch = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxPitch, device); TextureAlignment = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.TextureAlignment, device); MaxTexture1dWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture1dWidth, device); MaxTexture2dWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dWidth, device); MaxTexture2dHeight = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dHeight, device); MaxTexture3dWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture3dWidth, device); MaxTexture3dHeight = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture3dHeight, device); MaxTexture3dDepth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture3dDepth, device); MaxTexture2dArrayWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayWidth, device); MaxTexture2dArrayHeight = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayHeight, device); MaxTexture2dArrayNumSlices = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayNumSlices, device); SurfaceAlignment = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayNumSlices, device); }
internal MemoryCaps(CudaDevice device) { Device = device; MaxPitch = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxPitch, device); TextureAlignment = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.TextureAlignment, device); MaxTexture1dWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture1dWidth, device); MaxTexture2dWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dWidth, device); MaxTexture2dHeight = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dHeight, device); MaxTexture3dWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture3dWidth, device); MaxTexture3dHeight = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture3dHeight, device); MaxTexture3dDepth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture3dDepth, device); MaxTexture2dArrayWidth = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayWidth, device); MaxTexture2dArrayHeight = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayHeight, device); MaxTexture2dArrayNumSlices = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayNumSlices, device); SurfaceAlignment = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxTexture2dArrayNumSlices, device); }
internal GridCaps(CudaDevice device) { Device = device; MaxThreadsInBlock = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxThreadsPerBlock, device); var maxBlockX = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxBlockDimX, device); var maxBlockY = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxBlockDimY, device); var maxBlockZ = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxBlockDimZ, device); MaxBlockDim = new dim3(maxBlockX, maxBlockY, maxBlockZ); var maxGridX = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxGridDimX, device); var maxGridY = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxGridDimY, device); var maxGridZ = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.MaxGridDimZ, device); MaxGridDim = new dim3(maxGridX, maxGridY, maxGridZ); }
internal ClockSpec(CudaDevice device) { Device = device; ClockKhz = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.ClockRate, device); }
internal ClockSpec(CudaDevice device) { Device = device; ClockKhz = nvcuda.cuDeviceGetAttribute(CUdevice_attribute.ClockRate, device); }