This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // | |
| // | |
| // | |
| #define DEVICE_INTRINSIC_QUALIFIERS __device__ __forceinline__ | |
| // | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| all: | |
| nvcc -m 32 -Xptxas=-v,-abi=no \ | |
| -gencode=arch=compute_11,code=sm_11 \ | |
| -gencode=arch=compute_12,code=sm_12 \ | |
| -gencode=arch=compute_20,code=sm_21 \ | |
| -gencode=arch=compute_30,code=sm_30 \ | |
| -gencode=arch=compute_35,code=sm_35 \ | |
| blocks.cu -o blocks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define KERNEL_QUALIFIERS extern "C" __global__ | |
| // | |
| // | |
| // | |
| #define REPEAT1() \ | |
| REPS(0) | |
| #define REPEAT4() \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // | |
| // | |
| #define KERNEL_QUALIFIERS extern "C" __global__ | |
| // | |
| // | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define KERNEL_QUALIFIERS __global__ | |
| #define VOLATILE volatile | |
| #define DEVICE_INTRINSIC_QUALIFIERS __device__ __forceinline__ | |
| #define DEVICE_STATIC_FUNCTION_QUALIFIERS static DEVICE_FUNCTION_QUALIFIERS | |
| #define DEVICE_STATIC_INTRINSIC_QUALIFIERS static DEVICE_INTRINSIC_QUALIFIERS | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // | |
| // | |
| // | |
| #define WARP_SIZE 32 | |
| #define VOLATILE volatile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // | |
| // | |
| #define KERNEL_QUALIFIERS extern "C" __global__ | |
| // | |
| // | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <cuda.h> | |
| int main(int argc, char** argv) | |
| { | |
| cuInit(0); | |
| int count; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| // | |
| // | |
| // | |
| #define PXL_WARP_SCAN_SHFL(_op,_vT,_opT,_regC,_exc,_exc0,_excP) | |
| //////////////////////////////////////////////////////////////////////// | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =============================================================================================== | |
| Load three arrays (x, y and z) in SoA order, repack them and store them in AoS order. | |
| Strategy: each warp permutes its load lane with: | |
| (rowNum + (laneId() * 3)) & 31 | |
| This will convert SoA into AoS but with x/y/z staggered across rows of registers. |