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

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

            CudaMem.CopyStruct(buffer, out value);
        }