Esempio n. 1
0
        public void WriteConstant <T>(string name, T value) where T : struct
        {
            DeviceBuffer buffer = GetConstantBuffer(name);

            CudaMem.CopyStruct(value, buffer);
        }
Esempio n. 2
0
        public void ReadConstant <T>(out T value, string name) where T : struct
        {
            DeviceBuffer buffer = GetConstantBuffer(name);

            CudaMem.CopyStruct(buffer, out value);
        }