server

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package server defines a server that can receives commands from external applications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers()

RegisterHandlers registers all the handlers of the MGPUSim server

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder can help building the server instance with parameters.

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a builder with default configurations.

func (Builder) Build

func (b Builder) Build()

Build creates the server instance. This function should be called after all the configuration is completed, and before the server start to listen to a port.

func (Builder) WithDriver

func (b Builder) WithDriver(d *driver.Driver) Builder

WithDriver sets the driver the the server works with.

type DeviceArch

type DeviceArch struct {
	HasGlobalInt32Atomics    bool `json:"has_global_int_32_atomics"`
	HasGlobalFloatAtomicExch bool `json:"has_global_float_atomic_exch"`
	HasSharedInt32Atomics    bool `json:"has_shared_int_32_atomics"`
	HasSharedFloatAtomicExch bool `json:"has_shared_float_atomic_exch"`
	HasFloatAtomicAdd        bool `json:"has_float_atomic_add"`
	HasGlobalInt64Atomics    bool `json:"has_global_int_64_atomics"`
	HasSharedInt64Atomics    bool `json:"has_shared_int_64_atomics"`
	HasDoubles               bool `json:"has_doubles"`
	HasWarpVote              bool `json:"has_warp_vote"`
	HasWarpBallot            bool `json:"has_warp_ballot"`
	HasWarpShuffle           bool `json:"has_warp_shuffle"`
	HasFunnelShift           bool `json:"has_funnel_shift"`
	HasThreadFenceSystem     bool `json:"has_thread_fence_system"`
	HasSyncThreadsExt        bool `json:"has_sync_threads_ext"`
	HasSurfaceFuncs          bool `json:"has_surface_funcs"`
	Has3dGrid                bool `json:"has_3d_grid"`
	HasDynamicParalleli      bool `json:"has_dynamic_paralleli"`
}

DeviceArch represents the features that the device support.

type DeviceProperty

type DeviceProperty struct {
	Name                             string     `json:"name"`
	TotalGlobalMem                   uint64     `json:"total_global_mem"`
	SharedMemPerBlock                uint64     `json:"shared_mem_per_block"`
	RegsPerBlock                     int        `json:"regs_per_block"`
	WarpSize                         int        `json:"warp_size"`
	MaxThreadsPerBlock               int        `json:"max_threads_per_block"`
	MaxThreadsDim                    [3]int     `json:"max_threads_dim"`
	MaxGridSize                      [3]int     `json:"max_grid_size"`
	ClockRate                        int        `json:"clock_rate"`
	MemClockRate                     int        `json:"mem_clock_rate"`
	MemoryBusWidth                   int        `json:"memory_bus_width"`
	TotalConstMem                    int        `json:"total_const_mem"`
	Major                            int        `json:"major"`
	Minor                            int        `json:"minor"`
	MultiProcessorCount              int        `json:"multi_processor_count"`
	L2CacheSize                      uint64     `json:"l_2_cache_size"`
	MaxThreadsPerMultiProcessor      int        `json:"max_threads_per_multi_processor"`
	ComputeMode                      int        `json:"compute_mode"`
	ClockInstructionRate             int        `json:"clock_instruction_rate"`
	Arch                             DeviceArch `json:"arch"`
	ConcurrentKernels                int        `json:"concurrent_kernels"`
	PCIBusID                         int        `json:"pci_bus_id"`
	PCIDeviceID                      int        `json:"pci_device_id"`
	MaxSharedMemoryPerMultiProcessor int        `json:"max_shared_memory_per_multi_processor"`
	IsMultiGPUBoard                  int        `json:"is_multi_gpu_board"`
	CanMapHostMemory                 int        `json:"can_map_host_memory"`
	GCNArch                          int        `json:"gcn_arch"`
}

The DeviceProperty is the message sent back to the host when querying device properties.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL