⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sparsematvector.fp

📁 PDE simulator on GPU.
💻 FP
字号:
!!FP1.0
#Date:2003/9/10
#try to compute Sparse Matrix - Vector Multiplication	
#Index Texture for j in RTexID ----- TEX0
#Aij of AijTexID ----TEX1
#Index of xj in CTexID ---TEX2
#X data in XTexID ----TEX3

DECLARE OneTexOffset ={0.0, 0, 0, 0};

#Texture Rx(Index in GB--->RG)
TEX R1, f[TEX0], TEX0, 2D;
MOV R0.xyzw, R1.yzxw;

#Data of Aij(first non-zero)
TEX R1, R0, TEX1, 2D;

#Index of Xj(Index in GB--->RG))
TEX R2, R0, TEX2, 2D;
MOV R2.xyzw, R2.yzxw;
#Data of Xj in Texture X
TEX R2, R2, TEX3, 2D;

#Just the first non-zero multiply
MUL R1, R1, R2;

MOV o[COLR], R1;
END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -