mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-28 12:16:14 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
14
samples/Terra/cudaconst2.t
Normal file
14
samples/Terra/cudaconst2.t
Normal file
@@ -0,0 +1,14 @@
|
||||
if not terralib.cudacompile then
|
||||
print("CUDA not enabled, not performing test...")
|
||||
return
|
||||
end
|
||||
|
||||
local const = cudalib.constantmemory(float, 1)
|
||||
|
||||
local terra kernel(data: &float)
|
||||
end
|
||||
|
||||
local M = terralib.cudacompile({
|
||||
kernel = kernel,
|
||||
const = const
|
||||
})
|
||||
Reference in New Issue
Block a user