[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dennou-ruby:000441] Re: proto2c
�����դǤ���
>�����դ��ޡ�
>C ������Ȥ��Υ��������顢NumArray ���֥������Ȥ���ؿ���
>�����Ƥ�館�ޤ���������������ꤤ���ޤ���
PTR2NARY�ˤ��ޤ��礦����ȤϤ���ʤ�ΤǤ��礦����
VALUE
PTR2NARY(double *c_ptr, int size)
{
BNA *bna;
NA *n_ary;
double *dp;
shape = xmalloc(sizeof(int));
shape[0] = size;
bna = alloc_bna(tDOUBLE, size);
dp = bna->ptr;
dp = c_ptr;
n_ary = alloc_na(bna, 1, shape);
return Data_Wrap_Struct(cNumArrayDouble, 0, free_na, n_ary);
}
Ruby���֥������Ȥ��֤���꤫��numarray�ι�¤�Τ��֤��ۤ���������
�Ȥ����ʤ�
NA *
PTR2NARY(double *c_ptr, int size)
{
BNA *bna;
double *dp;
shape = xmalloc(sizeof(int));
shape[0] = size;
bna = alloc_bna(tDOUBLE, size);
dp = bna->ptr;
dp = c_ptr;
return alloc_na(bna, 1, shape);
}
�Ȥ������ˤʤ�ޤ����ɤ��餬�����Ǥ��礦����
--------------------------------------------------
�������������Ȳʳظ��楻��
���ĸ��漼���Σ����� ������ ľ��
e-mail: kawanabe@xxxxxx
--------------------------------------------------