On Fri, 6 Dec 2019, Damian McGuckin wrote:
Indexing cases that may or will need to change
--
So then what cases do default to 1-based indexing today?
I think Perl (currently) and APL (long ago) allowed this to be set at
compile time I believe
I program scientific and technical applications. Mainly engineering but
also geophysics, physics, mathematics, statistics, epidemiology. I deal
with masses of data, much of which needs to be visualized.
So my answer are biased.
On Mon, 4 Nov 2019, Brad Chamberlain wrote:
Indexing cases t
Hi all,
Is anybody doing anything like this?
I want to bounce some ideas around on the list.
If nobody is, I will phrase my emails in a finite-element-agnostic way
but I would prefer to avoid that as it makes emails longer and wordier.
And I am bad enough at doing that as it is.
Regards - Da
On Sun, 24 Jun 2018, Michael Ferguson wrote:
If you mean being able to refer to an external
C variable which is a struct then yes.
To be clear, the usual way to allow a C struct to work in Chapel code
is `extern record`, which we are not talking about deprecating:
Lost in translation when th
Andy - I can appreciate your terror at tweaking legacy code.
On Wed, 20 Jun 2018, Brad Chamberlain wrote:
In rewriting to Chapel, could you just defer the declarations of the
arrays until the point in the Fortran code where the dynamic allocations
take place? While I understand the desire fo
Brad,
On Tue, 19 Jun 2018, Brad Chamberlain wrote:
It's been proposed that we deprecate our current concept of "extern
classes" in the next release. This is a quick poll to see whether
anyone has crucial code that makes use of them today. If you do, please
let me know.
If you mean being
On Wed, 21 Mar 2018, David G. Wonnacott wrote:
for i in 0..w-1 {
xm1 = 0.0;
y1.resetScalars();
for j in 0..h-1 {
y1.set(i,j, a1*imgIn[i,j] + a2*xm1 + b1*y1.get_mRW() + b2*y1.get_pW());
xm1 = imgIn[i,j];
}
}
What is the advantage of using set/get as above instead of something li
On Mon, 6 Jul 2015, Brad Chamberlain wrote:
> I'm too close to bedtime to try this myself, but I'm not seeing why:
>
> const sqrtTwo = sqrt(fabs(-2.0));
> const sqrtHalf = sqrt(fabs(-2.0))*0.5;
> writeln((sqrtTwo, sqrtHalf));
>
> would necessarily break the back-end compiler's optimization of the
Hi Brad,
On Sun, 5 Jul 2015, Brad Chamberlain wrote:
> Since then, when people have been surprised that it isn't supported,
> it's been proposed that since 'param' machinery is very explicit in
> Chapel, perhaps we could simply say "You said compute it at
> compile-time, why did you think it
CRITICALITY : NOT URGENT
Is a param comprises of real expressions with results known at compile
time likely to be supported at any time into the future.
For example I want the program to know the most accurate value
possible of say 2.0/3.0 to whatever precision is active
Only the first param d
I was really impressed that my little recursive routine fpSqrtRooty was
expanded/unrolled explicitly so that there is overhead due to recursion.
Pretty cool! - Damian
// implement Newton's iteration for sqrt(s) where x is a guess
// and n is the number of iterations left to be done on 'x'
inli
On Tue, 2 Jun 2015, Brad Chamberlain wrote:
> I believe this ought to work and am _slightly_ surprised it does not. That
> said, as I've mentioned on another thread recently, our wildcard formal
> argument pattern matching support is a bit piecemeal at present and needs to
> be beefed up, so I'
On Tue, 2 Jun 2015, Brad Chamberlain wrote:
> I'm surprised that Michael didn't jump on this one, but I believe it should
> be as easy as adding the code to the following line in
> compiler/parser/chapel.lex:
>
> [ \t\r] processWhitespace(yyscanner);
That's what I thought, so
On Tue, 2 Jun 2015, Michael Ferguson wrote:
>
> Would you prefer that these constants end up in a different module
> that needed to be explicitly included? (e.g. use Math.Constants) ?
> I (personally) think that since another module's variable called e can
> shadow the Math one, it's reasonable fo
How does one make the wordlength of a return type match the wordlength
of a routine argument, well some member of a tuple which is an argument?
Thanks In Advance - Damian
Consider the following?
// this fails <-!!
// proc testOfTuple1(b : (int(16), int(16), int(?w))) : real
Adding to the list,
It would be really useful if, as other languages do, Chapel allows the
exploitation Unix/Linux pagination tools that ignore the occurence of a
Ctrl-L ('\f', form-feed, 0x0c) in the input stream rather than saying
there is a syntax error.
I am trying to do a 'vgrind' entry
On Fri, 29 May 2015, Michael Dietrich wrote:
> Zitat von Brad Chamberlain :
>
>> Where some options are:
>>
>> a) The compiler should complain that there isn't an appropriate overload
>>of foo(). I.e., coercions from int(32) to real(32) are lossy, so
>>should not happen automatically.
>>
On Mon, 1 Jun 2015, Michael Ferguson wrote:
>>> 3. Could the M_* constants from math.h be added to Math.chpl?
>>>(Especially M_PI.)
>>
>> Yeah, I'd think we'd want to do that. I think the main challenge is
Ditto.
>> probably choosing names (e.g., I don't think M_PI is probably right for
>>
Thanks for the quick reply.
On Wed, 27 May 2015, Michael Ferguson wrote
... (with rearrangement a little)
> I really want mod(x,y) for integers x,y to return a positive value
> whenever y is positive (since I frequently use mod to bucket values into
> an array). (DAMIAN's CHANGE) That gives t
On Wed, 27 May 2015, Damian McGuckin wrote:
> The IEEE854 2008 standard (well IEC 60559 which is part of ISO)
>
> a)mandates 'rem' by (2). Almost everybody obeys it because it was
> a relivatively recent addition. Julia does not.
>
> b)says nothing about
Basically the standard defines 6 roundings
Rounding To Nearest either
1) (Half) Tied away from Zero
2) (Half) Tied to Even
Rounding Towards (Directional Rounding)
3) +Infinity
4) -Infinity
5) Zero
The IEEE854 2008 standard (well IEC 60559 which is part of ISO)
a) mandates 'rem' by (2). Al
Just had a look at Julia and it defines
* rem(x,y) remainder; satisfies x == div(x,y)*y + rem(x,y), implying that sign
matches x.
This violates the standard.
* mod(x,y) modulus; satisfies x == fld(x,y)*y + mod(x,y), implying that sign
matches y.
This agrees with Chapel's current implementa
On Wed, 27 May 2015, Damian McGuckin wrote:
> Do (1) now as you suggest, and eventually, check out explicitly with an email
> to the Julia and D lists,
The OCAMP docs says
val mod_float : float -> float -> float
mod_float a b returns the remainder of a with respect to b. The ret
On Tue, 26 May 2015, Michael Ferguson wrote:
> So, are you saying that we should either:
>
> 1) use 'trunc' instead of 'floor' in the mod for reals function, or
> 2) call C's fmod function to implement mod for reals?
>
> I (personally) think that either of these are reasonable options
> (and I'd v
Extracting a bit of code:
/* Computes the mod operator on the two numbers, defined as
``mod(x,y) = x - y * floor(x / y)``.
The return value has the same type as `x`.
*/
proc mod(x: real(?w), y: real(w)): real(w) {
// This codes up the standard definition, according to W
On Thu, 21 May 2015, Michael Ferguson wrote:
> On 5/21/15, 7:42 AM, "Damian McGuckin" wrote:
>>
>> Why would a 32 bit floating point number multiplied by a 32 bit integer
>> yield a 64 bit quantity? Is Chapel trying to avoid overflow?
>
> Yes.
That's
Given
var x : real(32) = 0.5:real(32);
var i : int(32) = 12345;
var m : x * i;
if m.type == real(64) then
{
writeln("64 bits was seen");
}
else
{
writeln("I expect 32 bits");
}
produces
On Wed, 20 May 2015, Vassily Litvinov wrote:
> We have numBits(type t) and numBytes(type t) that are defined on certain
> primitive types. We do not provide this functionality for the other types, I
> believe. See the online library documentation:
>
> http://chapel.cray.com/docs/latest/modules/s
Dear Thinkers,
Already in Chapel, there is an attribute of any variable or expression
called '.type', such that, given definitions like
var vr : real(64);
var vi : int(32);
then
vr.type
or even
(vi * 55.5).type
returns a concept/value/thing which is
> Have a look at
> README.extern
> which you can read here or find in doc/{release,}/technotes
I keep forgetting that directory as a source of documentation.
Thanks - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | un
On Wed, 20 May 2015, Michael Ferguson wrote:
> On 5/20/15, 9:02 AM, "Jason Riedy" wrote:
>
>> And Damian McGuckin writes:
>>> On Tue, 19 May 2015, Michael Ferguson wrote:
>>>
>>>> I have verified that GCC at least does not inline frexp. I don
On Tue, 19 May 2015, Brad Chamberlain wrote:
> * Personally, I don't have any opposition to supporting more standard
> module/library-based support for floating point utility functions and
> values along the lines of what you're proposing.
It needs more discussion with more input from those w
On Tue, 19 May 2015, Brad Chamberlain wrote:
> [Oops, I'm realizing that I mentally conflated this IEEE 754 floating
> point thread with the other "Some Floating Point Issues" thread due to
> the similarity of the topics and the fact that my mailer sorted them
> in-line with one another.
They
On Tue, 19 May 2015, Michael Ferguson wrote:
> I have verified that GCC at least does not inline frexp. I don't
> understand why it couldn't, but it didn't in my experiments. Neither
> did clang...
C/C++ does not know the details so cannot expand it. If frexp were
implemented as a template in C++
Hi Michael,
On Mon, 18 May 2015, Michael Ferguson wrote:
> I do have one question for you about this. The C function frexp breaks
> up a floating point number into a normalized fraction (stored as a
> double) and an exponent.
Yes.
frexp(double mantissa, int *exponent)
frexpf(
or more specifically, extracting the components of such numbers, or
assembling those numbers from their components.
Among other things, I want to grab the mantissa from a 64bit (IEEE784)
floating point number, i.e. the top 12 bits of a floating point number
(excluding the sign bit) and I want
\
Hi
I realise that Floating Point in Chapel is work in progress but it is
still pretty good . So I will raise some points for discussion.
Background
==
I am looking at among other things, ways to improve the numerical quality
of the module 'Norm' which I would like to bring up to
Hi Brad
On Thu, 23 Apr 2015, Brad Chamberlain wrote:
> ,,, a user who has a good start on the effort to wrap BLAS (specifically
> OpenBLAS) routines in Chapel, and we've been working to get him under a
> CLA so that he can contribute it back; if I've understood the status
> properly, it's lik
Dear All,
I know that some of what are Level 2 and Level 3 routines are given in the
file 'hpl.chpl' of the benchmarks, has anybody got Routines, or a Module
which implement BLAS for Chapel? It may just be an interface into some C
routines, or as Chapel itself, especially given that many compon
On Mon, 20 Apr 2015, Brad Chamberlain wrote:
> My guess as to why your standalone example works is that Chapel routines
> are not fully type checked until they're called. Could it be that your
> standalone code was never called and therefore never type-checked?
You are very correct.
OK, for t
On Mon, 13 Apr 2015, Brad Chamberlain wrote:
> Chapel distinguished between multidimensional arrays:
>
> var A: [1..m, 1..n] real; // a 2D array
>
> and arrays of arrays (arrays whose elements are arrays):
>
> var B: [1..m] [1..n] real;
>
> The former says "give me a 2D array of reals
Well strictly speaking the IEEE754 floating point standard, e.g.
var half : real = 0x1p-1; // 0.5
var four : real = 0x1p2; // 4.0
var _128 : real = 0x1p7; // 128.0
Can somebody please stick that onto what is already very long list?
If somebody wants to correctly point me
On Tue, 14 Apr 2015, Brad Chamberlain wrote:
> This form is supported by Chapel today:
>
> variable = if condition then resultA else resultB;
That is perfect. I actually find it more readable than the C method.
Regards - Damian
Pacific Engineering Systems International, 277-279 Broadway,
Ignore my email about ternary conditional 'if'.
I obviously need glasses.
Regards - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of an
On Tue, 14 Apr 2015, Damian McGuckin wrote:
> variable := ( if condition then resultA else resultB );
Sorry, my fingers have cut+paste/brain-disconnect issues. Algol68 is
variable := if condition then resultA else resultB fi;
- Damian
Pacific Engineering Systems Internatio
Hi,
Is the use of
[ i in SOMETHING ] statement;
truly a list comprehension in say the Python sense or does it have
limitations. Fortran's implied DO loop is a list comprehension in an
extremely limited sense and then, only within READ/WRITE statements.
Also, in the interests of succinc
Hi all,
Looking at the following code to play with boundcode condition (masks)
taken, and hacked, from the LULESU benchmark.
Apologies if my use of tabs causes poor readability.
/* Compile-time constants */
param
XI_M= 0x003,
XI_M_SYMM
Thanks Brad,
On Mon, 13 Apr 2015, Brad Chamberlain wrote:
> I'm not personally aware of any full-fledged FE/BE/FV codes running in
> Chapel. Most users in these communities are taking a "wait and see"
> approach with Chapel, waiting for distributed memory performance to
> improve before comm
Besides the LULESH benchmark, what projects has used Chapel much for
finite element work or something similar? Does anybody have a fully
fledged FE or BE (or FV) code/application running in Chapel?
We are looking at refactoring/reworking/rewriting 3 small codes into
Chapel. I would be interest
49 matches
Mail list logo