public static GpuDevice newCudaDevice( int device_id, int major_version, int minor_version, String device_name, long free_global_mem_size, long total_global_mem_size, int max_registers_per_block, int warp_size, int max_pitch, int max_threads_per_block, int max_shared_memory_per_block, int clock_rate, int memory_clock_rate, int constant_mem_size, boolean integrated, int max_threads_per_multiprocessor, int multiprocessor_count, int max_block_dim_x, int max_block_dim_y, int max_block_dim_z, int max_grid_dim_x, int max_grid_dim_y, int max_grid_dim_z) { GpuDevice ret = new GpuDevice(DEVICE_TYPE_CUDA); ret.setDeviceId(device_id); ret.setVersion(major_version, minor_version, 0); ret.setDeviceName(device_name); ret.setFreeGlobalMemoryBytes(free_global_mem_size); ret.setTotalGlobalMemoryBytes(total_global_mem_size); ret.setMaxRegistersPerBlock(max_registers_per_block); ret.setWarpSize(warp_size); ret.setMaxPitch(max_pitch); ret.setMaxThreadsPerBlock(max_threads_per_block); ret.setMaxSharedMemoryPerBlock(max_shared_memory_per_block); ret.setClockRateHz(clock_rate); ret.setMemoryClockRateHz(memory_clock_rate); ret.setTotalConstantMemoryBytes(constant_mem_size); ret.setIntegrated(integrated); ret.setMaxThreadsPerMultiprocessor(max_threads_per_multiprocessor); ret.setMultiProcessorCount(multiprocessor_count); ret.setMaxBlockDimX(max_block_dim_x); ret.setMaxBlockDimY(max_block_dim_y); ret.setMaxBlockDimZ(max_block_dim_z); ret.setMaxGridDimX(max_grid_dim_x); ret.setMaxGridDimY(max_grid_dim_y); ret.setMaxGridDimZ(max_grid_dim_z); return ret; }
public static GpuDevice newOpenCLDevice(String device_name) { GpuDevice ret = new GpuDevice(DEVICE_TYPE_OPENCL); ret.setDeviceName(device_name); return ret; }