public MemoryTier this[Ref @ref] { get { return this[@ref.AssertNotNull().Sym]; } }
public MemoryTier this[Ref @ref] { get { return(this[@ref.AssertNotNull().Sym]); } }
public Layout this[Ref @ref] { get { @ref.AssertNotNull(); var local = @ref.Sym.AssertCast <Local>(); return(_locals_cache.GetOrCreate(local, () => { var t = @ref.Type(); if (_scheme[@ref] == MemoryTier.Private) { if (t.IsArray) { throw AssertionHelper.Fail(); } else { (t.IsCudaPrimitive() || t.IsCudaVector()).AssertTrue(); var slot = new Reg { Type = @ref.Type(), Name = @ref.Sym.Name }; return new SlotLayout(@ref, slot); } } else if (_scheme[@ref] == MemoryTier.Shared) { if (t.IsArray) { throw AssertionHelper.Fail(); } else { throw AssertionHelper.Fail(); } } else if (_scheme[@ref] == MemoryTier.Global) { if (t.IsArray) { throw AssertionHelper.Fail(); } else { throw AssertionHelper.Fail(); } } else { throw AssertionHelper.Fail(); } })); } }
public Layout this[Ref @ref] { get { @ref.AssertNotNull(); var local = @ref.Sym.AssertCast<Local>(); return _locals_cache.GetOrCreate(local, () => { var t = @ref.Type(); if (_scheme[@ref] == MemoryTier.Private) { if (t.IsArray) { throw AssertionHelper.Fail(); } else { (t.IsCudaPrimitive() || t.IsCudaVector()).AssertTrue(); var slot = new Reg{Type = @ref.Type(), Name = @ref.Sym.Name}; return new SlotLayout(@ref, slot); } } else if (_scheme[@ref] == MemoryTier.Shared) { if (t.IsArray) { throw AssertionHelper.Fail(); } else { throw AssertionHelper.Fail(); } } else if (_scheme[@ref] == MemoryTier.Global) { if (t.IsArray) { throw AssertionHelper.Fail(); } else { throw AssertionHelper.Fail(); } } else { throw AssertionHelper.Fail(); } }); } }