亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? symbols.c

?? nVidia開發(fā)的圖形語言 Cg
?? C
?? 第 1 頁 / 共 3 頁
字號:

/*
 * NewType() - Allocate a new type struct.
 *
 */

Type *NewType(int properties, int size)
{
    Type *lType;

    lType = (Type *) malloc(sizeof(Type));
    InitType(lType);
    lType->properties = properties;
    lType->co.size = size;
    return lType;
} // NewType

/*
 * DupType() - Duplicate a type struct.
 *
 */

Type *DupType(Type *fType)
{
    Type *lType;

    lType = (Type *) malloc(sizeof(Type));
    *lType = *fType;
    return lType;
} // DupType

/*
 * NewPackedArrayType() - Define a new packed (vector) array type.
 *
 */

Type *NewPackedArrayType(Type *elType, int numels, int properties)
{
    Type *lType;

    lType = NewType(TYPE_CATEGORY_ARRAY | TYPE_MISC_PACKED | properties | GetBase(elType), 0);
    lType->arr.eltype = elType;
    lType->arr.numels = numels;
    lType->arr.size = Cg->theHAL->GetSizeof(lType);
    return lType;
} // NewPakedArrayType

/*************************************** Category Functions **********************************/

/*
 * IsCategory() - See if a type is of the given category.
 *
 */

int IsCategory(const Type *fType, int category)
{
    if (fType && (fType->properties & TYPE_CATEGORY_MASK) == category) {
        return 1;
    } else {
        return 0;
    }
} // IsCategory

/*
 * IsTypeBase() - See if a type is of the given base.
 *
 */

int IsTypeBase(const Type *fType, int base)
{
    if (fType && (fType->properties & TYPE_BASE_MASK) == base) {
        return 1;
    } else {
        return 0;
    }
} // IsTypeBase

/*
 * IsVoid() - Returns TRUE if a void type.
 *
 */

int IsVoid(const Type *fType)
{
    if (fType && (fType->properties & TYPE_MISC_VOID)) {
        return 1;
    } else {
        return 0;
    }
} // IsVoid

/*
 * IsBoolean() - Returns TRUE if a Boolean type.
 *
 */

int IsBoolean(const Type *fType)
{
    if (fType && (fType->properties & TYPE_BASE_MASK) == TYPE_BASE_BOOLEAN) {
        return 1;
    } else {
        return 0;
    }
} // IsBoolean

/*
 * IsScalar() - Returns TRUE if a scalar type.
 *
 */

int IsScalar(const Type *fType)
{
    if (fType && (fType->properties & TYPE_CATEGORY_MASK) == TYPE_CATEGORY_SCALAR) {
        return 1;
    } else {
        return 0;
    }
} // IsScalar

/*
 * IsArray() - Returns TRUE if a packed or unpacked array type.
 *
 */

int IsArray(const Type *fType)
{
    if (fType && (fType->properties & TYPE_CATEGORY_MASK) == TYPE_CATEGORY_ARRAY) {
        return 1;
    } else {
        return 0;
    }
} // IsScalar

/*
 * IsVector() - Returns TRUE if a vector type.
 *
 */

int IsVector(const Type *fType, int *len)
{
    if (fType &&
        (fType->properties & TYPE_CATEGORY_MASK) == TYPE_CATEGORY_ARRAY &&
        (fType->properties & TYPE_MISC_PACKED) &&
        !IsArray(fType->arr.eltype))
    {
        if (len)
            *len = fType->arr.numels;
        return 1;
    } else {
        return 0;
    }
} // IsVector

/*
 * IsMatrix() - Returns TRUE if a matrix type.
 *
 */

int IsMatrix(const Type *fType, int *len, int *len2)
{
    if (fType &&
        (fType->properties & TYPE_CATEGORY_MASK) == TYPE_CATEGORY_ARRAY &&
        (fType->properties & TYPE_MISC_PACKED) &&
        IsVector(fType->arr.eltype, len))
    {
        if (len2)
            *len2 = fType->arr.numels;
        return 1;
    } else {
        return 0;
    }
} // IsMatrix

/*
 * IsUnsizedArray() - Returns TRUE if an array with an unspecified number of elements.
 *
 */

int IsUnsizedArray(const Type *fType)
{
    if (GetCategory(fType) == TYPE_CATEGORY_ARRAY &&
        fType->arr.numels == 0)
    {
        return 1;
    } else {
        return 0;
    }
} // IsUnsizedArray

/*
 * IsStruct() - Returns TRUE if a struct.
 *
 */

int IsStruct(const Type *fType)
{
    if (fType &&
        GetCategory(fType) == TYPE_CATEGORY_STRUCT)
    {
        return 1;
    } else {
        return 0;
    }
} // IsStruct

/*
 * IsProgram() - See if a type is a program.
 *
 */

int IsProgram(const Type *fType)
{
    if (fType && (fType->properties & TYPE_MISC_PROGRAM)) {
        return 1;
    } else {
        return 0;
    }
} // IsProgram

/*
 * IsPacked()
 *
 */

int IsPacked(const Type *fType)
{
    if (fType && (fType->properties & TYPE_MISC_PACKED)) {
        return 1;
    } else {
        return 0;
    }
} // IsPacked

/*
 * IsSameUnqualifiedType() - Returns TRUE if the unqualified types aType and bType are the same.
 *
 */

int IsSameUnqualifiedType(const Type *aType, const Type *bType)
{
    const int UnQMask = TYPE_BASE_MASK | TYPE_CATEGORY_MASK ; // 020122 // | TYPE_DOMAIN_MASK;

    if (aType == bType) {
        return 1;
    } else {
        if ((aType->properties & UnQMask) == (bType->properties & UnQMask)) {
            switch (aType->properties & TYPE_CATEGORY_MASK) {
            case TYPE_CATEGORY_SCALAR:
                return 1;
            case TYPE_CATEGORY_ARRAY:
                if (aType->arr.numels == bType->arr.numels) {
                    // Should we check for Packed here??? I think so!
                    return IsSameUnqualifiedType(aType->arr.eltype, bType->arr.eltype);
                }
                break;
            case TYPE_CATEGORY_FUNCTION:
                break;
            case TYPE_CATEGORY_STRUCT:
                if (aType->str.unqualifiedtype == bType->str.unqualifiedtype)
                    return 1;
            default:
                break;
            }
        }
    }
    return 0;
} // IsSameUnqualifiedType

/*
 * IsTypedef() - See if a symbol is a typedef.
 *
 */

int IsTypedef(const Symbol *fSymb)
{
    if (fSymb && fSymb->kind == TYPEDEF_S) {
        return 1;
    } else {
        return 0;
    }
} // IsTypedef

/*
 * IsFunction() - See if a symbol is a function.
 *
 */

int IsFunction(const Symbol *fSymb)
{
    if (fSymb && fSymb->kind == FUNCTION_S) {
        return 1;
    } else {
        return 0;
    }
} // IsFunction

/*
 * IsInline() - See if a symbol is an inline function.
 *
 */

int IsInline(const Symbol *fSymb)
{
    if (fSymb && fSymb->kind == FUNCTION_S && (fSymb->properties & SYMB_IS_INLINE_FUNCTION)) {
        return 1;
    } else {
        return 0;
    }
} // IsInline

/*
 * GetBase() - Return the base attributes of a type.
 *
 */

int GetBase(const Type *fType)
{
    if (fType) {
        return fType->properties & TYPE_BASE_MASK;
    } else {
        return TYPE_BASE_NO_TYPE;
    }
} // GetBase

/*
 * GetCategory() - Return the categpry of a type.
 *
 */

int GetCategory(const Type *fType)
{
    if (fType) {
        return fType->properties & TYPE_CATEGORY_MASK;
    } else {
        return TYPE_CATEGORY_NONE;
    }
} // GetCategory

/*
 * GetDomain() - Return the domain of a type.
 *
 */

int GetDomain(const Type *fType)
{
    if (fType) {
        return fType->properties & TYPE_DOMAIN_MASK;
    } else {
        return TYPE_DOMAIN_UNKNOWN;
    }
} // GetDomain

/*
 * GetQualifiers() - Return a type's qualifiers.
 *
 */

int GetQualifiers(const Type *fType)
{
    if (fType) {
        return fType->properties & TYPE_QUALIFIER_MASK;
    } else {
        return TYPE_QUALIFIER_NONE;
    }
} // GetQualifiers

/*
 * GetQuadRegSize() - Return the number of quad registers required to hold an object
 *         of this type.  Minimum size is 1.
 */

int GetQuadRegSize(const Type *fType)
{
    if (fType) {
        return (fType->co.size + 3) >> 2;
    } else {
        return 1;
    }
} // GetQuadRegSize

/*
 * ClearTypeMisc() - Clear bits in the properties field a type.
 *
 */

void ClearTypeMisc(Type *fType, int misc)
{
    if (fType)
        fType->properties &= ~misc;
} // ClearTypeMisc

/*********************************************************************************************/
/************************************ Symbol Semantic Functions ******************************/
/*********************************************************************************************/

/*
 * LookUpLocalSymbol()
 *
 */

Symbol *LookUpLocalSymbol(Scope *fScope, int atom)
{
    Symbol *lSymb;
    int rname, ratom;

    ratom = GetReversedAtom(atable, atom);
    if (!fScope)
        fScope = CurrentScope;
    lSymb = fScope->symbols;
    while (lSymb) {
        rname = GetReversedAtom(atable, lSymb->name);
        if (rname == ratom) {
            return lSymb;
        } else {
            if (rname > ratom) {
                lSymb = lSymb->left;
            } else {
                lSymb = lSymb->right;
            }
        }
    }
    return NULL;
} // LookUpLocalSymbol

/*
 * LookUpLocalSymbolBySemanticName() - Lookup a symbol in a local tree by the : semantic name.
 *
 * Note:  The tree is not ordered for this lookup so the next field is used.  This only works
 * for structs and other scopes that maintain this list.
 *
 * Note: There can be multiple matches.  Returns the first.
 *
 */

Symbol *LookUpLocalSymbolBySemanticName(Scope *fScope, int atom)
{
    Symbol *lSymb;

    if (!fScope)
        return NULL;
    lSymb = fScope->symbols;
    while (lSymb) {
        if (lSymb->kind == VARIABLE_S) {
            if (lSymb->details.var.semantics == atom)
                return lSymb;
        }
        lSymb = lSymb->next;
    }
    return NULL;
} // LookUpLocalSymbolBySemanticName

/*
 * LookUpLocalSymbolByBindingName() - Lookup a symbol in a local tree by the lname in the
 *         semantic binding structure.
 *
 * Note:  The tree is not ordered for this lookup so the next field is used.  This only works
 * for structs and other scopes that maintain this list.
 *
 * Note: There can be multiple matches.  Returns the first.
 *
 */

Symbol *LookUpLocalSymbolByBindingName(Scope *fScope, int atom)
{
    Symbol *lSymb;

    if (!fScope)
        return NULL;
    lSymb = fScope->symbols;
    while (lSymb) {
        if (lSymb->kind == VARIABLE_S && lSymb->details.var.bind) {
            if (lSymb->details.var.bind->none.lname == atom)
                return lSymb;
        }
        lSymb = lSymb->next;
    }
    return NULL;
} // LookUpLocalSymbolByBindingName

/*
 * LookUpLocalTag()
 *
 */

Symbol *LookUpLocalTag(Scope *fScope, int atom)
{
    Symbol *lSymb;
    int rname, ratom;

    ratom = GetReversedAtom(atable, atom);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区二区三区av性色| 色综合久久中文字幕综合网| 精品久久一区二区| 国产在线精品一区二区不卡了 | 欧美日韩国产片| 蜜臀久久久久久久| 久久久久久久久久久久久久久99 | 波多野结衣欧美| 亚洲精品欧美专区| 欧美电影一区二区三区| 国产在线国偷精品免费看| 国产精品久久久久久久久免费相片 | 91精品国产综合久久久久| 久99久精品视频免费观看| 国产欧美一区二区精品秋霞影院 | 欧美精品精品一区| 国产乱码精品一区二区三区五月婷| 欧美韩国日本一区| av色综合久久天堂av综合| 亚洲国产欧美日韩另类综合| 欧美videos大乳护士334| 成年人网站91| 午夜电影一区二区| 欧美精彩视频一区二区三区| 91福利视频网站| 秋霞午夜鲁丝一区二区老狼| 国产精品午夜久久| 欧美久久久久久久久中文字幕| 久久不见久久见免费视频1| 国产精品激情偷乱一区二区∴| 666欧美在线视频| 99在线视频精品| 久久电影网站中文字幕| 亚洲精品亚洲人成人网在线播放| 日韩一区二区三区在线视频| 不卡欧美aaaaa| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲欧洲精品一区二区精品久久久| 8x8x8国产精品| 色综合天天视频在线观看| 九九九精品视频| 亚洲成人动漫av| 国产精品每日更新| 精品国内片67194| 欧美精三区欧美精三区 | 91成人免费在线| 国产精品一区二区你懂的| 亚洲大尺度视频在线观看| 欧美韩国日本不卡| 精品国产一区二区三区av性色| 欧美日韩亚洲国产综合| 91美女片黄在线观看91美女| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲综合一二三区| 中文字幕一区二区三区视频| 久久影院视频免费| 日韩美女天天操| 911精品产国品一二三产区| 色吧成人激情小说| 91网站最新地址| 99在线精品观看| 99久免费精品视频在线观看| 国产91精品欧美| 国产99久久久国产精品| 韩国精品一区二区| 精品一区二区精品| 免费观看在线综合| 日韩精品亚洲一区二区三区免费| 亚洲图片有声小说| 亚洲国产一区视频| 亚洲一区二区三区四区的| 亚洲日本中文字幕区| 专区另类欧美日韩| 亚洲视频网在线直播| 亚洲欧洲av一区二区三区久久| 国产精品网曝门| 日韩一区在线看| 亚洲人精品午夜| 一区二区三区在线免费观看| 亚洲国产精品久久久男人的天堂| 亚洲激情网站免费观看| 亚洲一区二区三区四区五区中文| 亚洲狠狠爱一区二区三区| 亚洲国产综合人成综合网站| 偷拍自拍另类欧美| 美国精品在线观看| 国产真实乱子伦精品视频| 国产成人av影院| av午夜一区麻豆| 欧美色中文字幕| 91精品国产综合久久香蕉的特点| 欧美电视剧在线看免费| 久久精品视频免费| 亚洲女人的天堂| 日欧美一区二区| 国产在线观看一区二区| 成人毛片老司机大片| 色婷婷香蕉在线一区二区| 777奇米四色成人影色区| 日韩免费高清av| 国产精品久久久久永久免费观看| 亚洲欧美视频一区| 日韩精品一二三| 豆国产96在线|亚洲| 91成人在线免费观看| 欧美一区永久视频免费观看| 久久久精品人体av艺术| 亚洲欧美日韩电影| 免费人成黄页网站在线一区二区 | 成人网在线免费视频| 欧美天堂一区二区三区| 精品国产99国产精品| 国产精品国产三级国产a| 午夜久久久久久电影| 国产一区二区按摩在线观看| 99re成人精品视频| 欧美一区二区三区啪啪| 国产精品美女久久久久久久久久久| 亚洲综合色婷婷| 国产成人免费9x9x人网站视频| 欧美午夜免费电影| 国产人伦精品一区二区| 日韩专区欧美专区| av影院午夜一区| 精品对白一区国产伦| 一区二区三区在线观看动漫| 国产福利一区在线观看| 这里只有精品99re| 亚洲精品中文字幕在线观看| 国产原创一区二区三区| 91视频国产资源| 国产午夜精品久久久久久免费视| 亚洲va欧美va人人爽| 成人免费电影视频| 日韩免费视频线观看| 亚洲一区二区三区四区的| 成人免费毛片嘿嘿连载视频| 日韩精品专区在线影院观看| 亚洲一区二区偷拍精品| 99久久99久久精品免费看蜜桃| 337p粉嫩大胆色噜噜噜噜亚洲 | 日韩网站在线看片你懂的| 一区二区三区精品视频在线| 成人性视频网站| 精品国产亚洲在线| 人人狠狠综合久久亚洲| 91电影在线观看| 亚洲精品高清在线观看| 99久久综合99久久综合网站| 中文字幕av一区二区三区免费看| 九九久久精品视频| 精品剧情在线观看| 蜜桃视频免费观看一区| 欧美一级日韩免费不卡| 香蕉久久夜色精品国产使用方法| 色婷婷亚洲综合| 亚洲精选视频免费看| av网站免费线看精品| 1024成人网色www| 99久久精品免费看国产| 一色屋精品亚洲香蕉网站| 不卡视频在线看| 国产精品久久久久久户外露出 | 久久在线免费观看| 国产一区二三区好的| 精品国产91久久久久久久妲己 | 日韩精品在线一区| 久色婷婷小香蕉久久| 欧美成人一区二区三区| 精品午夜一区二区三区在线观看| 日韩美一区二区三区| 国产综合色精品一区二区三区| 久久久久久黄色| 成人在线视频首页| **性色生活片久久毛片| 91福利在线看| 日本大胆欧美人术艺术动态| 日韩欧美的一区| 国产成人在线免费观看| 国产精品电影院| 欧美日精品一区视频| 免费欧美日韩国产三级电影| 337p日本欧洲亚洲大胆色噜噜| 国产成人av网站| 一个色妞综合视频在线观看| 欧美少妇xxx| 精品一区二区日韩| 亚洲欧洲av一区二区三区久久| 91行情网站电视在线观看高清版| 亚洲h在线观看| 久久久亚洲欧洲日产国码αv| 成人av免费网站| 亚洲18女电影在线观看| 精品国产乱码久久久久久久久| 成人精品电影在线观看| 亚洲高清不卡在线观看| 精品国产乱码久久久久久久久| a4yy欧美一区二区三区| 午夜视频久久久久久| 久久综合九色综合久久久精品综合 |