[sac-user] SaC + cuda

Meyer, Jonathan C jcm5 at hw.ac.uk
Sun Mar 18 00:21:54 CET 2018

Dear all,

First, I am a total beginner to SaC and functional programming in general.

I would therefore greatly appreciate any help :)

I have managed to write some code that works fine using target "mt_pth", with working parallelization.

However, despite my desperate tries, SaC can't make it work on GPUs -> "Body of With-Loop to complex => no cudarization!".

The loops are :

- [In main()]
a = with{
                ([0,0] <= [i,j] < [15,1000]) : euler(i*1000+j+1);
}:fold(+, 0);

- [In euler()]
a = with {
                ([1] <= [i] <= [n]) : relprime(n,i);

 }:fold(+, 0);

For reference, the goal is to compute the sum of totient in a given range of integers.
If needed, I attached my source code.

Thank you for your help !

Best regards,

Heriot-Watt University is The Times & The Sunday Times International University of the Year 2018

Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences.

This email is generated from the Heriot-Watt University Group, which includes:

  1.  Heriot-Watt University, a Scottish charity registered under number SC000278
  2.  Edinburgh Business School a Charity Registered in Scotland, SC026900. Edinburgh Business School is a company limited by guarantee, registered in Scotland with registered number SC173556 and registered office at Heriot-Watt University Finance Office, Riccarton, Currie, Midlothian, EH14 4AS
  3.  Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS.

The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sac-home.org/pipermail/sac-user/attachments/20180317/6133440f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.sac
Type: application/octet-stream
Size: 734 bytes
Desc: test2.sac
URL: <http://lists.sac-home.org/pipermail/sac-user/attachments/20180317/6133440f/attachment.obj>

More information about the sac-user mailing list