Hi
Thanks for all your help!
I found the "strange" result was caused by my algorithm(CUDA).
The swig part is very ok:)
On Thu, May 20, 2010 at 11:18 PM, Bill Spotz wrote:
> I tried the following:
>
> %module example
> %{
> #define SWIG_FILE_WITH_INIT
> //#include "example.h"
> %}
> %include
I tried the following:
%module example
%{
#define SWIG_FILE_WITH_INIT
//#include "example.h"
%}
%include "numpy.i"
%init %{
import_array();
%}
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na), (float
*b, int nb)};
%inline
{
void update_incident_field(int k, float *a, int n
Hi,
I don't know exactly, but try replacing the one line
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na), (float
*b, int nb)};
with two lines:
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na)};
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *b, int nb)};
Don't know abo
I want to pass 1 integer and 2 numpy array into the C function as
followings:
void update_incident_field(int k, float *a, int na, float *b, int nb) {
for (i=0; i___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/li