1 module dcompute.driver.cuda; 2 3 public import ldc.dcompute; 4 public import derelict.cuda.driverapi; 5 6 public import dcompute.driver.error; 7 8 public import dcompute.driver.cuda.buffer; 9 public import dcompute.driver.cuda.context; 10 public import dcompute.driver.cuda.device; 11 public import dcompute.driver.cuda.event; 12 public import dcompute.driver.cuda.kernel; 13 public import dcompute.driver.cuda.memory; 14 public import dcompute.driver.cuda.platform; 15 public import dcompute.driver.cuda.program; 16 public import dcompute.driver.cuda.queue; 17 18 enum Copy 19 { 20 hostToDevice, 21 deviceToHost, 22 array, 23 } 24 25 enum MemoryBankConfig : int 26 { 27 default_, 28 fourBytes, 29 eightBytes, 30 } 31 template HostArgsOf(F) { 32 import std.meta, std.traits; 33 alias HostArgsOf = staticMap!(ReplaceTemplate!(Pointer, Buffer), Parameters!F); 34 } 35 private template ReplaceTemplate(alias needle, alias replacement) { 36 template ReplaceTemplate(T) { 37 static if (is(T : needle!Args, Args...)) { 38 alias ReplaceTemplate = replacement!(Args[1]); 39 } else { 40 alias ReplaceTemplate = T; 41 } 42 } 43 }