AI-LibNeural

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN


  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also compile or

LibNeural.xs  view on Meta::CPAN


	/* make sure that svpvav is array reference */
	if( !SvROK(svpvav) || (SvTYPE(SvRV(svpvav)) != SVt_PVAV) )
		Perl_croak(aTHX_ "parameter should be a valid array reference");

	/* get the array pointers out of its sv reference */
	avp = (AV*)SvRV(svpvav);

	/* make sure that it has the desired number of elements */
	if( av_len(avp)+1 != dlen )
		Perl_croak(aTHX_ "size of array and desired length do not match");
	
	/* alloc the memory for ains and aouts */
	array = (float*)malloc( dlen * sizeof(float) );
	if( array == NULL )
		Perl_croak(aTHX_ "unable to allocate memory for storing array");

	/* copy avins to ains */
	for( i = 0; i < dlen; i++ )
	{
		/* don't need ins anymore use as a tmp */



( run in 0.465 second using v1.01-cache-2.11-cpan-1512d0f6d69 )