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

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

?? support_iter.c

?? nVidia開發(fā)的圖形語言 Cg
?? C
字號(hào):
/****************************************************************************\
Copyright (c) 2002, NVIDIA Corporation.

NVIDIA Corporation("NVIDIA") supplies this software to you in
consideration of your agreement to the following terms, and your use,
installation, modification or redistribution of this NVIDIA software
constitutes acceptance of these terms.  If you do not agree with these
terms, please do not use, install, modify or redistribute this NVIDIA
software.

In consideration of your agreement to abide by the following terms, and
subject to these terms, NVIDIA grants you a personal, non-exclusive
license, under NVIDIA's copyrights in this original NVIDIA software (the
"NVIDIA Software"), to use, reproduce, modify and redistribute the
NVIDIA Software, with or without modifications, in source and/or binary
forms; provided that if you redistribute the NVIDIA Software, you must
retain the copyright notice of NVIDIA, this notice and the following
text and disclaimers in all such redistributions of the NVIDIA Software.
Neither the name, trademarks, service marks nor logos of NVIDIA
Corporation may be used to endorse or promote products derived from the
NVIDIA Software without specific prior written permission from NVIDIA.
Except as expressly stated in this notice, no other rights or licenses
express or implied, are granted by NVIDIA herein, including but not
limited to any patent rights that may be infringed by your derivative
works or by other works in which the NVIDIA Software may be
incorporated. No hardware is licensed hereunder. 

THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER
PRODUCTS.

IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT,
INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY
OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE
NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\****************************************************************************/
// support_iter.c
//
// Routines to iterate over the expr/stmt graph
//

#include <assert.h>
#include <stdlib.h>
#include <stdio.h>

#include "slglobals.h"

/*
 * ApplyToNodes() - Walk an expression tree and apply "pre" and "post" to
 * each node.  pre is applied in prefix order, and post in postfix
 *
 */
expr *ApplyToNodes(expr *(*pre)(expr *, void *, int),
                   expr *(*post)(expr *, void *, int),
                   expr *fExpr, void *arg1, int arg2)
{
    if (fExpr) {
        if (pre) fExpr = pre(fExpr, arg1, arg2);
        switch (fExpr->common.kind) {
        case DECL_N:
        case SYMB_N:
        case CONST_N:
            break;
        case UNARY_N:
            fExpr->un.arg = ApplyToNodes(pre, post, fExpr->un.arg, arg1, arg2);
            break;
        case BINARY_N:
            fExpr->bin.left = ApplyToNodes(pre, post, fExpr->bin.left, arg1, arg2);
            fExpr->bin.right = ApplyToNodes(pre, post, fExpr->bin.right, arg1, arg2);
            break;
        case TRINARY_N:
            fExpr->tri.arg1 = ApplyToNodes(pre, post, fExpr->tri.arg1, arg1, arg2);
            fExpr->tri.arg2 = ApplyToNodes(pre, post, fExpr->tri.arg2, arg1, arg2);
            fExpr->tri.arg3 = ApplyToNodes(pre, post, fExpr->tri.arg3, arg1, arg2);
            break;
        default:
            assert(!"bad kind to ApplyToNodes()");
            break;
        }
        if (post) fExpr = post(fExpr, arg1, arg2);
    }
    return fExpr;
} // ApplyToNodes

/*
 * ApplyToExpressions() - Walk a source tree and apply "fun" to each node in each
 *         expression in prefix order.
 */

void ApplyToExpressions(expr *(*pre)(expr *, void *, int),
                        expr *(*post)(expr *, void *, int),
                        stmt *fStmt, void *arg1, int arg2)
{
    while (fStmt) {
        Cg->lastSourceLoc = fStmt->commonst.loc;
        switch (fStmt->exprst.kind) {
        case EXPR_STMT:
            fStmt->exprst.exp = ApplyToNodes(pre, post, fStmt->exprst.exp, arg1, arg2);
            break;
        case IF_STMT:
            fStmt->ifst.cond = ApplyToNodes(pre, post, fStmt->ifst.cond, arg1, arg2);
            ApplyToExpressions(pre, post, fStmt->ifst.thenstmt, arg1, arg2);
            ApplyToExpressions(pre, post, fStmt->ifst.elsestmt, arg1, arg2);
            break;
        case WHILE_STMT:
        case DO_STMT:
            fStmt->whilest.cond = ApplyToNodes(pre, post, fStmt->whilest.cond, arg1, arg2);
            ApplyToExpressions(pre, post, fStmt->whilest.body, arg1, arg2);
            break;
        case FOR_STMT:
            ApplyToExpressions(pre, post, fStmt->forst.init, arg1, arg2);
            fStmt->forst.cond = ApplyToNodes(pre, post, fStmt->forst.cond, arg1, arg2);
            ApplyToExpressions(pre, post, fStmt->forst.body, arg1, arg2);
            ApplyToExpressions(pre, post, fStmt->forst.step, arg1, arg2);
            break;
        case BLOCK_STMT:
            ApplyToExpressions(pre, post, fStmt->blockst.body, arg1, arg2);
            break;
        case RETURN_STMT:
            fStmt->returnst.exp = ApplyToNodes(pre, post, fStmt->returnst.exp, arg1, arg2);
            break;
        case DISCARD_STMT:
            fStmt->discardst.cond = ApplyToNodes(pre, post, fStmt->discardst.cond, arg1, arg2);
            break;
        case COMMENT_STMT:
            break;
        default:
            assert(0);
            break;
        }
        fStmt = fStmt->exprst.next;
    }
} // ApplyToExpressions

/*
 * ApplyToExpressionsLocal() - Apply a function to each node in the expressions contained in
 *         a single statement.
 */

void ApplyToExpressionsLocal(expr *(*pre)(expr *, void *, int),
                             expr *(*post)(expr *, void *, int),
                             stmt *fStmt, void *arg1, int arg2)
{
    if (fStmt) {
        Cg->lastSourceLoc = fStmt->commonst.loc;
        switch (fStmt->exprst.kind) {
        case EXPR_STMT:
            fStmt->exprst.exp = ApplyToNodes(pre, post, fStmt->exprst.exp, arg1, arg2);
            break;
        case IF_STMT:
            fStmt->ifst.cond = ApplyToNodes(pre, post, fStmt->ifst.cond, arg1, arg2);
            break;
        case WHILE_STMT:
        case DO_STMT:
            fStmt->whilest.cond = ApplyToNodes(pre, post, fStmt->whilest.cond, arg1, arg2);
            break;
        case FOR_STMT:
            fStmt->forst.cond = ApplyToNodes(pre, post, fStmt->forst.cond, arg1, arg2);
            break;
        case BLOCK_STMT:
            break;
        case RETURN_STMT:
            fStmt->returnst.exp = ApplyToNodes(pre, post, fStmt->returnst.exp, arg1, arg2);
            break;
        case DISCARD_STMT:
            fStmt->discardst.cond = ApplyToNodes(pre, post, fStmt->discardst.cond, arg1, arg2);
            break;
        case COMMENT_STMT:
            break;
        default:
            assert(0);
            break;
        }
        //fStmt = fStmt->exprst.next;
    }
} // ApplyToExpressionsLocal

/*
 * ApplyToTopExpressions() - Walk a source tree and apply a function to each expression.
 *
 */

void ApplyToTopExpressions(expr *(*fun)(expr *, void *, int), stmt *fStmt, void *arg1, int arg2)
{
    while (fStmt) {
        Cg->lastSourceLoc = fStmt->commonst.loc;
        switch (fStmt->exprst.kind) {
        case EXPR_STMT:
            fStmt->exprst.exp = fun(fStmt->exprst.exp, arg1, arg2);
            break;
        case IF_STMT:
            fStmt->ifst.cond = fun(fStmt->ifst.cond, arg1, arg2);
            ApplyToTopExpressions(fun, fStmt->ifst.thenstmt, arg1, arg2);
            ApplyToTopExpressions(fun, fStmt->ifst.elsestmt, arg1, arg2);
            break;
        case WHILE_STMT:
        case DO_STMT:
            fStmt->whilest.cond = fun(fStmt->whilest.cond, arg1, arg2);
            ApplyToTopExpressions(fun, fStmt->whilest.body, arg1, arg2);
            break;
        case FOR_STMT:
            ApplyToTopExpressions(fun, fStmt->forst.init, arg1, arg2);
            fStmt->forst.cond = fun(fStmt->forst.cond, arg1, arg2);
            ApplyToTopExpressions(fun, fStmt->forst.body, arg1, arg2);
            ApplyToTopExpressions(fun, fStmt->forst.step, arg1, arg2);
            break;
        case BLOCK_STMT:
            ApplyToTopExpressions(fun, fStmt->blockst.body, arg1, arg2);
            break;
        case RETURN_STMT:
            fStmt->returnst.exp = fun(fStmt->returnst.exp, arg1, arg2);
            break;
        case DISCARD_STMT:
            fStmt->discardst.cond = fun(fStmt->discardst.cond, arg1, arg2);
            break;
        case COMMENT_STMT:
            break;
        default:
            assert(0);
            break;
        }
        fStmt = fStmt->exprst.next;
    }
} // ApplyToTopExpressions

/*
 * ApplyToStatements() - Walk a source tree and apply a transformations to
 *    each statememt
 */

stmt *ApplyToStatements(stmt *(*pre)(stmt *, void *, int),
                        stmt *(*post)(stmt *, void *, int),
                        stmt *fStmt, void *arg1, int arg2)
{
    stmt *head = NULL, *last = NULL, *lStmt, *next, *rest = fStmt;

    while (fStmt) {
        // Transform each statement into a possible NULL list of statements:
        // Prepend any statements returned to the list to be processed, and
        // remember what the next one to be done is (rest), so we don't
        // rerun pre on any of the returned statements directly.
        if (pre && rest == fStmt) {
            Cg->lastSourceLoc = fStmt->commonst.loc;
            rest = fStmt->commonst.next;
            fStmt->commonst.next = NULL;
            lStmt = pre(fStmt, arg1, arg2);
            if (lStmt) {
                fStmt = lStmt;
                while (lStmt->commonst.next && lStmt->commentst.next != rest) {
                    lStmt = lStmt->commonst.next;
                }
                lStmt->commonst.next = rest;
            } else {
                // Nothing returned - go to next statement:
                fStmt = rest;
                continue;
            }
        }

        // Now apply transformation to substatements:

        switch (fStmt->exprst.kind) {
        case EXPR_STMT:
            break;
        case IF_STMT:
            fStmt->ifst.thenstmt = ApplyToStatements(pre, post, fStmt->ifst.thenstmt, arg1, arg2);
            fStmt->ifst.elsestmt = ApplyToStatements(pre, post, fStmt->ifst.elsestmt, arg1, arg2);
            break;
        case WHILE_STMT:
        case DO_STMT:
            fStmt->whilest.body = ApplyToStatements(pre, post, fStmt->whilest.body, arg1, arg2);
            break;
        case FOR_STMT:
            fStmt->forst.init = ApplyToStatements(pre, post, fStmt->forst.init, arg1, arg2);
            fStmt->forst.body = ApplyToStatements(pre, post, fStmt->forst.body, arg1, arg2);
            fStmt->forst.step = ApplyToStatements(pre, post, fStmt->forst.step, arg1, arg2);
            break;
        case BLOCK_STMT:
            fStmt->blockst.body = ApplyToStatements(pre, post, fStmt->blockst.body, arg1, arg2);
            break;
        case RETURN_STMT:
        case DISCARD_STMT:
        case COMMENT_STMT:
            break;
        default:
            assert(0);
            break;
        }

        // Append any statements returned by "post" to the end of the list:

        next = fStmt->commonst.next;
        if (post) {
            Cg->lastSourceLoc = fStmt->commonst.loc;
            lStmt = post(fStmt, arg1, arg2);
        } else {
            lStmt = fStmt;
        }
        if (lStmt) {
            if (head) {
                last->commonst.next = lStmt;
            } else {
                head = lStmt;
            }
            last = lStmt;
            while (last->commonst.next && last->commentst.next != next) {
                last = last->commonst.next;
            }
            last->commonst.next = NULL;
        }
        fStmt = next;
    }
    return head;
} // ApplyToStatements

/*
 * PostApplyToChildStatements() - Apply a postfix order transformation to each child
 *         statememt of this statement.
 */

void PostApplyToChildStatements(stmt *(*fun)(stmt *, void *, int), stmt *fStmt, void *arg1, int arg2)
{
    if (fStmt) {

        // Apply a transformation to each nested statement, but not the top level statements:

        Cg->lastSourceLoc = fStmt->commonst.loc;
        switch (fStmt->exprst.kind) {
        case EXPR_STMT:
            break;
        case IF_STMT:
            fStmt->ifst.thenstmt = PostApplyToStatements(fun, fStmt->ifst.thenstmt, arg1, arg2);
            fStmt->ifst.elsestmt = PostApplyToStatements(fun, fStmt->ifst.elsestmt, arg1, arg2);
            break;
        case WHILE_STMT:
        case DO_STMT:
            fStmt->whilest.body = PostApplyToStatements(fun, fStmt->whilest.body, arg1, arg2);
            break;
        case FOR_STMT:
            fStmt->forst.init = PostApplyToStatements(fun, fStmt->forst.init, arg1, arg2);
            fStmt->forst.body = PostApplyToStatements(fun, fStmt->forst.body, arg1, arg2);
            fStmt->forst.step = PostApplyToStatements(fun, fStmt->forst.step, arg1, arg2);
            break;
        case BLOCK_STMT:
            fStmt->blockst.body = PostApplyToStatements(fun, fStmt->blockst.body, arg1, arg2);
            break;
        case RETURN_STMT:
        case DISCARD_STMT:
        case COMMENT_STMT:
            break;
        default:
            assert(0);
            break;
        }
    }
} // PostApplyToChildStatements

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国理伦片一区二区三区在线播放 | 亚洲一区二区不卡免费| 久久九九久久九九| 久久婷婷国产综合国色天香| 精品少妇一区二区三区免费观看 | 欧美日韩视频在线第一区| 精品视频在线视频| 欧美一级二级三级蜜桃| 日韩一区二区三区电影| 日韩免费视频一区| 久久精品一级爱片| 中文在线一区二区| 亚洲精品欧美综合四区| 亚洲一区免费观看| 日本最新不卡在线| 九九精品一区二区| 国产a精品视频| 91在线免费播放| 欧美三片在线视频观看 | 日本强好片久久久久久aaa| 日本午夜一本久久久综合| 久久精品国产第一区二区三区| 久久99精品一区二区三区| 国产91富婆露脸刺激对白| 91麻豆国产香蕉久久精品| 欧美日韩中文字幕一区二区| 日韩欧美123| 国产精品国产馆在线真实露脸| 亚洲女爱视频在线| 美女免费视频一区| 国产传媒日韩欧美成人| 色婷婷久久久综合中文字幕 | 日韩主播视频在线| 国产真实乱偷精品视频免| av在线不卡电影| 欧美撒尿777hd撒尿| 日韩精品一区二区三区视频| 国产精品午夜在线观看| 亚洲国产wwwccc36天堂| 精品一区二区三区久久| 色综合久久久久综合| 4438成人网| 国产精品美女久久久久高潮| 亚洲国产wwwccc36天堂| 国产裸体歌舞团一区二区| 色偷偷成人一区二区三区91| 欧美成人高清电影在线| 亚洲欧美日韩电影| 韩国欧美国产一区| 欧美亚洲动漫精品| 国产日韩欧美一区二区三区乱码| 亚洲成人综合在线| 成人深夜福利app| 日韩视频一区二区三区在线播放| 国产精品福利av| 美日韩一区二区三区| 91丨porny丨蝌蚪视频| 日韩美一区二区三区| 亚洲区小说区图片区qvod| 精品一区二区免费看| 欧美又粗又大又爽| 亚洲国产精品t66y| 老司机精品视频在线| 91成人在线精品| 国产精品伦理在线| 国产一区二区三区免费观看| 欧美老年两性高潮| 亚洲欧美日韩国产综合| 国产精品一区在线| 91精品国产一区二区| 亚洲一区二区在线播放相泽| 国产69精品久久777的优势| 欧美一卡二卡三卡四卡| 亚洲精品视频在线| 99在线精品一区二区三区| 欧美成人国产一区二区| 视频一区欧美精品| 色综合久久久网| 国产精品丝袜久久久久久app| 日本亚洲天堂网| 欧美色图天堂网| 亚洲码国产岛国毛片在线| 高清shemale亚洲人妖| 精品国产一区二区三区av性色| 五月天婷婷综合| 日本电影欧美片| 专区另类欧美日韩| 不卡一区二区在线| 国产午夜精品理论片a级大结局| 久久99国产精品久久99果冻传媒| 欧美老女人第四色| 亚洲成人先锋电影| 欧美日韩卡一卡二| 性感美女久久精品| 欧美日韩一区成人| 亚洲成在人线在线播放| 欧美三级日韩在线| 亚洲3atv精品一区二区三区| 精品视频一区二区三区免费| 亚洲美女屁股眼交3| 99re这里只有精品首页| 自拍偷拍亚洲综合| 99热99精品| 亚洲视频小说图片| 日本韩国视频一区二区| 亚洲综合色区另类av| 在线观看一区日韩| 亚洲一区二区三区三| 欧美视频在线一区二区三区| 亚洲一区二区在线免费看| 欧美又粗又大又爽| 亚洲h精品动漫在线观看| 欧美高清视频www夜色资源网| 视频一区二区三区入口| 欧美一区2区视频在线观看| 久久99精品久久久久久国产越南| 2020国产精品| 成人免费视频免费观看| 亚洲少妇最新在线视频| 在线观看网站黄不卡| 亚洲成人免费影院| 欧美成人精精品一区二区频| 国产精品一区在线观看乱码| 国产精品国产三级国产aⅴ入口| 91网页版在线| 午夜成人免费电影| 日韩一区二区三区视频| 国产成人亚洲综合a∨猫咪| 国产精品久久久久桃色tv| 欧美性做爰猛烈叫床潮| 六月丁香婷婷色狠狠久久| 国产亚洲美州欧州综合国| av一区二区三区四区| 亚洲一区二区综合| 精品国产乱码久久久久久免费 | 在线日韩av片| 韩国成人在线视频| 亚洲欧美日韩国产一区二区三区| 欧美精品777| 成人小视频在线| 丝袜诱惑亚洲看片| 国产亚洲成aⅴ人片在线观看| 一本一道波多野结衣一区二区| 亚洲成av人影院| 国产喂奶挤奶一区二区三区| 色8久久人人97超碰香蕉987| 免费成人在线观看| 综合亚洲深深色噜噜狠狠网站| 欧美区在线观看| 国v精品久久久网| 香蕉加勒比综合久久| 欧美韩国一区二区| 欧美日韩国产乱码电影| 东方欧美亚洲色图在线| 午夜亚洲国产au精品一区二区| 久久九九影视网| 欧美日本一区二区三区| kk眼镜猥琐国模调教系列一区二区 | 蜜臀久久久久久久| 亚洲欧美在线另类| 精品国产一区二区亚洲人成毛片| 91免费国产在线观看| 精品综合免费视频观看| 洋洋成人永久网站入口| 久久精品一区二区三区av| 欧美日韩国产综合一区二区| 国产成人精品亚洲777人妖| 日韩精彩视频在线观看| 国产精品久久久久影院亚瑟| 日韩欧美国产成人一区二区| 欧美日韩中文字幕一区二区| 懂色av一区二区三区免费观看| 男人操女人的视频在线观看欧美| 成人免费一区二区三区在线观看| 日韩免费一区二区| 欧美日韩小视频| 91小宝寻花一区二区三区| 国产成人精品免费在线| 欧美aaa在线| 香蕉av福利精品导航| 亚洲乱码国产乱码精品精可以看 | 亚洲小说春色综合另类电影| 国产精品视频麻豆| 久久久精品欧美丰满| 欧美成人女星排名| 日韩午夜在线播放| 91精品黄色片免费大全| 欧美日韩免费一区二区三区| 色悠悠亚洲一区二区| av电影在线观看不卡| 成人av资源在线观看| 国产成人免费xxxxxxxx| 国产一区二区在线免费观看| 美女一区二区久久| 蜜桃视频一区二区三区| 日产欧产美韩系列久久99| 日本女优在线视频一区二区| 亚洲成在人线在线播放| 污片在线观看一区二区| 亚洲综合另类小说|