• <bdo id='jZxXI'></bdo><ul id='jZxXI'></ul>
    1. <i id='jZxXI'><tr id='jZxXI'><dt id='jZxXI'><q id='jZxXI'><span id='jZxXI'><b id='jZxXI'><form id='jZxXI'><ins id='jZxXI'></ins><ul id='jZxXI'></ul><sub id='jZxXI'></sub></form><legend id='jZxXI'></legend><bdo id='jZxXI'><pre id='jZxXI'><center id='jZxXI'></center></pre></bdo></b><th id='jZxXI'></th></span></q></dt></tr></i><div id='jZxXI'><tfoot id='jZxXI'></tfoot><dl id='jZxXI'><fieldset id='jZxXI'></fieldset></dl></div>
      <tfoot id='jZxXI'></tfoot>

      <legend id='jZxXI'><style id='jZxXI'><dir id='jZxXI'><q id='jZxXI'></q></dir></style></legend>
    2. <small id='jZxXI'></small><noframes id='jZxXI'>

      如何将四面体树结构复制到 CUDA 设备内存?

      时间:2023-12-03

      <i id='M1XB2'><tr id='M1XB2'><dt id='M1XB2'><q id='M1XB2'><span id='M1XB2'><b id='M1XB2'><form id='M1XB2'><ins id='M1XB2'></ins><ul id='M1XB2'></ul><sub id='M1XB2'></sub></form><legend id='M1XB2'></legend><bdo id='M1XB2'><pre id='M1XB2'><center id='M1XB2'></center></pre></bdo></b><th id='M1XB2'></th></span></q></dt></tr></i><div id='M1XB2'><tfoot id='M1XB2'></tfoot><dl id='M1XB2'><fieldset id='M1XB2'></fieldset></dl></div>

        <tbody id='M1XB2'></tbody>

          <bdo id='M1XB2'></bdo><ul id='M1XB2'></ul>
          <tfoot id='M1XB2'></tfoot>

          <small id='M1XB2'></small><noframes id='M1XB2'>

            1. <legend id='M1XB2'><style id='M1XB2'><dir id='M1XB2'><q id='M1XB2'></q></dir></style></legend>
                本文介绍了如何将四面体树结构复制到 CUDA 设备内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                如果我想将下面的结构 TetrahedronStruct 移动到 CUDA 设备内存,我应该如何进行?

                If I want to move the below structure TetrahedronStruct to CUDA device memory, how should I proceed?

                struct TetrahedronStruct {
                  int index;
                  int region;
                  TriangleFaces Faces[4];
                  Vertex Vertices[4];
                  struct TetrahedronStruct *adjTetrahedrons[4];
                };
                
                typedef struct {
                  long double Nx, Ny, Nz;
                  long double d;
                  Vertex V[3];
                } TriangleFaces;
                
                typedef struct {
                  long double x, y, z;
                } Vertex;
                

                详情:

                提供了网格细节(节点数、四面体、坐标和区域).树的创建是在 for 循环中完成的.基本上,每个人脸都根据其坐标和相邻关系在树中定位和排列.

                The mesh details (number of nodes, tetrahedrons, coordinates, and regions) are provided. The creation of the tree is done in a for-loop. Basically, each face is being located and arranged in the tree accordingly with its coordinates and adjacency.

                在 CUDA 设备中,我需要使用此结构叠加在媒体上以模拟粒子将如何穿过该媒体.百万粒子中的每一个都在从四面体移动到四面体(每个四面体都具有其所在介质的属性).

                In the CUDA device, I need to use this structure to overlay on a media to simulate how particles will travel across that media. Each of the million particles are moving from tetrahedron to tetrahedron (each tetrahedron has the properties of the media where it resides).

                推荐答案

                将结构线性化,然后将它们复制到设备会更容易.

                It will be easier to linearize the structures and then copy them to device.

                在新的 CUDA 6 深拷贝中,只要您的计算能力是 3.x 或更高,并且使用 统一内存.

                In the new CUDA 6 deep copies will be much easier as long as your compute capability is 3.x or higher with the Unified Memory.

                这篇关于如何将四面体树结构复制到 CUDA 设备内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:解析文本以制作树数据结构 下一篇:c ++从二叉搜索树中删除具有两个孩子的特定节点

                相关文章

                1. <legend id='k1juV'><style id='k1juV'><dir id='k1juV'><q id='k1juV'></q></dir></style></legend>

                  <small id='k1juV'></small><noframes id='k1juV'>

                2. <i id='k1juV'><tr id='k1juV'><dt id='k1juV'><q id='k1juV'><span id='k1juV'><b id='k1juV'><form id='k1juV'><ins id='k1juV'></ins><ul id='k1juV'></ul><sub id='k1juV'></sub></form><legend id='k1juV'></legend><bdo id='k1juV'><pre id='k1juV'><center id='k1juV'></center></pre></bdo></b><th id='k1juV'></th></span></q></dt></tr></i><div id='k1juV'><tfoot id='k1juV'></tfoot><dl id='k1juV'><fieldset id='k1juV'></fieldset></dl></div>
                  <tfoot id='k1juV'></tfoot>
                    <bdo id='k1juV'></bdo><ul id='k1juV'></ul>