code: def test_numpy_dtype(self):
      code = """
  extern "C" __global__ void test_kernel(const double* a, double3 b, double* x) {
    int i = threadIdx.x;
    x[i] = a[i] + b.x + b.y + b.z;
  }
  """
  
      double3 = numpy.dtype(
          {"names": ["x", "y", "z"], "formats": [numpy.float64] * 3}
      )
      a_cpu = numpy.arange(24, dtype=numpy.float64)
      a = cupy.array(a_cpu)
      b = numpy.random.rand(3).view(double3)
      x = cupy.empty_like(a)
  
      func = _compile_func("test_kernel", code)
  
      func.linear_launch(a.size, (a, b, x))
  
      expected = a_cpu + b["x"] + b["y"] + b["z"]
      testing.assert_array_equal(x, expected)
  
file_path: cupy/tests/cupy_tests/core_tests/test_function.py
imports: import unittest
  import pytest
  import numpy
  import cupy
  from cupy._core import core
  from cupy.cuda import compiler
  from cupy.cuda import runtime
  from cupy import testing
label_desc: Use image node_id 3 for calling the TestFunction obj's underlying member method code with example usage: obj.test_numpy_dtype() without return types