Software Archive
Read-only legacy content
Annonces
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Go(lang) makes concurrency child's play?

Gaurav_Gogia
Débutant
1 757 Visites

So I've been trying to write concurrent code for quite a while but I am not sure if I am making progress. I have this question that might be able to help me with other related ones. 

Sample code:

package main

import "fmt"

func main(){

    go test()

    go test()

   var in bool

   fmt.Scanln(&in)

}

test(){

fmt.Println("test")

}

// ********************************************************************

In the above code, is that all I need to do to achieve concurrency in Go? 

Thanks ^.^

0 Compliments
1 Solution
gaston-hillar
Précieux contributeur I
1 757 Visites

Gaurav,

Check the following link that provides information about qualification for free software for students: https://software.intel.com/en-us/qualify-for-free-software/student

Intel® Parallel Studio XE Cluster Edition (includes Fortran and C/C++) includes VTune

Not sure about how things work. I'm just providing you the link and you can perform some research based on the info on this link.

Voir la solution dans l'envoi d'origine

0 Compliments
10 Réponses
gaston-hillar
Précieux contributeur I
1 757 Visites

Gaurav,

Concurrency is not a child's play. Mastering concurrency is hard. Mastering software development is hard. However, there are many tools such as Intel Parallel Advisor that make it easier to master concurrency. :)

0 Compliments
Gaurav_Gogia
Débutant
1 757 Visites

It's been a little hard to find resources / tutorials for concurrent programming. But when I saw that how I don't need to write threads and manage them in Go explicitly, I simply made my functions act like go-routines assuming that I've achieved concurrency. So, does Intel's IDE support Go or should I get something else for that? Or is there any documentation regarding concurrency in go that can help me optimize my programs?

Thanks in advance ^_^

0 Compliments
gaston-hillar
Précieux contributeur I
1 757 Visites

Hi Gaurav,

Intel® VTune Amplifier 2017 supports Go.

 

0 Compliments
gaston-hillar
Précieux contributeur I
1 757 Visites

Gaurav,

You can check the details about Intel® VTune Amplifier 2017 in the following link: https://software.intel.com/en-us/intel-vtune-amplifier-xe

 

0 Compliments
gaston-hillar
Précieux contributeur I
1 757 Visites

BTW, the following is a link with the documentation about support for the Go programming language: https://software.intel.com/en-us/node/712253

 

0 Compliments
Gaurav_Gogia
Débutant
1 758 Visites

Hey Gaston,

Thanks for the resources. But Intel® VTune Amplifier 2017 is a little too expensive for me. Isn't there a student edition. I do believe, I have a student key with me but I am not sure how to use it here. 

0 Compliments
gaston-hillar
Précieux contributeur I
1 758 Visites

Gaurav,

First, you can work with the trial version to check whether Intel® VTune Amplifier 2017 provides value to you. You can download a free 30-day trial version.

0 Compliments
gaston-hillar
Précieux contributeur I
1 758 Visites

Gaurav,

Check the following link that provides information about qualification for free software for students: https://software.intel.com/en-us/qualify-for-free-software/student

Intel® Parallel Studio XE Cluster Edition (includes Fortran and C/C++) includes VTune

Not sure about how things work. I'm just providing you the link and you can perform some research based on the info on this link.

0 Compliments
Gaurav_Gogia
Débutant
1 758 Visites

Well, I will see to it then. Thanks for your help though. Much appreciated ^_^ 

My friends told me Intel® VTune Amplifier 2017 really is amazing, lets see if it works for me too. 

0 Compliments
gaston-hillar
Précieux contributeur I
1 758 Visites

Gaurav,

It is great to know the info I've provided you is helpful. Your friend told you the truth. VTune Amplifier rocks.

0 Compliments
Répondre