anchor.diff:          // write headers to compile directory
           headers
           |> Seq.iter (fun header -> 
  +            // extract header file name from resource name
  +            let filename = Regex.Match(header, @"\.(\w+\.\w+)$").Groups.[1].Value
  +            let path = Path.Combine (compileDir, filename)
  +            use fileStrm = File.OpenWrite path
               use strm = asmbly.GetManifestResourceStream(header)
  -            let filename = Path.Combine (compileDir, header)
  -            use fileStrm = File.OpenWrite filename
               strm.CopyTo fileStrm)
   
           // write module code
  
positive.code: 
  open Tensor.Utils
  open System.Text
  
  
  /// CUDA backend configuration
  
negative.code:         let compileDir = getTempDir ()
          Directory.CreateDirectory compileDir |> ignore
  
          // Get embedded header resources from our assembly.
          // They are in the form: Tensor.Cuda.FILENAME.cuh, i.e. slashes have been replaced by dots.
          let asmbly = Assembly.GetExecutingAssembly()
          let headers =
              asmbly.GetManifestResourceNames ()
  