pyCuda, issues sending multiple single variable arguments
问题 I have a pycuda program here that reads in an image from the command line and saves a version back with the colors inverted: import pycuda.autoinit import pycuda.driver as device from pycuda.compiler import SourceModule as cpp import numpy as np import sys import cv2 modify_image = cpp(""" __global__ void modify_image(int pixelcount, unsigned char* inputimage, unsigned char* outputimage) { int id = threadIdx.x + blockIdx.x * blockDim.x; if (id >= pixelcount) return; outputimage[id] = 255 -