Comments (8)
@performant23 That'd be great! Thanks for volunteering to work on this!
from stdlib.
Hi, I'd like to work on this issue!
from stdlib.
Perfect! Also, just had a few doubts as I was moving onto the C implementation.
First, building on the previous PR review, we replaced complex(kind=8) with complex(kind=kind(0.0d0)). So, in the first case, we treat the parts of the complex number as 8 bytes in the memory while in the second case, we let the kind parameter return the value of a dummy complex number to determine its kind. So, I think it should be mainly since some machines/compilers would have different definitions of precisions and how they're allocated.
So, just to confirm, we'd be dynamically creating allocatable arrays in all our complex double-precision routines right?
E.g.
(A). Array Arguments:
complex(kind=kind(0.0d0)), intent(in) :: zx(*), zy(*)
Also importantly, what happens to the routines with return values that are complex double-precision for JS, C, and Fortran?
E.g.
(B). Function signatures:
complex(kind=kind(0.0d0)) function zdotu( N, zx, strideX, zy, strideY )
.
.
.
So, currently I didn't find any double-precision complex implementations for JS as such (including blasjs), and also CBLAS doesn't provide any significant help in understanding it since there a wrapper is used to call the Fortran implementation (but here I'm not sure how we'd proceed with actually implementing in C)
(C). Second, since we're returning a double-precision complex number, Node.js doesn't seem to have built-in support for complex numbers.
So, for these cases, would we use something like napi_create_object
(In addon.c
)?
Like for this one:
double real_part = stdlib_real(dot);
double imag_part = stdlib_imag(dot);
napi_value real, imag, result;
status = napi_create_double(env, real_part, &real);
assert(status == napi_ok);
status = napi_create_double(env, imag_part, &imag);
assert(status == napi_ok);
status = napi_create_object(env, &result);
assert(status == napi_ok);
status = napi_set_named_property(env, result, "real", real);
assert(status == napi_ok);
status = napi_set_named_property(env, result, "imag", imag);
assert(status == napi_ok);
return result;
where dot
is the result we get after passing it to c_zdotu
.
from stdlib.
Hi @kgryte, hope you had a restful weekend! I was just wondering if you have any comments on my above questions. This would help me immensely since currently it's blocking me and your clarification on this would enable me to continue the development on this!
Thanks!
from stdlib.
Related Issues (20)
- [RFC]: Add C implementation for `@stdlib/math/base/special/tan` HOT 1
- [RFC]: Time Series Generation Module HOT 2
- [RFC]: Add C implementtation for `@stdlib/math/base/special/factorial` HOT 1
- [BUG]: test workflow is not running tests in nested test directories
- [RFC]: Add C implementation for `@stdlib/math/base/special/minmax` HOT 2
- [RFC]: add `math/base/special/acscf` HOT 1
- [RFC]: add `math/base/special/acotf` HOT 17
- [RFC]: add type declarations to @stdlib/utils/compact-adjacency-matrix HOT 1
- [RFC]: add `fs/mkdir` HOT 5
- [RFC]: add `math/base/special/asecf` HOT 1
- [RFC]: add various physical constants (tracking issue) HOT 7
- `binding.gyp` not found in math-base-special-ln HOT 3
- [RFC]: add `math/base/special/rad2degf` HOT 2
- [RFC]: add `math/base/special/asinhf` HOT 5
- [RFC]: add `help()` documentation pager in REPL HOT 1
- Binomcoef function evaluation is not memoized and can take very long to run given large n HOT 5
- [RFC]: automated/make recipe for generation of manifest files for C implementation of a package
- [RFC]: refactor `math/base/special/log2` to follow FreeBSD version 12.2.0 HOT 1
- [RFC]: add `blas/base/csscal`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stdlib.