What is the syntax for using the restrict keyword for a 2d array function parameter?

后端 未结 1 1668
走了就别回头了
走了就别回头了 2021-01-28 08:22

I have an array declared in my main function: float A[n][n];

My goal is to pass it to a function with the restrict keyword: void func(int

相关标签:
1条回答
  • 2021-01-28 08:45

    The pointer can be restrict. All below forms are equivalent:

    void func(int n, float A[restrict n][n]);
    void func(int n, float A[restrict][n]);
    void func(int n, float (* restrict A)[n]);
    
    0 讨论(0)
提交回复
热议问题