Generate a STY triangular spherical mesh in Blender

Generate a STY triangular spherical mesh in Blender
Posted on
Please, refer to the “Removing starting cube and camera in Blender” post to obtain a clean Blender startup. Refer also to “Generate a STY triangular planar mesh in Blender” for further details. Shift + s -> Cursor to Center Lower horizontal command bar. Add -> Mesh -> UV sphere Click on the “+” which is in the upper right corner of the screen. The “+” appears on the left corner w...
More

Generate a STY triangular cylindrical mesh in Blender

Generate a STY triangular cylindrical mesh in Blender
Posted on
Please, refer to the “Removing starting cube and camera in Blender”post to obtain a clean Blender startup. Refer also to “Generate a STY triangular planar mesh in Blender” for further details. Shift + s -> Cursor to Center Lower horizontal command bar. Add -> Mesh -> Cylinder Click on the “+” which is in the upper right corner of the screen. The “+” appears on the left corner wit...
More

Generate a STY triangular planar mesh in Blender

Generate a STY triangular planar mesh in Blender
Posted on
Please, refer to the “Removing starting cube and camera in Blender” post to obtain a clean Blender startup. Shift + s -> Cursor to Center Lower horizontal command bar. Add -> Mesh -> Plane Click on the “+” which is in the upper right corner of the screen. The “+” appears on the left corner with respect to the right vertical command bar. After having clicked on “+”, a new menu wil...
More

Removing starting cube and camera in Blender

Removing starting cube and camera in Blender
Posted on
Immediately after having launched Blender, move the mouse arrow on the cube, right click on it, press the “delete” button and click “delete” on the dialog box. Similarly, move the mouse arrow on the camera, right click on it, press the “delete” button and click “delete” on the dialog box. Please, note that removing starting cube and camera is possible in the “Object mode” status (see lower hori...
More

Sorting 2 or 3 arrays by key with CUDA Thrust

Sorting 2 or 3 arrays by key with CUDA Thrust
Posted on
We have compared two approaches to sort arrays by key, with the same key. One of those approaches uses thrust::zip_iterator and the other thrust::gather. We have tested them in the case of sorting two arrays or three arrays. In all the two cases, the approach using thrust::gather has shown to be faster. The full codes are available on our GitHub website: 2 Arrays solution 3 Arrays solution ...
More

Customized Stream Compaction

Customized Stream Compaction
Stream compaction consists of removing undesired elements in a collection depending on a predicate. For example, considering an array of integers and the predicate p(x)=x>5, the array A={6,3,2,11,4,5,3,7,5,77,94,0} is compacted to B={6,11,7,77,94}. The general idea of stream compaction approaches is that a different computational thread be assigned to a different element of the array to be c...
More

Singular values calculation only with CUDA

Singular values calculation only with CUDA
As of CUDA 8.0, it is now possible to calculate the singular values only by cusolverDnSgesvd. On our GitHub website,  we report an example code with two calls to cusolverDnSgesvd, one performing the singular values calculation only cusolverDnSgesvd(solver_handle, 'N', 'N', M, N, d_A, M, d_S, NULL, M, NULL, N, work, work_size, NULL, devInfo) and one performing the full SVD calculation cusol...
More

Using CUDA dynamic parallelism in Visual Studio

Using CUDA dynamic parallelism in Visual Studio
Starting from CUDA 5.0, CUDA enables the use of dynamic parallelism for GPUs with compute capability 3.5 or higher. Dynamic parallelism allows launching kernels directly from other kernels and enables further speedups in those applications which can benefit of a better handling of the computing workloads at runtime directly on the GPU; in many cases, dynamic parallelism avoids CPU/GPU interactions...
More

Sparse 3D Matrices in Matlab

Sparse 3D Matrices in Matlab
As known, Matlab does not directly deal with 3D matrices. A workaround is using cell arrays of sparse matrices. Suppose that you want to create a sparse matrix containing only the elements (1, 1, 1) and (1, 3, 50) and suppose that A(1, 1, 1) = 1 and A(1, 3, 10) = 54. You can do the following: mySp{1}  = sparse(3, 3); mySp{10} = sparse(3, 3);   mySp{1}(1, 1) = 3; mySp{10}(1, 3)...
More

Using OpenMP and CUDA with Visual Studio

Using OpenMP and CUDA with Visual Studio
To exploit OpenMP under C++ and using Visual Studio 2010 or 2013 you need two steps: 1) #include <omp.h> 2) Project -> Properties -> Configuration Properties -> C/C++ -> Language ->  Open MP Support and then select Yes (/openmp). To exploit OpenMP under CUDA and using Visual Studio 2010 or 2013 you need some more hacking. In particular, you need the additional step: 3) ...
More