コード例 #1
0
ファイル: Context.cs プロジェクト: xeno-by/libptx
        public Context(SoftwareIsa version, HardwareIsa target)
        {
            Version = version;
            Target = target;

            _current.Push(this);
        }
コード例 #2
0
ファイル: Module.cs プロジェクト: xeno-by/libptx
        public Module(SoftwareIsa softwareIsa, HardwareIsa hardwareIsa)
        {
            Version = softwareIsa;
            Target = hardwareIsa;

            UnifiedTexturing = true;
            DowngradeDoubles = false;
        }
コード例 #3
0
ファイル: JitFacade.cs プロジェクト: xeno-by/libcuda
        public static JittedKernel JitKernel(this String ptx, dim3 reqntid, HardwareIsa target)
        {
            ptx.AssertNotNull();
            CudaDriver.Ensure();

            var tuning = new JitTuning { Reqntid = reqntid };
            return ptx.JitKernel(tuning, target);
        }
コード例 #4
0
ファイル: JitFacade.cs プロジェクト: avaranovich/libcuda
        public static JittedKernel JitKernel(this String ptx, dim3 reqntid, HardwareIsa target)
        {
            ptx.AssertNotNull();
            CudaDriver.Ensure();

            var tuning = new JitTuning {
                Reqntid = reqntid
            };

            return(ptx.JitKernel(tuning, target));
        }
コード例 #5
0
ファイル: JitFacade.cs プロジェクト: xeno-by/libcuda
        public static JittedKernel JitKernel(this String ptx, JitTuning tuning, HardwareIsa target)
        {
            ptx.AssertNotNull();
            CudaDriver.Ensure();

            var compiler = new JitCompiler();
            compiler.Target = target;
            compiler.Tuning = tuning;

            var result = compiler.Compile(ptx);
            return new JittedKernel(result);
        }
コード例 #6
0
ファイル: JittedFunction.cs プロジェクト: xeno-by/libcuda
        public JittedFunction(CUfunction handle, String name)
        {
            CudaDriver.Ensure();
            Handle = handle.AssertThat(h => h.IsNotNull);
            Name = name ?? "N/A";

            MaxThreadsPerBlock = nvcuda.cuFuncGetAttribute(CUfunction_attribute.MaxThreadsPerBlock, this);
            SharedSizeBytes = nvcuda.cuFuncGetAttribute(CUfunction_attribute.SharedSizeBytes, this);
            ConstSizeBytes = nvcuda.cuFuncGetAttribute(CUfunction_attribute.ConstSizeBytes, this);
            LocalSizeBytes = nvcuda.cuFuncGetAttribute(CUfunction_attribute.LocalSizeBytes, this);
            NumRegs = nvcuda.cuFuncGetAttribute(CUfunction_attribute.NumRegs, this);
            PtxVersion = (HardwareIsa)nvcuda.cuFuncGetAttribute(CUfunction_attribute.PtxVersion, this);
            BinaryVersion = (HardwareIsa)nvcuda.cuFuncGetAttribute(CUfunction_attribute.BinaryVersion, this);
        }
コード例 #7
0
ファイル: JitFacade.cs プロジェクト: avaranovich/libcuda
        public static JittedKernel JitKernel(this String ptx, JitTuning tuning, HardwareIsa target)
        {
            ptx.AssertNotNull();
            CudaDriver.Ensure();

            var compiler = new JitCompiler();

            compiler.Target = target;
            compiler.Tuning = tuning;

            var result = compiler.Compile(ptx);

            return(new JittedKernel(result));
        }
コード例 #8
0
        public JittedFunction(CUfunction handle, String name)
        {
            CudaDriver.Ensure();
            Handle = handle.AssertThat(h => h.IsNotNull);
            Name   = name ?? "N/A";

            MaxThreadsPerBlock = nvcuda.cuFuncGetAttribute(CUfunction_attribute.MaxThreadsPerBlock, this);
            SharedSizeBytes    = nvcuda.cuFuncGetAttribute(CUfunction_attribute.SharedSizeBytes, this);
            ConstSizeBytes     = nvcuda.cuFuncGetAttribute(CUfunction_attribute.ConstSizeBytes, this);
            LocalSizeBytes     = nvcuda.cuFuncGetAttribute(CUfunction_attribute.LocalSizeBytes, this);
            NumRegs            = nvcuda.cuFuncGetAttribute(CUfunction_attribute.NumRegs, this);
            PtxVersion         = (HardwareIsa)nvcuda.cuFuncGetAttribute(CUfunction_attribute.PtxVersion, this);
            BinaryVersion      = (HardwareIsa)nvcuda.cuFuncGetAttribute(CUfunction_attribute.BinaryVersion, this);
        }
コード例 #9
0
ファイル: CUjit_target.cs プロジェクト: avaranovich/libcuda
 public static CUjit_target ToCUjit_target(this HardwareIsa hardwareIsa)
 {
     switch (hardwareIsa)
     {
         case HardwareIsa.SM_10:
             return CUjit_target.Compute10;
         case HardwareIsa.SM_11:
             return CUjit_target.Compute11;
         case HardwareIsa.SM_12:
             return CUjit_target.Compute12;
         case HardwareIsa.SM_13:
             return CUjit_target.Compute13;
         case HardwareIsa.SM_20:
             return CUjit_target.Compute20;
         case 0:
             return 0;
         default:
             throw AssertionHelper.Fail();
     }
 }
コード例 #10
0
ファイル: Quantum15Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum15Attribute(HardwareIsa hardwareIsa)
     : this(null, SoftwareIsa.PTX_15, hardwareIsa.AssertThat(isa => isa < HardwareIsa.SM_20))
 {
 }
コード例 #11
0
ファイル: Atom15Attribute.cs プロジェクト: xeno-by/libptx
 public Atom15Attribute(String signature, HardwareIsa hardwareIsa)
     : this(signature, SoftwareIsa.PTX_15, hardwareIsa.AssertThat(isa => isa < HardwareIsa.SM_20))
 {
 }
コード例 #12
0
ファイル: Atom15Attribute.cs プロジェクト: xeno-by/libptx
 public Atom15Attribute(SoftwareIsa softwareIsa, HardwareIsa hardwareIsa)
     : this(null, softwareIsa, hardwareIsa)
 {
 }
コード例 #13
0
ファイル: Atom15Attribute.cs プロジェクト: xeno-by/libptx
 public Atom15Attribute(HardwareIsa hardwareIsa)
     : this(null, SoftwareIsa.PTX_15, hardwareIsa.AssertThat(isa => isa < HardwareIsa.SM_20))
 {
 }
コード例 #14
0
ファイル: Atom20Attribute.cs プロジェクト: xeno-by/libptx
 public Atom20Attribute(HardwareIsa hardwareIsa)
     : this(null, SoftwareIsa.PTX_20, hardwareIsa)
 {
 }
コード例 #15
0
ファイル: PtxAttribute.cs プロジェクト: xeno-by/libptx
 public PtxAttribute(String code, HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
 {
     Code = code;
     Target = hardwareIsa;
     Version = softwareIsa;
 }
コード例 #16
0
ファイル: PtxopAttribute.cs プロジェクト: xeno-by/libptx
 public PtxopAttribute(SoftwareIsa softwareIsa, HardwareIsa hardwareIsa)
     : this(null, softwareIsa, hardwareIsa)
 {
 }
コード例 #17
0
ファイル: Atom20Attribute.cs プロジェクト: xeno-by/libptx
 public Atom20Attribute(String signature, SoftwareIsa softwareIsa, HardwareIsa hardwareIsa)
     : base(signature, softwareIsa.AssertThat(isa => isa >= SoftwareIsa.PTX_20), hardwareIsa.AssertThat(isa => isa >= HardwareIsa.SM_20))
 {
 }
コード例 #18
0
ファイル: Quantum15Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum15Attribute(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(null, softwareIsa, hardwareIsa)
 {
 }
コード例 #19
0
ファイル: Quantum15Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum15Attribute(String signature, HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : base(signature, softwareIsa, hardwareIsa)
 {
 }
コード例 #20
0
ファイル: PragmaAttribute.cs プロジェクト: xeno-by/libptx
 public PragmaAttribute(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(null, softwareIsa, hardwareIsa)
 {
 }
コード例 #21
0
ファイル: Quantum20Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum20Attribute(String signature, HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : base(signature, softwareIsa.AssertThat(isa => isa >= SoftwareIsa.PTX_20), hardwareIsa.AssertThat(isa => isa >= HardwareIsa.SM_20))
 {
 }
コード例 #22
0
ファイル: Quantum20Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum20Attribute(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(null, softwareIsa.AssertThat(isa => isa >= SoftwareIsa.PTX_20), hardwareIsa.AssertThat(isa => isa >= HardwareIsa.SM_20))
 {
 }
コード例 #23
0
ファイル: Quantum20Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum20Attribute(HardwareIsa hardwareIsa)
     : this(null, SoftwareIsa.PTX_20, hardwareIsa)
 {
 }
コード例 #24
0
ファイル: Ptxop15Attribute.cs プロジェクト: xeno-by/libptx
 public Ptxop15Attribute(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(null, softwareIsa, hardwareIsa)
 {
 }
コード例 #25
0
ファイル: Quantum15Attribute.cs プロジェクト: xeno-by/libptx
 protected Quantum15Attribute(String signature, HardwareIsa hardwareIsa)
     : this(signature, SoftwareIsa.PTX_15, hardwareIsa.AssertThat(isa => isa < HardwareIsa.SM_20))
 {
 }
コード例 #26
0
ファイル: Module.cs プロジェクト: xeno-by/libptx
 public Module(HardwareIsa hardwareIsa)
     : this(hardwareIsa < HardwareIsa.SM_20 ? SoftwareIsa.PTX_10 : SoftwareIsa.PTX_20, hardwareIsa)
 {
 }
コード例 #27
0
ファイル: AtomAttribute.cs プロジェクト: xeno-by/libptx
 public AtomAttribute(HardwareIsa hardwareIsa)
     : this(null, hardwareIsa < HardwareIsa.SM_20 ? SoftwareIsa.PTX_10 : SoftwareIsa.PTX_20, hardwareIsa)
 {
 }
コード例 #28
0
ファイル: AtomAttribute.cs プロジェクト: xeno-by/libptx
 public AtomAttribute(String signature, HardwareIsa hardwareIsa)
     : this(signature, hardwareIsa < HardwareIsa.SM_20 ? SoftwareIsa.PTX_10 : SoftwareIsa.PTX_20, hardwareIsa)
 {
 }
コード例 #29
0
ファイル: PtxopAttribute.cs プロジェクト: xeno-by/libptx
 public PtxopAttribute(String signature, SoftwareIsa softwareIsa, HardwareIsa hardwareIsa)
     : base(signature, softwareIsa, hardwareIsa)
 {
 }
コード例 #30
0
ファイル: Atom20Attribute.cs プロジェクト: xeno-by/libptx
 public Atom20Attribute(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(null, softwareIsa.AssertThat(isa => isa >= SoftwareIsa.PTX_20), hardwareIsa.AssertThat(isa => isa >= HardwareIsa.SM_20))
 {
 }
コード例 #31
0
ファイル: AtomAttribute.cs プロジェクト: xeno-by/libptx
 public AtomAttribute(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(null, softwareIsa, hardwareIsa)
 {
 }
コード例 #32
0
ファイル: Module.cs プロジェクト: xeno-by/libptx
 public Module(HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : this(softwareIsa, hardwareIsa)
 {
 }
コード例 #33
0
ファイル: AtomAttribute.cs プロジェクト: xeno-by/libptx
 public AtomAttribute(String signature, HardwareIsa hardwareIsa, SoftwareIsa softwareIsa)
     : base(signature, softwareIsa, hardwareIsa)
 {
 }
コード例 #34
0
ファイル: PtxAttribute.cs プロジェクト: xeno-by/libptx
 public PtxAttribute(String code, HardwareIsa hardwareIsa)
     : this(code, hardwareIsa, SoftwareIsa.PTX_10)
 {
 }