test pow kernel
1 import numir; 2 import mir.ndslice; 3 import grain.kernel; 4 import mir.math : pow; 5 6 auto x = iota([2, 3], 1).as!float 7 .slice 8 .variable 9 .to!DeviceStorage; 10 unaryPow(x, 2f); 11 assert(approxEqual(x.to!HostStorage.sliced, iota([2, 3], 1).as!float 12 .map!(x => pow(x, 2))));
wrapper of CUDA kernel pow function