Channels ▼
RSS

Parallel

CUDA, Supercomputing for the Masses: Part 17


CUBLAS and CUFFT Enhancements

CUBLAS users will be happy that complex numbers are now supported. The release notes indicate the following routines have been added:

  • BLAS1

    • cublasZaxpy()
    • cublasZcopy()
    • cublasZswap()

  • BLAS2
    • cublasDtrmv()
    • cublasCtrmv()
    • cublasCgemv()
    • cublasCgeru()
    • cublasCgerc()
    • cublasZtrmv()
    • cublasZgemv()
    • cublasZgeru()
    • cublasZgerc()

  • BLAS3
    • cublasCtrsm()
    • cublasCtrmm()
    • cublasCsyrk()
    • cublasCsymm()
    • cublasCherk()
    • cublasZtrsm()
    • cublasZtrmm()
    • cublasZsyrk()
    • cublasZsymm()
    • cublasZherk()

The site oscarbg.blogspot notes that batched 2D and 3D transforms are supported in CUFFT with the new cufftPlanMany() API. This is defined in cufft.h, as follows:


cufftResult CUFFTAPI cufftPlanMany(cufftHandle *plan, 
        int rank,
   	int *n,
        int *inembed,    // Unused: pass NULL
        int istride,     // Unused: pass 1
        int idist,       // Unused: pass 0
        int *onembed,    // Unused: pass NULL
        int ostride,     // Unused: pass 1
        int odist,       // Unused: pass 0
        cufftType type,
        int batch);

The arguments are:

*plan -- The plan is returned here, as for other cufft calls

rank --The dimensionality of the transform (1, 2 or 3)

*n -- An array of size [rank], describing the size of each dimension

type -- Transform type (e.g. CUFFT_C2C), as per other CUFFT calls

batch -- Batch size for this transform

Return values are as for all other cufftPlan…() functions. Creating a plan for 1,000 2D double-precision, complex-to-complex transforms of size (128, 256) will look something like the following:


cufftHandle *myplan;
cufftPlanMany(myplan, 2, {128, 256}, NULL, 1, 0, NULL, 1, 0, CUFFT_Z2Z, 1000);

Note that for CUFFT 3.0, the layout of batched data must be side-by-side and not interleaved. The inembed, istride, idist, onembed, ostride, and odist parameters are for enabling data windowing and interleaving in a future version.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video