对于 Python / NumPy 移植到 Perl 的项目,SPVM::Sys 是从文件读取/写入数据的基本类。
0.26 2022-11-12
[Incompatible Changes]
* The definitions of the following methods in the Sys::IO::Stat class are changed.
[Before]
method st_dev : int ();
method st_ino : int ();
method st_nlink : int ();
method st_rdev : int ();
[After]
method st_dev : long ();
method st_ino : long ();
method st_nlink : long ();
method st_rdev : long ();
* The stat and lstat methods in the Sys::IO class are moved to the Sys::IO::Stat class.
[New Features]
* Added the following methods to the Sys::IO::Stat class.
static method fstat_raw : int ($fd : int, $stat : Sys::IO::Stat);
static method fstat : int ($fd : int, $stat : Sys::IO::Stat);
* Added the following methods to the Sys::IO class.
static method readline : mutable string ($stream : Sys::IO::FileStream);
static method ftruncate : int ($fd : int, $length : long);
static method ungetc : int ($c : int, $stream : Sys::IO::FileStream);
static method fsync : int ($fd : int);
static method freopen : Sys::IO::FileStream ($path : string, $mode : string, $stream : Sys::IO::FileStream);
static method setvbuf : int ($stream : Sys::IO::FileStream, $buf : mutable string, $mode : int, $size : int);
static method setbuf : void ($stream : Sys::IO::FileStream, $buf : mutable string);
static method setbuffer : void ($stream : Sys::IO::FileStream, $buf : mutable string, $size : int);
static method setlinebuf : void ($stream : Sys::IO::FileStream);
static method stdin : Sys::IO::FileStream ()
static method stdout : Sys::IO::FileStream ()
static method stderr : Sys::IO::FileStream ()
* Added the following methods to the Sys::IO::Constant class.
static method STDIN_FILENO : int ();
static method STDOUT_FILENO : int ();
static method STDERR_FILENO : int ();
static method BUFSIZ : int ();
static method _IONBF : int ();
static method _IOLBF : int ();
static method _IOFBF : int ();
* Added the offset argument to the following methods.
[Before]
static method read : int ($fd : int, $buf : mutable string, $count : int);
static method write : int ($fd : int, $buf : string, $count : int);
static method fread : int ($ptr : mutable string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream);
static method fgets : mutable string ($s : mutable string, $size : int, $stream : Sys::IO::FileStream);
static method fwrite : int ($ptr : string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream);
[After]
static method read : int ($fd : int, $buf : mutable string, $count : int, $buf_offset = 0 : int);
static method write : int ($fd : int, $buf : string, $count : int, $buf_offset = 0 : int);
static method fread : int ($ptr : mutable string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream, $ptr_offset = 0 : int);
static method fgets : mutable string ($s : mutable string, $size : int, $stream : Sys::IO::FileStream, $s_offset = 0 : int);
static method fwrite : int ($ptr : string, $size : int, $nmemb : int, $stream : Sys::IO::FileStream, $ptr_offset = 0 : int);
什么是 SPVM?
SPVM是一种静态类型语言,可以从Perl使用。SPVM是 Python/numpy 移植到 Perl 的重要组成部分。如果你还没有听说过Perl的SPVM。另请参阅SPVM 语言规范。
SPVM的潜在剂量有多大?
预计生物技术,AI / ML,Apple/iPhone / iPad应用程序,Google/Android应用程序,物联网设备,联网汽车,智能设备,智能家居等领域将增长。
这是因为SPVM可以生成支持跨平台的可执行文件,并且可以轻松计算数组和绑定C / C++和Nvidia / GPU / cuda。
本站声明:
1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/292998.html