Skip to content

Instantly share code, notes, and snippets.

#include <cassert>
#include <cufftXt.h>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <thrust/complex.h>
#include <vector>
// Structure passed to the callback function describing the overlap structure.
struct overlap_params_t
@otherjason
otherjason / cufft_r2c_callbacks_bug.cu
Last active December 6, 2016 13:57
Code demonstrating bug with R2C transforms for some transform sizes with input callbacks enabled
#include <cufftXt.h>
#include <iostream>
// Variable that holds the maximum element index that the callback was invoked with.
__device__ int max_ind = 0;
// Callback function used for the test.
__device__ cufftReal callback_func(void *, size_t fft_index, void *, void *)
{
// Save the maximum index that we were invoked with, then just return zero.
#include <cufftXt.h>
#include <iostream>
void check_error(cudaError_t e, const char *file=NULL, int line=0)
{
if (e != cudaSuccess) {
std::cerr << "CUDA API error";
if (file) std::cerr << " at " << file << ':' << line;
std::cerr << ": " << cudaGetErrorString(e) << " ("
<< cudaGetErrorName(e) << ')' << std::endl;
#include <cufftXt.h>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <thrust/complex.h>
#include <vector>
void check_error(cudaError_t e, const char *file=NULL, int line=0)
{
if (e != cudaSuccess) {
@otherjason
otherjason / tuple_test.ii
Created May 4, 2017 14:53
Preprocessed source file for gcc bug
This file has been truncated, but you can view the full file.
# 1 "tuple_test.cc"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "tuple_test.cc"
# 1 "/usr/include/boost/hana.hpp" 1 3 4
# 45 "/usr/include/boost/hana.hpp" 3 4
# 1 "/usr/include/boost/hana/config.hpp" 1 3 4
# 13 "/usr/include/boost/hana/config.hpp" 3 4
#include <cufftXt.h>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <thrust/complex.h>
#include <vector>
void check_error(cudaError_t e, const char *file=NULL, int line=0)
{
if (e != cudaSuccess) {
@otherjason
otherjason / limit-definition
Last active September 13, 2017 03:24
Hello!
# $(\epsilon, \delta)$ definition of limit
This statement is a formalization of the familiar notion of the limit of a function $f(x)$. The origin of the concept is attributed to Cauchy, although the formal definition was first given by Bolzano.
## Statement
Assume that the concept of a limit exists. We assume the following relationship:
$$
\lim_{x \to a}\ f(x) = L